This repository is a Proof of Concept (PoC) for a new Document Registration Component (DRC) in the Common Ground landscape. It implements a minimal, functional version of the Documenten API, with additional filtering for new relations between non-Zaken objects.
All settings are read from environment variables (or a .env file in development).
Copy .env.example to .env and adjust the values before starting the application.
For more details, see docs/configuratie.md.
- Database Migrations - Migration workflow and limitations
- API Specification - OpenAPI spec
- Document API Implementation - Implementation details
- WOPI integration - Document viewing integration
brew install openjdk@21 gradle docker docker-compose-
Clone and build:
git clone <repository-url> cd DMF-PoC ./gradlew build
-
Start services: The minimal services required for development can be started with Docker Compose:
docker compose up -d postgres keycloak minio
Additional service dependencies for optional features can be started with Docker Compose as well.
docker compose up -d
-
Run migrations: Initialize the database with the initial layout:
./gradlew flywayMigrate
-
Verify:
./gradlew flywayInfo
-
Configure Copy the .env.example file to .env and fill in any configuration that you may have modified from the defaults.
# Build
./gradlew build
# Run tests
./gradlew test
# Start application
./gradlew runYou can use Bruno to test the API. Bruno is a Postman like tool
- To use Bruno, open the collection located in
.bruno/CG-DMFwith the Bruno application. - Click the "Shield" icon next to the environment selector and switch from Sandbox to Developer mode.
- Configure your environment at the top right of the window. By default for local development we connect to the openzaak instance of baseflow development cluster.
You can also run the Bruno test collection with the Bruno cli:
- Install the Bruno cli:
npm install -g @usebruno/cli - Run the collection:
bru run --sandbox=developer --env Localhost --env-var jwt.clientSecret=yoursecret --env-var jwt.clientId=gzac --reporter-junit results.xml- This collection is also run as part of the CI pipeline, see
.github/workflows/INTEGRATION_TEST.ymlfor details - Make sure you set the following environment variables if you want the tests to pass (otherwise no bestandsdelen will be created and the tests will fail):
- This collection is also run as part of the CI pipeline, see
BESTANDSDELEN_TRIGGER_SIZE=100000
BESTANDSDELEN_CHUNK_SIZE=100000
JWT_CLIENT_SECRET=your-secret docker compose -f docker-compose.integration-test.yml up bruno --build# Check migration status
./gradlew flywayInfo
# Apply pending migrations
./gradlew flywayMigrate
# Undo last migration
./flyway-undo.sh <version>
# Generate migration from Exposed models
./gradlew generateMigration -Pargs="V2__Description"See docs/DATABASE.md for detailed migration workflow.
/src/main/kotlin— Application source codeapi/— HTTP layer, split by domain (packagecom.baseflow.api)documenten/— Documenten API 1.5.0 routes and module (com.baseflow.api.documenten)admin/— Internal management endpoints (com.baseflow.api.admin)infra/— Health checks and OpenAPI spec endpoints (com.baseflow.api.infra)wopi/— WOPI protocol support (planned, not yet implemented) (com.baseflow.api.wopi)middleware/— Shared Ktor plugins (auth, audit trail, notifications, etc.)models/— Shared request/response models
config/— Application configuration and dependency injectionentities/— Exposed ORM table definitionsservices/— Business logictooling/— Gradle tasks (migration generator, OpenAPI export)
/src/main/resources/db/migration— Flyway migration scripts/docs— Documentation/docker— Docker configuration
- Language: Kotlin
- ORM: Exposed 1.0.0-rc-4
- Database: PostgreSQL
- Migrations: Flyway
- Build: Gradle
- API Spec: OpenAPI 3.0 (see
docs/documenten-1.5.0.yaml)
EUPL 1.2 - See LICENSE.md
