Architecture
Hoggar starts as a modular monolith: a single Spring Boot backend with clear module boundaries, so that selected components can become independent services later — only if justified. Do not start with microservices.
Planned No application code exists yet. This section describes the selected target architecture.
The choices below were recorded as selected in PROJECT_CONTEXT.md §3–7 and
§23–26 (migrated here on 2026-10-03). Their ADRs are not yet written
(ADR candidates).
Technology choices
| Area | Choice |
|---|---|
| Backend | Java + Spring Boot (Web, Security, Data JPA / Hibernate, Jakarta Validation), Maven |
| API | REST + OpenAPI |
| Database | PostgreSQL + PostGIS, schema versioned with Flyway |
| Frontend (Phase 1) | Angular + TypeScript, responsive PWA |
| Mobile (Phase 2) | React Native + TypeScript, potentially Expo |
- Do not introduce NestJS or Python as primary backend technologies. Python may be added later for a concrete ML, geospatial, data-processing or library-specific requirement.
- Schema changes must be versioned with Flyway.
- The Phase 1 PWA consumes the Spring Boot REST/OpenAPI API; the Phase 2 native application consumes the same API.
- Where the Angular application lives:
PROJECT_CONTEXT.md§12 recorded "not yet decided"; hoggar-ai decision D7 (recorded 2026-10-02) selects a separate repository, tentativelyhoggar-app, withhoggar-webremaining the landing page. The standing of the 2026-10-02 decision records is pending (PD-028). The repository does not exist.
Data
PostgreSQL with PostGIS is the primary database. Expected geospatial data includes routes, tracks, GPX points, points of interest, geographic zones and terrain-related information, with proximity searches and spatial queries.
Intentionally deferred
| Item | Rule |
|---|---|
| Microservices | Not initially; extract modules only if justified |
| Kafka | Not part of the initial architecture; only for concrete event-driven, high-throughput or multi-consumer requirements |
| Kubernetes | Not part of the initial deployment; keep applications containerized and portable so it stays a future option |
| Artifactory / Nexus | Not without a concrete requirement; GitLab Container and Package Registries are the initial strategy |
| Large observability stack | Start with health checks, structured logs to stdout/stderr, request/correlation IDs and Spring Boot Actuator; OpenTelemetry, Prometheus, Grafana, Loki or Sentry possibly later |
In this section
- Architecture overview — the target architecture diagram.
- Decision Records (ADRs) — why each decision was made.