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).
Get started
afundum is a monorepo: a NestJS API, a React web app, shared TypeScript and Liquibase changelogs for Postgres. These steps take you from a clone to a running app with demo data, and on to your own server.
Source code on GitHubgithub.com/fporoli/afundumGit, Node.js 24 and Docker (for Postgres and the mail catcher). macOS, Linux or Windows.
Copy the example settings once, install, start the database and load the demo data, then run the API and the web app in two terminals (or use the VS Code launch configuration).
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
Open http://localhost:3001: the login page lists the demo accounts. Every demo password is the name before the @.
Admin admin@acme.com / admin Manager marta@acme.com / marta Employee ueli@acme.com / ueli
The local stack runs the API, the web app, Postgres and Mailpit in containers behind Caddy – the way a server runs it.
cp env.example.local.cfg .env.local npm run local:up # API, web, Postgres, Mailpit behind Caddy npm run local:seed # web on http://localhost:3002
One Docker Compose stack per instance behind a shared Caddy, deployed by GitHub workflows with backups and monitoring; docs/OPERATIONS.md and docs/SERVER_SETUP.md walk through it.
compose/docker-compose.vps.yml # one stack per instance infra/vps/remote.sh # what a deploy runs on the server .github/workflows/vps.yml # deploy, seed, reset from GitHub
Extend afundum without changing the core: the command makes a working plugin from the template – a page with a table and edit dialog, its permission, module switch, schema and tests – to replace with your own. plugins/notes is the smallest complete example; docs/PLUGINS.md describes the contract.
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
An organization picks its country; its pack sets holidays per region and the labour rules. Countries without a pack work with their own holidays – or add the pack.
packages/shared/src/country/ch.ts # Switzerland packages/shared/src/country/de.ts # Germany packages/shared/src/country/<cc>.ts # yours
One repository, npm workspaces, Node 24. Everything you need to know to change it is in the README and the docs folder.
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).
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.
A single-page app in four languages that installs as a PWA on phones; pages are registered the same way plugins register theirs.
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.
Own sessions with two-step login, optional single sign-on through Dex or Keycloak (OIDC), SCIM provisioning, and permissions per object, action and scope.
What differs between countries – regions and holidays, statutory extra time, record keeping – lives in one file per country, shared by API and web.
node:test for API, web and shared code without a database; CI builds, tests, migrates and seeds a fresh Postgres on every push.
Issues and pull requests are welcome on GitHub; for larger changes, open an issue first. A country pack is the most wanted contribution: one file with the regions, holidays and rules of your country, with tests. Contributions come with a contributor licence agreement (CONTRIBUTING.md).
Yes. afundum is free under the AGPL-3.0. afundum itself costs nothing.
Yes. The AGPL-3.0 lets you run, adapt and pass on afundum. If you offer a changed version to others as a service, you publish your changes.
afundum records the start and end of working time and breaks, marks late entries with a reason and keeps a history of every change. With a country pack it also counts statutory extra time and checks rest, breaks and night and Sunday work by that country’s law. It does not judge whether an exception or permit applies.
No. An organization chooses its country; today there are country packs for Switzerland and Germany. In any other country afundum works with your own holidays and without country rules.
On your own servers, in the country you choose: afundum runs where you install it.
Not for your own use. If you offer a changed version to others – customers, clients, companies of your group – the AGPL-3.0 requires publishing its code.
apensum is a product built on afundum, with modules of its own. If you need a module afundum doesn't have, get in touch: we can work it out together – or write it yourself as a plugin.