mosenioring/back001/README.md
2026-01-09 19:47:24 +01:00

1.3 KiB

Mosenioring Backend

Production-ready Kotlin/Spring Boot 3 modular monolith skeleton for patient-caregiver-doctor coordination.

Requirements

  • Java 21
  • Docker + Docker Compose

Local Dev

  1. Start dependencies:
docker compose up -d
  1. Run the API (JWT resource server):
./gradlew :app:bootRun -Dspring.profiles.active=local
  1. Run the worker:
./gradlew :workers:notification-worker:bootRun

Auth

  • The backend is a JWT resource server and does not handle user passwords.
  • Local auth shortcut is available only when SPRING_PROFILES_ACTIVE=local and ALLOW_LOCAL_AUTH=true.

Local headers (dev only):

  • X-Local-Email: user id/email
  • X-Local-Roles: comma-separated roles (ADMIN, DOCTOR, CAREGIVER)
  • X-Tenant-Id: tenant id

OpenAPI

Health

Key services

Notes

  • Tenant ID is enforced via TenantFilter using JWT claim tenant_id, or X-Tenant-Id header (local).
  • Medication plan creation publishes a MedicationPlanCreated outbox event.
  • Worker consumes and emits NotificationRequested events with idempotency via Redis.