Quarter is built using .NET Core as backend and a Gleam based front-end using Gleam.
Make sure you have the following tools installed:
- .NET SDK 9
- Node.js 20 (npm is included)
- Gleam 1.14+
- Erlang/OTP 28+ (required by Gleam)
- Docker (for the PostgreSQL database)
- Clone this repository:
git clone https://github.com/eliasson/quarter.git
- Create a copy of the settings for you to customize:
cp service/src/Quarter/appsettings.json service/src/Quarter/appsettings.Development.json
By default Quarter will run in local mode, which is useful for development. See authentication.md for details on how to setup external Identity Providers.
- Start a PostgreSQL database
Start an instance of the PostgreSQL database using Docker Compose.
Run docker compose -f tools/docker/docker-compose.yaml up -d
The first time this is run it will execute the tools/docker/init.sql script to setup the local database
and privileges. All tables are created using Fluent Migrations at service/src/Quarter.Core/Migrations.
- Build the frontend
The backend serves static files from a dist/ directory at the repository root. You need to build the
frontend before starting the backend.
The frontend consists of two Lustre applications, the time tracking app (served on /ui) and the admin
app (served on /admin), plus a shared package. See webapp/README.md for details.
From the webapp/ directory:
npm ci
make build
This compiles the Gleam code, bundles it with Vite, and outputs the result to dist/ui/ and dist/admin/ in
the repository root. Run make test to run the Gleam tests for all projects.
During development you can use npm run watch (app) or npm run watch:admin (admin) from webapp/ to
automatically rebundle on changes. Note that the Gleam code still needs to be compiled with gleam build
in the changed project.
- Symlink the dist directory
The backend is configured to serve static files from ./dist relative to where it runs
(service/src/Quarter/), but the frontend build outputs to dist/ at the repository root.
You need to create a symlink so the backend can find the built frontend assets:
From the repository root:
ln -s ../../dist service/src/Quarter/dist
- Build and run the backend
From the service/ directory:
dotnet build- download all libraries needed and build the solutiondotnet test- runs unit tests for all projectsdotnet run --project src/Quarter- starts the service at localhost
- Open the application
Run open https://localhost:5001/, go to Manage section and create your first project and
some activities. Then head to Timesheet and start registering time!
By default Quarter will run in local mode, which is useful for development. The configuration
is located at service/src/Quarter/appsettings.json with development overrides in
service/src/Quarter/appsettings.Development.json.
See authentication.md for details on how to setup external Identity Providers.