CloverHR on GitHub
The whole of CloverHR is in one repository: the app, its database migrations, the Docker image, the help pages and the tests. Read it, run it on your own machine, or deploy it on StackBlaze without touching the code.
What is in the repository
- The app: Next.js 16, React 19 and TypeScript, with Postgres 16 through Drizzle ORM. Server Components read and Server Actions write.
- A public API with API keys and webhooks, described in an OpenAPI reference inside the app.
- Migrations that update a server's database in place, and demo data for a company with offices in both countries.
- A Docker image, built on every change to
main, that applies migrations as it starts. - A help center for employees, managers, admins and owners, in English and French.
- Unit, integration and end-to-end tests, with Vitest and Playwright.
Run it on your own computer
You need Node 22 or later, pnpm 10 and Docker.
git clone https://github.com/stackblaze-adam/cloverhr.git
cd cloverhr
pnpm install
pnpm setup # writes .env.local with a password and an encryption key
pnpm db:up # starts Postgres on port 5433
pnpm db:migrate # creates the tables
pnpm db:seed # creates the owner and a demo company
pnpm dev # http://127.0.0.1:3200
Sign in with the owner email and password that pnpm setup wrote to .env.local. The demo company, Northwind Studio, has people in Toronto, Austin and remote in the US, so both countries' rules are there to explore.
Run it on your own server with Docker
Build the image, then run it with a Postgres 16 database and a disk for uploaded files.
docker build -t cloverhr .
docker run -d --name cloverhr \
-p 3200:3200 \
-v cloverhr-data:/data \
-e DATABASE_URL="postgres://user:password@db-host:5432/cloverhr" \
-e CLOVERHR_APP_URL="https://hr.example.com" \
-e CLOVERHR_SECRET_ENCRYPTION_KEY="at-least-32-random-characters" \
-e CLOVERHR_TRUSTED_PROXIES=1 \
cloverhr
Open the address and a short setup creates your company and your account, with two-step sign-in if you want it. Add CLOVERHR_SMTP_URL and CLOVERHR_MAIL_FROM to send email. The repository's docs/self-host.md lists every setting.
Or skip all of that
The CloverHR template on StackBlaze sets up the app, a Postgres database, a disk for uploads, email and a generated encryption key. There is nothing to fill in: deploy, then open the app's address.
Licence
CloverHR is source-available under the Business Source License 1.1, from StackBlaze Inc. Organizations with total finances under US $5 million a year may use it in production at no cost, and anyone may develop, test and evaluate with it. Hosting it for others counts each client's size. Four years after each version is first published, that version becomes available under the GNU General Public License, version 3. The LICENSE file has the exact terms, and NOTICE lists the third-party material it includes.
Reporting a problem
Open an issue on GitHub with what you did, what you expected and what happened. Please report security problems privately through GitHub's security advisories rather than in a public issue.