/todo-spring-react

An educational TODO application with a full-stack setup featuring React for the frontend, Java 21 and Spring Boot for the backend, Kubernetes for orchestration, PostgreSQL as the database, the Grafana observability stack, and KeyCloak for authentication and authorization.

Primary LanguageJava

Project: TODO App

High level architecture

Alt

Data Model

erDiagram
  MUser ||--o{ Activity : creates
  Activity ||--o{ Media : associates
  Activity ||--o{ Label_Activity : associates
  MUser ||--o{ Label: owns
  Label ||--o{ Label_Activity : associates

  MUser {
      bigint id PK
      uuid public_id UK
      text full_name
      text mail
      timestamptz created_at
      timestamptz updated_at
  }
  Activity {
    bigint id PK
    uuid public_id UK
    text name
    text description
    text type
    text status
    text state
    text[] tags
    jsonb extra_data
    bigint muser_id FK
    timestamptz created_at
    timestamptz updated_at
  }
  
  Label {
    bigint id PK
    uuid public_id UK
    text name
    text description
    bigint muser_id FK
    timestamptz created_at
    timestamptz updated_at
  }

  Media {
    bigint id PK
    uuid public_id UK
    bigint activity_id FK
    text name
    text type
    text uri
    text description
    json extra_data
    timestamptz created_at
    timestamptz updated_at
  }
  Label_Activity {
    bigint id PK
    bigint label_id FK
    bigint activity_id FK
    timestamptz created_at
    timestamptz updated_at
  }
Loading

Stack

Activity Service

  • Java 19
  • Go (Improver job service)
  • Spring Boot
  • Spring RestDocs
  • Micrometer
  • Zipkin
  • Loki4j
  • Pyroscope
  • Slf4j
  • Maven
  • GSon
  • JJWT

Identity Management

  • KeyCloak (SSO)
    • OpenID Connect

Database

  • Postgress

API Documentation

  • Asciidoctor

Infra

  • Nginx
  • Docker

Testing

  • Junit 5 (Unit)
  • TestContainers (Integration)
  • Gatling (Performance)

Observability

(metrics, logs, traces, continuous profiling)

  • Prometheus
  • Grafana
  • Loki
  • Tempo
  • Pyroscope
  • Postgres-exporter

Web Client

  • React
  • W3.CSS
  • Babel
  • Webpack
  • Axios

Deployment

Requirements

  • Kubernetes
  • Skaffold

Steps

  • Building
cd manifests
skaffold build
  • Starting the enviroment
cd manifests
skaffold run
  • Runing integration tests
cd test
.\mvnw surefire:test
  • Runing performance tests
cd .\performance\gatling\
.\mvnw gatling:test 
  • Generating the API Documentation
cd .\todo-svc
.\mvnw package

Local environment information