afundum
afundum is a modular, open-source framework for work time, absences and flows. Its core records working and project time, absences and vacation, closes each month with timesheets and approvals and runs an organization's own flows; modules switch on per organization, plugins add pages, endpoints and tables of their own, and country packs bring each country's holidays and labour rules. A NestJS API, a React app and Postgres: clone it, run it, extend it.
Get started · Demo · Features · Countries · Security · GitHub
Quick start
git clone https://github.com/fporoli/afundum.git cd afundum cp env.example.dev.cfg .env.dev npm install npm run dev:up # Postgres and Mailpit in Docker npm run dev:seed # demo organizations and people npm run dev:api # API on http://localhost:8001 npm run dev:web # web app on http://localhost:3001
Then open http://localhost:3001 and sign in as admin@acme.com / admin (every demo password is the name before the @). Docker for the whole stack, your own server and the details: Get started.
What it does
- Attendance & schedules – Check in with one click. Each person’s daily target follows their own work schedule – part-time and irregular weeks included – minus holidays and absences.
- Project time – Hours on projects, kept apart from attendance. Project owners approve each month, and a report PDF is filed automatically.
- Absences – Vacation goes to the line manager for approval. Sickness and accident are recorded straight away, with the certificate attached.
- Balances – Vacation prorated by workload and carried over; overtime and, where the country has it, statutory extra time kept as separate accounts, with alerts every month.
- Approvals – One page for every flow. Each one reaches the person’s actual manager – and follows along when the reporting line changes.
- Reports – Hours, absences, project time and people as tables and charts: grouped, filtered, saved and exported to Excel.
A modular framework
afundum is a small core with parts around it. Every organization switches on what it needs, and what is missing you add as a plugin, without forking the core.
- The core – People, organizations, roles and permissions, sign-in, documents, history and the workflow engine – the services every module builds on. It runs on its own, without any plugin.
- Modules – Work time, absences, project time, customers, flows, reports, news and events are modules: an organization's owner switches each on or off, and its pages, menu entries and endpoints go with it.
- Plugins – A plugin lives in plugins/<id>, usually in a repository of its own, and brings pages, API endpoints, its own Postgres schema, permissions, settings, flows, reports and texts. It talks to the core only through a versioned plugin contract, so the core can be updated under it.
- Country packs – What differs between countries – regions and their holidays, statutory extra time, record keeping – is one file per country, shared by API and web.
node scripts/plugins.mjs new timeoff # plugins/timeoff from the template node scripts/plugins.mjs build # plugins/*/api -> dist/api node scripts/plugins.mjs test # every plugin's tests npm run dev:migrate # the plugin's own tables
apensum is a product built on afundum, with modules of its own. Need a module afundum doesn't have? Get in touch
Country packs
The core is the same everywhere. What differs between countries – public holidays and their regions, statutory extra time, how long time records are kept – comes from the organization's country pack.
- New Year's Day
- St Berchtold's Day
- Good Friday
- Easter Monday
- Labour Day
- Ascension Day
- Whit Monday
and 3 more
From the country pack; each organization adds its own days or works on one of these.
How it is built
- Modules and plugins – Core pages and plugin pages are registered the same way; a plugin declares its pages, endpoints, tables and permissions in a manifest, and the core's plugin contract is all it may import (a test checks it both ways).
- API: NestJS – One controller per resource, every handler checks the caller's permissions itself; errors are returned as codes, never thrown at the client. Background jobs on one scheduler.
- Web: React, MUI, Vite – A single-page app in four languages that installs as a PWA on phones; pages are registered the same way plugins register theirs.
- Postgres, Liquibase, Drizzle – Liquibase owns the schema (one SQL changelog per change), Drizzle types the queries from the migrated database; history is recorded per row instead of timestamp columns.
- Sign-in and access – Own sessions with two-step login, optional single sign-on through Dex or Keycloak (OIDC), SCIM provisioning, and permissions per object, action and scope.
- Country packs – What differs between countries – regions and holidays, statutory extra time, record keeping – lives in one file per country, shared by API and web.
- Tests and CI – node:test for API, web and shared code without a database; CI builds, tests, migrates and seeds a fresh Postgres on every push.
Licence
afundum is open source under the GNU AGPL-3.0, and all of it is on GitHub: read it, run it, adapt it. If you offer a changed version to others as a service, you share your changes under the same licence.