HUB
Sign inSign up
mainty logo

philiplehmann/mainty

By philiplehmann

•Updated 2 days ago

manage scheduled tasks, work hours, absences, expenses...

Image
0

2.6K

philiplehmann/mainty repository overview

⁠Mainty — maintenance planner

Plan recurring maintenance work across a team. Mainty handles rotations, working schedules, absences, time tracking and expense receipts, all in one self-hosted app.

Source: https://github.com/philiplehmann/mainty⁠

⁠Features

  • Organizations: one login can belong to several organizations, with a separate role in each (owner, administrator, team member).
  • Rotations and scheduling: recurring tasks with optional due times. When the planned person is unavailable, the next available roster member covers that occurrence, and the plan shows why.
  • Availability: repeating working patterns (e.g. alternating weeks), single-day calendar changes, and absences with a reason (holiday, sick, training, parental leave, …).
  • Time tracking: start/stop timers or manual entries, with overtime measured against each member's contract hours.
  • Expenses: submit, approve, reject and reimburse, with receipts stored in S3-compatible storage.
  • Audit log: every change is recorded with who made it and when, including field-level before/after values.
  • SSO: sign-in through any OIDC provider (Keycloak, Entra ID, Authentik, …).

⁠Tags

TagMeaning
latestLatest build from main
1.2.3, 1.2Release versions
sha-<commit>A specific commit

Images are multi-arch: linux/amd64 and linux/arm64.

⁠Quick start

docker run -d -p 3000:3000 \
  -e DATABASE_URL=postgres://user:pass@db:5432/maintenance \
  -e BETTER_AUTH_URL=https://mainty.example.com \
  -e BETTER_AUTH_SECRET=<random string, at least 32 characters> \
  -e OIDC_PROVIDER_ID=my-oidc \
  -e OIDC_ISSUER=https://id.example.com/realms/example \
  -e OIDC_DOMAIN=example.com \
  -e OIDC_CLIENT_ID=mainty \
  -e OIDC_CLIENT_SECRET=<client secret> \
  philiplehmann/mainty:latest

The app serves the web UI and the API on port 3000. It has a health check at /health.

Register this redirect URI with your identity provider:

${BETTER_AUTH_URL}/api/auth/sso/callback/${OIDC_PROVIDER_ID}

⁠Configuration

VariableRequiredPurpose
DATABASE_URLyesPostgreSQL connection URL (tested with PostgreSQL 18)
BETTER_AUTH_URLyesPublic origin of the app
BETTER_AUTH_SECRETyesRandom secret, at least 32 characters
OIDC_PROVIDER_IDyesStable provider ID used in the callback URL
OIDC_ISSUERyesOIDC issuer URL (with /.well-known/openid-configuration)
OIDC_DISCOVERY_URLnoDiscovery URL override, if the issuer isn't reachable from the container
OIDC_DOMAINyesEmail domain allowed to sign in (verified email claim required)
OIDC_CLIENT_ID / OIDC_CLIENT_SECRETyesOIDC client credentials
S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYnoS3-compatible storage for expense receipts. Without these, receipt upload and download return 503 and everything else works.
PORT / HOSTnoListen address (default 3000 / 0.0.0.0)

⁠Database schema

The container does not apply database migrations on start. Before the first run, and after upgrading, apply the schema from a checkout of the repository:

DATABASE_URL=... bunx drizzle-kit migrate

⁠First steps

Sign in with your identity provider and create an organization. You become its owner. Then add team members by email: they get access as soon as they sign in with a matching verified email.

Tag summary
Recent tags
Content type
Image
Digest
sha256:5ef28bd61…
Size
135.9 MB
Last updated
2 days ago
docker pull philiplehmann/mainty:latest