CHPay is the digital wallet platform for W.I.S.V. ‘Christiaan Huygens’. It combines a Spring Boot back-end, a Tailwind/FlyonUI based front-end, and integrations with Keycloak and Mollie to support secure payments and administration.
You can work on CHPay in three different ways:
- Dev Container (containerized workspace + dependencies).
- Bare metal development with services in Docker (local IDE +
docker composedependencies). - All bare metal (manual local setup of all dependencies).
- Prerequisites
- Docker Desktop (Linux users: Docker Engine + Docker Compose v2).
- For VS Code: install the Dev Containers extension.
For IntelliJ IDEA: install JetBrains Gateway with the Dev Containers plugin.
- Open the workspace
- VS Code:
Dev Containers: Rebuild and Reopen in Container. - IntelliJ:
File ▸ Open… ▸ .devcontainer/devcontainer.jsonvia Gateway.
- VS Code:
- The dev container boots the project plus all dependencies using the included Compose files. No local tooling besides Docker is required.
- Run the application with the supplied run configurations:
- IntelliJ: select
Application [devcontainer]in the dropdown at the top-right, then click the green play button. - VS Code:
Run and Debug ▸ Application [devcontainer](NotApplication [dev]).
- IntelliJ: select
While the container is running:
| Service | Host URL / Port | Purpose |
|---|---|---|
| Spring Boot app | http://localhost:3080 | CHPay web UI & API |
| PostgreSQL 15 | localhost:35432 | Primary database (postgres/postgres) |
| pgAdmin | http://localhost:3081 | Database administration (admin@example.com / admin) |
| Mailcatcher UI | http://localhost:3082 | Test inbox |
| Mailcatcher SMTP | localhost:3587 | SMTP endpoint for dev mail |
| Mock Keycloak (OIDC) | http://localhost:3083 | Login flow, seeded users |
| Vite dev server | http://localhost:3084 | Front-end HMR (frontend-dev service) |
The mock OIDC service includes two ready-made accounts:
| Username | Password | Roles |
|---|---|---|
constantijn |
pwd |
Admin (beheer) |
christiaan |
pwd |
Standard user |
-
Install JDK 21, Node.js 20, Docker Desktop/Compose, and your preferred editor.
-
Start the shared services:
docker compose up -d db pgadmin mailcatcher oidc
(Stop them with
docker compose downwhen you are done.) -
Open the project in VS Code or IntelliJ. The project is already Gradle based, so it will import automatically.
-
Prepare the frontend from
src/main/frontend:cd src/main/frontend npm install npm run build # build static assets to build/vite # or npm run dev # run Vite with live updates
-
Run the backend with the supplied run configurations:
- IntelliJ:
Run ▸ Run 'Application [dev]'. - VS Code:
Run and Debug ▸ Application [dev].
- IntelliJ:
All services listen on the same host ports listed in the table above.
Configure everything yourself only if you cannot run Docker:
-
PostgreSQL – create a database named
chpay, reachable atlocalhost:3080for the app andlocalhost:35432for manual access (or update the connection inapplication-dev.yml). -
Mail – run a local SMTP server or update
spring.mail.*inapplication-dev.ymlwith your provider. -
OIDC provider – register a Keycloak or other OIDC issuer and update:
spring: security: oauth2: client: registration: wisvchconnect: client-id: <client id> client-secret: <client secret> redirect-uri: "{baseUrl}/login/oauth2/code/wisvchlogin" provider: wisvchconnect: issuer-uri: https://login.ch.tudelft.nl/realms/wisvch
-
Mollie – set
mollie.api_key,redirect_url, andwebhook_url. -
Base URL – match
spring.application.baseurl(usuallyhttp://localhost:3080) andserver.port. -
Once the configuration is in place, build and run with:
./gradlew bootRun --args='--spring.profiles.active=dev'or reuse the IDE run configurations.
Production deployments require a publicly reachable base URL and hardened configuration:
- Keycloak – CHPay authenticates against Keycloak at
https://login.ch.tudelft.nl. Create a client for the production domain and copy theissuer-uri,client-id, andclient-secretinto your productionapplication.yml. - Mollie – enable a live Mollie account, configure the webhook to point to
${spring.application.baseurl}/topup/status, and store the live API key inmollie.api_key. - Persistence – point
spring.datasource.*to the production PostgreSQL instance and tighten credentials. - Mail – configure a real SMTP provider so receipts and admin notices are delivered.
- Security – disable the mock services, review allowed origins, and ensure TLS termination in front of the application.
Deployments typically use the same Gradle build (./gradlew bootJar) and run the fat jar with an environment-specific application.yml.
The UI uses FlyonUI components on top of Tailwind CSS, supplemented by DataTables, ApexCharts, lodash, jQuery, Clipboard.js, and Canvas Confetti.
- Templates – HTML views live in
src/main/resources/templates. - Source – Vite entrypoints are in
src/main/frontend/src(main.js,main.css). - Build output – Vite writes hashed assets and manifest to
build/vite. - Packaged app – Gradle copies
build/viteinto Spring static resources duringprocessResources.
cd src/main/frontend
npm install # first run
npm run dev # Vite dev server (HMR)
npm run build # one-off build
npm run preview # preview built assetsInside the dev container the frontend-dev service runs npm install and then npm run dev automatically.
Use this when reproducing deployment issues:
./gradlew bootJar
java -jar build/libs/chpay-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev --vite.mode=buildThen verify page source contains /assets/... CSS and JS files.