Set up backend services
Set up the Java/Quarkus backend services (Dataset Discovery Service and Access Management Service) for local development and testing.
Prerequisites
- Java Development Kit (JDK) 17 or 21
- Maven 3.8+
- Docker (optional, for running local integration dependencies)
- Git
Clone the repository
Choose the service you want to set up and clone the corresponding repository—DDS or AMS:
-
Dataset Discovery Service (DDS)
DDS mediates requests between frontend and CKAN for dataset search and retrieval.
git clone https://github.com/GenomicDataInfrastructure/gdi-userportal-dataset-discovery-service.git
cd gdi-userportal-dataset-discovery-service -
Access Management Service (AMS)
AMS manages access request workflows and integrates with REMS.
git clone https://github.com/GenomicDataInfrastructure/gdi-userportal-access-management-service.git
cd gdi-userportal-access-management-service
Install dependencies
Maven downloads dependencies automatically when you first build the project. To do this, run:
./mvnw clean install
On Windows:
mvnw.cmd clean install
Configure environment variables
Create an application.properties file in src/main/resources/:
# CKAN integration (for DDS)
ckan.api.url=http://localhost:5000/api/3
# REMS integration (for AMS)
rems.api.url=http://localhost:3001/api
rems.api.key=your-api-key-here
# Keycloak authentication
quarkus.oidc.auth-server-url=http://localhost:8180/realms/gdi
quarkus.oidc.client-id=gdi-backend
quarkus.oidc.credentials.secret=your-client-secret
# Development settings
quarkus.http.port=8080
quarkus.log.level=INFO
quarkus.log.category."io.github.genomicdatainfrastructure".level=DEBUG
Start integration dependencies
DDS and AMS are intermediate services and do not require their own PostgreSQL database connection. For local development, start only the services your target backend integrates with, such as CKAN for DDS, REMS for AMS, and Keycloak for authentication.
Use the relevant Docker Compose setup from those repositories when you need local instances of these integration services.
Run in development mode
Start the Quarkus development server:
./mvnw quarkus:dev
The service will start with:
- Hot reload: Code changes trigger automatic recompilation
- Dev UI: Available at
http://localhost:8080/q/dev/ - Health checks:
http://localhost:8080/q/health - OpenAPI docs:
http://localhost:8080/q/swagger-ui/
Verify the setup
-
Check health endpoint:
curl http://localhost:8080/q/healthExpected response:
{
"status": "UP",
"checks": [...]
} -
View OpenAPI documentation: Open
http://localhost:8080/q/swagger-ui/in your browser to see API endpoints. -
Test an endpoint:
curl http://localhost:8080/api/datasets
Development workflow
Run tests:
./mvn test
Run integration tests:
./mvnw verify
Code formatting:
./mvnw spotless:apply
Build for production:
./mvnw package
The executable JAR is in target/quarkus-app/.
Configure your IDE
IntelliJ IDEA:
- Open the project (File → Open → select pom.xml)
- Maven dependencies will import automatically
- Enable annotation processing (Settings → Build → Compiler → Annotation Processors)
Install VS Code extensions:
- Extension Pack for Java
- Quarkus
- Lombok Annotations Support for VS Code
Common issues
-
Port already in use: Change the port in
application.properties.quarkus.http.port=8081 -
Maven build fails: Clear Maven cache and rebuild.
./mvnw clean install -U