The SITMUN Application Stack is a comprehensive multi-container geospatial platform that provides a complete solution for territorial information management, geographical services, and spatial applications. This stack integrates all SITMUN components into a unified, containerized environment designed for development, testing, and production deployment.
- About SITMUN
- Architecture Overview
- Technology Stack
- Quick Start
- Installation
- Configuration
- Services
- Development
- API Documentation
- Security
- Troubleshooting
- Contributing
- Support
- License
SITMUN (Sistema de Información Territorial de la Mancomunidad de Municipios) is a geospatial information management system for territorial data, services, and spatial applications.
The stack has four main components:
┌─────────────────────────────────────────────────────────────┐
│ SITMUN Application Stack │
├─────────────────────────────────────────────────────────────┤
│ Frontend Layer │
│ ├── SITMUN Viewer App (Angular 19) │
│ └── SITMUN Admin App (Angular 19) │
├─────────────────────────────────────────────────────────────┤
│ Backend Layer │
│ ├── SITMUN Backend Core (Spring Boot 3) │
│ └── SITMUN Proxy Middleware (Spring Boot 3) │
├─────────────────────────────────────────────────────────────┤
│ Database Layer │
│ ├── PostgreSQL 16 / Oracle 23c / H2 │
│ └── Liquibase Migration │
└─────────────────────────────────────────────────────────────┘
| Component | Technology | Purpose | Port |
|---|---|---|---|
| SITMUN Viewer App | Angular 19, TypeScript | Interactive map visualization and user interface | 9000 |
| SITMUN Admin App | Angular 19, TypeScript | Administrative interface and configuration | 9000 |
| SITMUN Backend Core | Spring Boot 3, Java 17 | Core REST API and business logic | 9001 |
| SITMUN Proxy Middleware | Spring Boot 3, Java 17 | Secure proxy and middleware services | 9002 |
| Database | PostgreSQL/Oracle/H2 | Data persistence and geospatial storage | 9003/9004 |
- Frontend: Angular 19, TypeScript, SITNA
- Backend: Spring Boot 3, Java 17, Gradle
- Database: PostgreSQL 16 (default), Oracle 23c, H2 (dev only), Liquibase
- Infrastructure: Docker, Docker Compose, Git submodules, SonarCloud
- Docker Engine + Docker Compose (or Docker Desktop)
- Git
-
Clone the repository with submodules
git clone --branch dev --recurse-submodules https://github.com/sitmun/sitmun-application-stack.git cd sitmun-application-stack -
Setup the environment
For Unix-based systems (Linux/macOS):
./setup.sh
For Windows systems:
./setup.ps1 -
Select a profile (
.env)The stack is configured via
.env. Recommended profiles are underprofiles/:# Development (PostgreSQL) cp profiles/development-postgres.env .env # Development (Oracle) # cp profiles/development-oracle.env .env
Notes:
- The setup scripts create
.envfromprofiles/postgres.envonly if.envis missing. - You can keep local overrides in
.env.local(not committed); Docker Compose loads.env → .env.local → environment variables.
- The setup scripts create
-
Start the SITMUN Application Stack
docker compose up -d
-
Access the applications
- Viewer Application: http://localhost:9000/viewer (public access)
- Admin Application: http://localhost:9000/admin (requires authentication)
- Backend API: http://localhost:9000/backend
- API Documentation: http://localhost:9001/swagger-ui/index.html
-
Default credentials
- Username:
admin - Password:
admin
- Username:
-
Clone the Repository
git clone --branch dev --recurse-submodules https://github.com/sitmun/sitmun-application-stack.git cd sitmun-application-stack -
Setup Environment
# Unix-based systems ./setup.sh # Windows systems ./setup.ps1
-
Select a development profile (
.env)cp profiles/development-postgres.env .env # Or: cp profiles/development-oracle.env .env -
Start Services
docker compose up -d
-
Verify Installation
# Check service status docker compose ps # Check backend health curl http://localhost:9001/api/dashboard/health # Check proxy health curl http://localhost:9002/actuator/health
-
Environment Configuration
Copy a profile to
.envand edit for production (see Database Configuration for all options):# For PostgreSQL (default) cp profiles/postgres.env .env # For Oracle cp profiles/oracle.env .env # Edit environment variables for production nano .env
The copied profile already sets the database, Spring, Liquibase, and frontend variables (all other compose variables have working defaults). The only variables you must add to boot are the two secrets — the compose profile marks them required (
:?) and refuses to start without them:# Secrets (mandatory, no default, min 32 chars each) -- see step 2 SITMUN_USER_SECRET=<32+ char random value> MIDDLEWARE_SECRET=<32+ char random value>
For a real production deployment you should also override the database credentials, which otherwise default to
sitmun3/sitmun3:DATABASE=<db name> DATABASE_USERNAME=<db user> DATABASE_PASSWORD=<db password>
-
Secrets (mandatory)
Production profiles (
profiles/postgres,profiles/oracle) do not ship secret defaults. You must set both variables in.env, each at least 32 characters:# Backend JWT signing secret and backend-proxy shared secret echo "SITMUN_USER_SECRET=$(openssl rand -hex 32)" >> .env echo "MIDDLEWARE_SECRET=$(openssl rand -hex 32)" >> .env
Enforcement is fail-fast, so misconfiguration is caught before the platform serves traffic:
- A missing variable makes Docker Compose refuse to start (
variable is required). - A blank or shorter-than-32-character value aborts backend/proxy startup via
SecuritySecretValidator/ProxySecretValidator(IllegalStateException), so the container never becomes healthy.
MIDDLEWARE_SECRETis shared: it is injected into the backend asSITMUN_PROXY_MIDDLEWARE_SECRETand into the proxy asSITMUN_BACKEND_CONFIG_SECRET. Both sides must match. Never commit secrets, and never reuse the development defaults. - A missing variable makes Docker Compose refuse to start (
-
Database Setup
Database settings are already set by the profile you copied. To change database type later, copy a different profile to
.envor editSITMUN_DB_PROFILEandCOMPOSE_PROFILESin.env. See the Database Configuration section for details and verification steps. -
SSL Configuration
# In .env, set for HTTPS (standard port 443) PUBLIC_URL_SCHEME=https # PUBLIC_PORT and PUBLIC_NON_STANDARD_PORT are not needed for standard port 443
The SITMUN Application Stack uses environment variables for configuration. Copy a profile from profiles/ to .env (see Database Configuration); the following variables are used:
| Variable | Description | Default Value |
|---|---|---|
PUBLIC_URL_SCHEME |
Protocol (http/https) | http |
PUBLIC_HOSTNAME |
Public hostname | localhost |
PUBLIC_PORT |
Public port number (blank for standard port) | 9000 |
PUBLIC_NON_STANDARD_PORT |
Set to mark use of a non-standard port | 1 |
PUBLIC_BASE_PATH |
Application context path (must start and end with /) | / |
LOCAL_PORT |
Port the nginx container listens on | 9000 |
LOCAL_BASE_PATH |
Base path in the nginx container | / |
SITMUN_PROFILE |
SITMUN scenario profile | development |
SITMUN_DB_PROFILE |
Spring Boot database profile (postgres/oracle) | postgres |
COMPOSE_PROFILES |
Docker profiles: postgres, oracle, demo (example DB; dev alias), mbtiles |
postgres |
DATABASE |
Database name | sitmun3 |
DATABASE_URL |
JDBC URL | jdbc:postgresql://postgres:5432/ |
DATABASE_USERNAME |
Database username | sitmun3 |
DATABASE_PASSWORD |
Database password | sitmun3 |
FORCE_USE_OF_PROXY |
Force proxy middleware | false |
SITMUN_PROXY_MIDDLEWARE_VALIDATE_USER_ACCESS |
Enable proxy access validation (blocks access to blocked services) | true |
SITMUN_USER_SECRET |
Backend JWT signing secret (min 32 chars) | Required in production profiles |
MIDDLEWARE_SECRET |
Backend-proxy shared secret (min 32 chars) | Required in production profiles |
ENVIRONMENT |
Frontend Docker build mode (development/production) | development |
Docker frontend builds read each app's version from its submodule package.json (admin and viewer independently). The About dialog shows that value at runtime.
The SITMUN Application Stack supports multiple database backends: PostgreSQL 16 (default), Oracle 23c, and H2 (development only). Three environment variables control setup:
SITMUN_PROFILE-- SITMUN scenario profile. Usedevelopmentfor local development scenarios.SITMUN_DB_PROFILE-- Spring Boot database profile for the backend (postgresororacle). Controls database dialect, Liquibase config, and which database service the backend depends on. Must always be set.COMPOSE_PROFILES-- Built-in Docker Compose variable that selects which containers start. Set topostgresororaclefor a dockerized database. Add,demofor the example demo database (host port 9005;,devremains a deprecated alias). Add,mbtilesfor the MBTiles service used by edition-mobile tile export. Omit entirely for external databases.
SITMUN_DB_PROFILE and COMPOSE_PROFILES must agree on the database type when using a dockerized database.
The backend automatically loads the appropriate configuration from:
profiles/development/backend/application-postgres.yml(for PostgreSQL)profiles/development/backend/application-oracle.yml(for Oracle)
Pre-configured profile .env files are provided in profiles/. Copy the desired profile to the project root as .env, edit as needed, then start the stack:
# Dockerized PostgreSQL
cp profiles/postgres.env .env
docker compose up -d
# Dockerized Oracle
cp profiles/oracle.env .env
docker compose up -d
# Development PostgreSQL (main DB + Liquibase seed; no example DB / MBTiles)
cp profiles/development-postgres.env .env
docker compose up -d
# Development Oracle (same idea)
cp profiles/development-oracle.env .env
docker compose up -d
# External PostgreSQL (edit .env first)
cp profiles/postgres-external.env .env
# Edit .env with your connection details
docker compose up -d front backend proxy
# External Oracle (edit .env first)
cp profiles/oracle-external.env .env
# Edit .env with your connection details
docker compose up -d front backend proxyUsing a profile .env file:
cp profiles/postgres.env .env
docker compose up -dOr set variables directly in .env:
SITMUN_PROFILE=development
SITMUN_DB_PROFILE=postgres
COMPOSE_PROFILES=postgres
DATABASE_URL=jdbc:postgresql://postgres:5432/
DATABASE=sitmun3
DATABASE_USERNAME=sitmun3
DATABASE_PASSWORD=sitmun3Then: docker compose up -d
Configuration details:
- Container name:
postgres - Port:
9003:5432(external:internal) - JDBC URL format:
jdbc:postgresql://postgres:5432/ - Spring profile:
postgres - Hibernate dialect:
org.hibernate.dialect.PostgreSQLDialect
Using a profile .env file:
cp profiles/oracle.env .env
docker compose up -dOr set variables directly in .env:
SITMUN_PROFILE=development
SITMUN_DB_PROFILE=oracle
COMPOSE_PROFILES=oracle
DATABASE_URL=jdbc:oracle:thin:@//oracle:1521/
DATABASE=sitmun3
DATABASE_USERNAME=sitmun3
DATABASE_PASSWORD=sitmun3Then: docker compose up -d
Oracle may take 60+ seconds on first start. Monitor with:
docker compose logs -f oracle
# Wait for "DATABASE IS READY TO USE!" messageConfiguration details:
- Container name:
oracle - Port:
9004:1521(external:internal) - JDBC URL format:
jdbc:oracle:thin:@//oracle:1521/ - Spring profile:
oracle - Hibernate dialect:
org.hibernate.dialect.OracleDialect
-
Stop all services:
docker compose down
-
Copy a different profile to
.envand start:cp profiles/oracle.env .env docker compose up -d
Or update
SITMUN_DB_PROFILEandCOMPOSE_PROFILESin your.envfile and rundocker compose up -d. -
Database migrations (Liquibase) run automatically on backend startup.
For an external database not managed by Docker Compose:
-
Copy the appropriate external profile to
.envand edit with your connection details:cp profiles/postgres-external.env .env # Or: cp profiles/oracle-external.env .env # Edit .env with your connection details
-
Start services without a database container:
docker compose up -d front backend proxy
The
front backend proxyarguments are required becausedepends_onreferences the database service, which is not started. This selectively starts only the application services.
Or set variables directly in .env:
SITMUN_PROFILE=development
SITMUN_DB_PROFILE=postgres # or oracle
# COMPOSE_PROFILES is omitted -- no database container starts
DATABASE_URL=jdbc:postgresql://your-host:5432/
DATABASE=your_database
DATABASE_USERNAME=your_username
DATABASE_PASSWORD=your_passwordThen: docker compose up -d front backend proxy
An optional demo database with geospatial datasets is available for testing. It runs on port 9005 and includes UNESCO heritage sites, web publications, and materials management data from profiles/development/demo-data/.
Development profiles do not enable it by default. Opt in by adding the Compose profile demo (,dev is a deprecated alias that still works):
# In .env (PostgreSQL)
COMPOSE_PROFILES=postgres,demo
# Or temporarily:
COMPOSE_PROFILES=postgres,demo docker compose up -d
# Oracle:
# COMPOSE_PROFILES=oracle,demoTourism/demo tasks that use JDBC jdbc:postgresql://example/example need this container. The main SITMUN database still starts without it. Credentials: example/example (read-only role example_reader/example_reader).
The MBTiles service supports edition-mobile offline tile export through proxy middleware. It is internal to the Compose network (no host port); nginx returns 404 for public /mbtiles.
Development profiles do not enable it by default. Opt in with ,mbtiles:
# In .env
COMPOSE_PROFILES=postgres,mbtiles
# With example demo DB as well:
# COMPOSE_PROFILES=postgres,demo,mbtilesAdmin, viewer, and normal WMS/WFS proxy flows work without it. Root Playwright mobile suites start MBTiles via npm run e2e:mbtiles (Gradle on port 18084), not this Compose service.
// Environment configuration for Angular apps
export const environment = {
production: boolean,
apiBaseURL: string,
logLevel: LogLevel,
hashLocationStrategy: boolean,
};# Spring Boot application configuration
spring:
profiles:
active: ${SPRING_PROFILES_ACTIVE:dev}
datasource:
url: ${DATABASE_URL}${DATABASE}
username: ${DATABASE_USERNAME}
password: ${DATABASE_PASSWORD}
sitmun:
user:
secret: ${SITMUN_USER_SECRET}
token-validity-in-milliseconds: 36000000
proxy-middleware:
secret: ${SITMUN_PROXY_MIDDLEWARE_SECRET}When the BASE_URL is http://localhost:9000/, the following services are available:
| Application | URL | Description | Authentication |
|---|---|---|---|
| Viewer Application | ${BASE_URL}viewer |
Interactive map viewer | Optional |
| Admin Application | ${BASE_URL}admin |
Administrative interface | Required |
| Backend API | ${BASE_URL}backend |
Core REST API | JWT Token |
| Proxy Middleware | ${BASE_URL}middleware |
Proxy services | JWT Token |
- Health Check:
http://localhost:9001/api/dashboard/health - Authentication:
http://localhost:9001/api/authenticate - User Management:
http://localhost:9001/api/account - Application Config:
http://localhost:9001/api/config/client/application - API Documentation:
http://localhost:9001/swagger-ui/index.html
- Health Check:
http://localhost:9002/actuator/health - Proxy Configuration:
http://localhost:9002/api/config/proxy - Service Proxy:
http://localhost:9002/api/proxy/*
Viewer App ──┐
├── Backend Core ── Database
Admin App ───┘
└── Proxy Middleware ── External Services
Root Playwright tests exercise the admin and viewer apps against backend-core on in-memory H2 (no Docker Compose). Viewer suite also starts proxy middleware and a local secured WMS stub. Mobile web suite covers edition Bearer login, proxy-token exchange, and authenticated MBTiles through middleware (no public /mbtiles). Details: e2e/README.md.
# prerequisites: Java 17, Node ≥ 20.19, submodules initialized
# admin: cd front/admin/sitmun-admin-app && npm ci
# viewer: cd front/viewer/sitmun-viewer-app && npm ci
npm ci
npm run e2e:install
npm run e2e
npm run e2e:viewer
npm run e2e:mobile:web
# optional Android emulator + Maestro (requires ANDROID_HOME, adb, Maestro)
# npm run e2e:mobile:androidOwned ports: admin 4300, viewer 4400, backend 18080, proxy 18082, WMS stub 18093. Mobile adds gateway 18081, MBTiles 18084, WMTS stub 18094.
The SITMUN Application Stack uses Git submodules to include the source code of all SITMUN components:
| Submodule | GitHub Repository | Docker Service | Technology Stack |
|---|---|---|---|
front/admin/sitmun-admin-app |
SITMUN Admin App | front |
Angular 19, TypeScript |
front/viewer/sitmun-viewer-app |
SITMUN Viewer App | front |
Angular 19, TypeScript |
apps/touristic-mobile-app |
SITMUN Touristic Mobile App | — | Ionic/Angular, Capacitor |
apps/edition-mobile-app |
SITMUN Edition Mobile App | — | Ionic/Angular, Capacitor |
back/backend/sitmun-backend-core |
SITMUN Backend Core | backend |
Spring Boot 3, Java 17 |
back/proxy/sitmun-proxy-middleware |
SITMUN Proxy Middleware | proxy |
Spring Boot 3, Java 17 |
back/mbtiles/sitmun-mbtiles |
SITMUN MBTiles | mbtiles (internal) |
Spring Boot 3, Java 17 |
The stack includes minimum viable database profiles for rapid backend + database bootstrapping:
profiles/
development/
backend/ # Backend Spring config (application.yml, Liquibase migrations)
proxy/ # Proxy Spring config
oracle/
docker-compose.yml # Backend + Oracle DB with schema + seed data
postgres/
docker-compose.yml # Backend + Postgres DB with schema + seed data
Running a standalone profile:
# Start Postgres profile (backend + database with dev seed data)
cd profiles/postgres
docker compose up -d --build
# Verify backend health
curl http://localhost:8080/api/dashboard/health
# Start Oracle profile (mutually exclusive - use different terminal or stop postgres first)
cd ../oracle
docker compose up -d --buildImportant notes:
- Profiles use
SPRING_LIQUIBASE_CONTEXTS=devto bootstrap schema + development seed data via Liquibase on startup. - Backend listens on port
8080, databases on standard ports (5432for Postgres,1521for Oracle). - Profiles share the same container names and ports - run only one profile at a time locally.
- For production or custom contexts, override
SPRING_LIQUIBASE_CONTEXTSin the compose environment section.
-
Update Repository and Submodules
git fetch origin dev git checkout dev git submodule update --recursive --remote
-
Change Submodule Branch (if needed)
# Switch submodule to specific branch git submodule set-branch -b branch_name submodule_name git submodule sync git submodule update --init -
Rebuild and Restart Services
# Rebuild specific service docker compose build --no-cache service_name docker compose up service_name -d # Rebuild all services docker compose build --no-cache docker compose up -d
# Navigate to admin app
cd front/admin/sitmun-admin-app
npm ci
npm start
# Navigate to viewer app
cd front/viewer/sitmun-viewer-app
npm ci
npm start# Navigate to backend core
cd back/backend/sitmun-backend-core
./gradlew bootRun --args='--spring.profiles.active=dev'
# Navigate to proxy middleware
cd back/proxy/sitmun-proxy-middleware
./gradlew bootRun --args='--spring.profiles.active=dev'The frontend applications (Admin and Viewer) support three build configurations to cover different use cases:
| Configuration | Use Case | API URL | Source Maps | Optimization |
|---|---|---|---|---|
development |
Local ng serve |
localhost:9000/backend |
Yes | No |
docker-dev |
Docker debugging | Template-based | Yes | No |
production |
Docker production | Template-based | No | Yes |
For local development using ng serve, the development configuration uses environment.ts which points to the local docker-compose stack:
# Admin app
cd front/admin/sitmun-admin-app
npm install
npm start # Uses development configuration
# Viewer app
cd front/viewer/sitmun-viewer-app
npm install
npm start # Uses development configurationThe API URL is set to http://localhost:9000/backend (the docker-compose stack backend).
For production Docker builds, the production configuration is used by default:
# Build production Docker image (default)
docker compose build frontThis creates optimized builds without source maps, using the environment.prod.ts.template which injects the API URL via envsubst at build time.
For debugging issues in a Docker environment, use the docker-dev configuration which includes source maps:
# Build Docker image with source maps for debugging
BUILD_MODE=docker-dev docker compose build frontThis creates unoptimized builds with source maps enabled, while still using the template-based API URL configuration for Docker.
front/
├── admin/
│ ├── environment.prod.ts.template # Docker builds (envsubst)
│ └── sitmun-admin-app/src/environments/
│ ├── environment.ts # Local development
│ └── environment.prod.ts # Production fallback
└── viewer/
├── environment.prod.ts.template # Docker builds (envsubst)
└── sitmun-viewer-app/src/environments/
├── environment.ts # Local development
└── environment.prod.ts # Production fallback
# Frontend quality checks
cd front/admin/sitmun-admin-app
npm run lint
npm test
cd front/viewer/sitmun-viewer-app
npm run lint
npm test
# Backend quality checks
cd back/backend/sitmun-backend-core
./gradlew test
./gradlew spotlessCheck
cd back/proxy/sitmun-proxy-middleware
./gradlew test
./gradlew spotlessCheckThe SITMUN Backend Core provides comprehensive REST API functionality:
POST /api/authenticate
Content-Type: application/json
{
"username": "admin",
"password": "admin"
}
GET /api/account
Cookie: access_token=<jwt-token>
POST /api/authenticate/logout
Cookie: access_token=<jwt-token>GET /api/account/all
GET /api/account/{id}
GET /api/account/public/{id}
POST /api/user-verification/verify-password
POST /api/user-verification/verify-email
POST /api/recover-password
GET /api/userTokenValidGET /api/config/client/application
GET /api/config/client/territory
GET /api/config/client/profile/{appId}/{territoryId}
POST /api/config/proxyGET /api/dashboard/health
GET /api/dashboard/info
GET /api/dashboard/metricsThe SITMUN Proxy Middleware provides secure proxy functionality:
GET /actuator/health
POST /api/config/proxy
GET /api/proxy/{service-type}/{service-id}- WMS: Web Map Service proxy
- WFS: Web Feature Service proxy
- WMTS: Web Map Tile Service proxy
- JDBC: Database connection proxy
- Custom: Custom service proxy
- Backend Core Swagger: http://localhost:9001/swagger-ui/index.html
- Proxy Middleware: Available through backend configuration endpoints
- OpenAPI Specification: Available in
/static/v3/directory
- JWT Tokens: Secure token-based authentication with configurable expiration
- OIDC Authentication: Multi-provider OpenID Connect support for enterprise single sign-on (new in 1.2.1)
- Database Authentication: Traditional username/password authentication
- LDAP Integration: Enterprise directory service authentication
- Role-Based Access Control: Fine-grained permissions based on user roles and territories
- Application Privacy: Applications can be marked as private to restrict public access
- Public User Support: Anonymous access with appropriate restrictions
// Route protection example
{
path: 'admin',
component: AdminComponent,
canActivate: [AuthGuard],
data: { roles: ['ADMIN'] }
}
// HTTP interceptor for token handling
@Injectable()
export class AuthInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const token = this.authService.getToken();
if (token) {
req = req.clone({
setHeaders: { Authorization: `Bearer ${token}` }
});
}
return next.handle(req);
}
}Two secrets must be provided in production, each at least 32 characters:
# .env file
SITMUN_USER_SECRET=<32+ char random value> # backend JWT signing secret
MIDDLEWARE_SECRET=<32+ char random value> # shared backend <-> proxy secret# Generate secure random values
openssl rand -hex 32IMPORTANT for production:
MIDDLEWARE_SECRETis injected into the backend asSITMUN_PROXY_MIDDLEWARE_SECRETand into the proxy asSITMUN_BACKEND_CONFIG_SECRET; both sides must share the same value.SITMUN_USER_SECRETsigns user JWTs and is backend-only.- Startup is fail-fast:
SecuritySecretValidator(backend) andProxySecretValidator(proxy) reject blank or shorter-than-32-character secrets with anIllegalStateException, so the service never comes up misconfigured. Production compose profiles also mark the variables as required and refuse to start without them. - Never commit secrets to version control, and never reuse the development defaults.
sitmun:
user:
secret: ${SITMUN_USER_SECRET}
token-validity-in-milliseconds: 36000000
proxy-middleware:
secret: ${SITMUN_PROXY_MIDDLEWARE_SECRET}Backend CORS is configured in WebSecurityConfigurer.corsConfigurationSource(). The current policy allows credentials, all headers, OPTIONS, GET, POST, PUT, and DELETE, and uses allowedOriginPattern("*").
// Angular CSP configuration
{
"content_security_policy": {
"default-src": ["'self'"],
"script-src": ["'self'", "'unsafe-inline'"],
"style-src": ["'self'", "'unsafe-inline'"],
"img-src": ["'self'", "data:", "https:"],
"connect-src": ["'self'", "https:"]
}
}# Clean up Docker resources
docker compose down -v
docker system prune -f
docker volume prune -f
# Check service logs
docker compose logs service_name
docker compose logs -f service_nameCheck database container status:
# Check if database container is running
docker compose ps postgres # For PostgreSQL
docker compose ps oracle # For Oracle
# Check database logs
docker compose logs postgres
docker compose logs oracleVerify database connectivity from backend:
# Test network connectivity
docker compose exec backend ping postgres # For PostgreSQL
docker compose exec backend ping oracle # For Oracle
# Check backend health (includes database connection check)
curl http://localhost:9001/api/dashboard/healthPostgreSQL-specific troubleshooting:
# Connect to PostgreSQL container
docker compose exec -it postgres psql -U sitmun3 -d sitmun3
# Check PostgreSQL logs
docker compose logs postgres | grep -i error
# Verify PostgreSQL is accepting connections
docker compose exec postgres pg_isready -U sitmun3Oracle-specific troubleshooting:
# Oracle takes 60+ seconds to start on first run
docker compose logs -f oracle
# Wait for "DATABASE IS READY TO USE!" message
# Connect to Oracle container
docker compose exec -it oracle sqlplus sitmun3/sitmun3@//localhost:1521/sitmun3
# Check Oracle logs
docker compose logs oracle | grep -i error
# Verify Oracle is ready (may take time)
docker compose exec oracle sqlplus -L sitmun3/sitmun3@//localhost:1521/sitmun3 -c "SELECT 1 FROM DUAL;"Common database configuration errors:
- Wrong profile configuration: Ensure
SITMUN_DB_PROFILEandCOMPOSE_PROFILESagree on the database type (bothpostgresor bothoracle) - Incorrect DATABASE_URL format:
- PostgreSQL:
jdbc:postgresql://postgres:5432/ - Oracle:
jdbc:oracle:thin:@//oracle:1521/
- PostgreSQL:
- Database not ready: Wait for health checks to pass before starting backend
- Port conflicts: Check if ports 9003 (PostgreSQL) or 9004 (Oracle) are already in use
# Check the authenticated account using a saved login cookie
curl -b cookies.txt http://localhost:9001/api/account
# Verify user credentials
curl -X POST http://localhost:9001/api/authenticate \
-c cookies.txt \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin"}'# Clear npm cache
npm cache clean --force
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm ci
# Check Node.js version
node --version # Should be 20.19.0 or higher# Clean Gradle cache
./gradlew clean
# Check Java version
java --version # Should be 17 or higher
# Run with debug logging
./gradlew bootRun --args='--spring.profiles.active=dev --logging.level.org.sitmun=DEBUG'# Backend debug logging
export LOGGING_LEVEL_ORG_SITMUN=DEBUG
export LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_SECURITY=DEBUG
# Restart services
docker compose restart backend proxy# Angular debug mode
ng serve --configuration=development --verbose
# Check browser console for errors
# Enable source maps in browser dev tools# Increase Docker memory limits
docker compose down
docker system prune -f
docker compose up -d
# Increase Java heap size
export JAVA_OPTS="-Xmx4g -Xms2g"# Check database performance
docker compose exec postgres psql -U sitmun3 -d sitmun3 -c "SELECT * FROM pg_stat_activity;"
# Optimize database queries
# Check database indexes
# Monitor slow queries-
Fork the repository and create a feature branch
-
Follow coding standards:
- Angular: Follow Angular style guide and use conventional commits
- Spring Boot: Follow Spring Boot best practices and use conventional commits
- Use functional code with complete but terse documentation
-
Write tests for new functionality
-
Update documentation as needed
-
Ensure quality checks pass:
# Frontend npm run lint npm test npm run build -- --configuration=production # Backend ./gradlew test ./gradlew spotlessCheck ./gradlew build
-
Submit a pull request with a clear description
We use Conventional Commits for commit messages:
# Examples
git commit -m "feat(auth): add LDAP authentication support"
git commit -m "fix(api): resolve JWT token validation issue"
git commit -m "docs(readme): update installation instructions"
git commit -m "test(components): add unit tests for user component"
git commit -m "style(formatting): apply prettier formatting"Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvementsci: CI/CD changesbuild: Build system changes
- Automated Checks: All PRs must pass CI/CD pipeline
- Code Review: At least one maintainer review required
- Quality Gate: SonarCloud quality gate must pass
- Testing: All tests must pass with adequate coverage
- Documentation: Update docs for new features
- Documentation: Check component-specific README files in submodules
- Issues: GitHub Issues
- Component Issues:
- Discussions: GitHub Discussions
When reporting issues, please include:
- Environment: OS, Docker version, Node.js version, Java version
- Steps to reproduce: Clear step-by-step instructions
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Screenshots: If applicable
- Logs: Docker logs, browser console errors, application logs
- Configuration: Relevant environment variables and configuration files
- SITMUN Documentation: https://sitmun.github.io/
- SITMUN Organization: https://github.com/sitmun
- SonarCloud Quality Gates:
This project is licensed under the European Union Public Licence V. 1.2 (EUPL-1.2). The EUPL is a copyleft open-source license compatible with major open-source licenses including GPL, AGPL, MPL, and others. See the LICENSE file for the full license text.
The EUPL v1.2 is compatible with:
- GNU General Public License (GPL) v2, v3
- GNU Affero General Public License (AGPL) v3
- Mozilla Public License (MPL) v2
- Eclipse Public License (EPL) v1.0
- And many others
SITMUN is an open-source platform for territorial information management, designed to help organizations manage geographical data, services, and applications effectively.
Related Projects:
- SITMUN Backend Core - REST API and business logic
- SITMUN Proxy Middleware - Proxy and security middleware
- SITMUN Admin App - Administrative interface
- SITMUN Viewer App - Map visualization frontend
Technology Stack:
- Frontend: Angular 19, TypeScript, Angular Material, SITNA Library
- Backend: Spring Boot 3, Java 17, PostgreSQL/Oracle/H2
- Infrastructure: Docker, Docker Compose, Git Submodules
- Quality: SonarCloud, GitHub Actions, Conventional Commits
For more information, visit the SITMUN organization on GitHub.