# jhipster/jhipster-online architecture

> Architecture diagram of the GitHub repository jhipster/jhipster-online, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jhipster/jhipster-online
- Repository: https://github.com/jhipster/jhipster-online

## Overview

1. **What this repository is**
   JHipster Online is a full-stack monorepo for the `start.jhipster.tech` service. It combines a Spring Boot back end, an Angular front end, and supporting Docker/GitHub Actions infrastructure to let users generate JHipster projects without installing JHipster locally.

2. **Top-level runtime boundaries**
   The application is split into three major execution surfaces:
   - the **Spring Boot server** under `src/main/java`
   - the **Angular single-page app** under `src/main/webapp`
   - **containerized services and deployment tooling** under `src/main/docker`, `Dockerfile`, and GitHub Actions workflows

3. **Back-end layering**
   The server follows the standard JHipster layering pattern:
   - **web/rest** controllers expose HTTP APIs
   - **service** classes implement business logic
   - **repository** interfaces persist data with Spring Data/JPA
   - **domain** classes define entities, enums, and auditing models
   This separation is important for the architecture diagram because almost all business features flow through this web → service → repository → database chain.

4. **Core domain model**
   The data model centers on generator-related records rather than a generic business app:
   - `Jdl`, `JdlMetadata`, and `YoRC` store project definition inputs and metadata
   - `GeneratorIdentity` tracks a user’s saved generator configuration
   - `SubGenEvent` and `EntityStats` capture generation activity and analytics
   - `GitCompany` and `User` support external Git provider identity and local accounts
   - auditing entities such as `PersistentAuditEvent` record security/admin history

5. **Generation pipeline**
   The main product feature is the generation workflow:
   - the user submits JDL or generator settings from the Angular UI
   - REST endpoints in `GeneratorResource`, `JdlResource`, `YoRCResource`, and related controllers hand off to services
   - `GeneratorService` / `JHipsterService` orchestrate the JHipster CLI execution
   - `CiCdService`, `GitService`, `GithubService`, and `GitlabService` handle Git-related setup and publishing concerns
   The README makes clear that generation depends on an installed `jhipster` command and runs in a temporary folder on the server.

6. **External integrations**
   This repo has two major external-system boundaries:
   - **GitHub/GitLab OAuth and APIs** for connecting a user’s Git provider account, creating repos/branches/PRs, and managing bot-based automation
   - **email delivery** for account activation and password reset flows
   These are configured through Spring Boot profiles and application properties, not hard-coded.

7. **Authentication and security**
   User authentication is handled by **JWT** inside the app itself, via `security/jwt`, `SecurityConfiguration`, and related filters/configurers. Separate from that, GitHub/GitLab OAuth is used for provider authorization. Account lifecycle flows include registration, activation, password reset, and admin user management. `AuditorAware` and audit event support tie security context into persisted audit data.

8. **Front-end structure**
   The Angular client is organized by feature area:
   - `home` contains the generator, JDL studio, Git integration, and welcome pages
   - `account` contains login/register/password/activation flows
   - `admin` contains audits, logs, metrics, health, configuration, and user management
   - `entities` contains data-driven views such as statistics
   The front end talks to the server exclusively through HTTP APIs and is protected by route guards/interceptors in `core` and `blocks`.

9. **Static editor and embedded assets**
   `src/main/resources/static/jdl-studio` and the Angular `home/jdl-metadata` area indicate that JDL Studio is embedded into the app rather than hosted separately. This means the UI includes both normal admin/generator screens and a specialized schema editor for JDL definitions.

10. **Observability and operational features**
   The repository includes built-in operational endpoints and supporting services:
   - log viewing, runtime metrics, health checks, and configuration pages on the admin UI
   - Prometheus/Grafana provisioning under `src/main/docker/monitoring.yml` and `src/main/docker/grafana`
   - audit event capture and retrieval
   These features suggest the app is expected to be run as a managed service, not just as a stateless UI.

11. **Persistence and migration**
   The app uses **MySQL** as its primary database, with schema history managed by **Liquibase** changelogs under `src/main/resources/config/liquibase`. Initialization data for authorities/users also lives there, which is relevant when drawing the startup sequence: application bootstraps schema, seed data, then serves API/UI traffic.

12. **Deployment and environment model**
   The repo is designed for multiple deployment modes:
   - local dev with Maven + Yarn + MySQL
   - Docker Compose-based service stacks
   - production Docker image builds
   - Google App Engine Flexible deployment via GitHub Actions
   Profile-specific configs (`application-dev.yml`, `application-prod.yml`, `application-gcp.yml`, etc.) control these environments.

13. **Testing and quality gates**
   The codebase has strong separation between unit, integration, and front-end tests:
   - Java tests under `src/test/java`
   - Angular/Jest tests under `src/test/javascript`
   - CI workflows, Sonar config, linting, and checkstyle
   This indicates the architecture is intended to be maintained through automated validation across both back end and front end.

14. **How data flows end-to-end**
   The most important end-to-end flow is:
   browser UI → Angular feature module → REST controller → service orchestration → repository/database and/or external Git/JHipster command execution → response back to UI.
   Secondary flows include authentication/account management, audit collection, and operational monitoring, all of which are first-class subsystems rather than incidental utilities.

Main entry points: [`src/main/java/io/github/jhipster/online/web/rest`](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/web/rest) (REST API), [`src/main/java/io/github/jhipster/online/JhonlineApp.java`](https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/JhonlineApp.java) (JH Online), [`src/main/java/io/github/jhipster/online/service`](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/service) (Services), [`src/test/javascript`](https://github.com/jhipster/jhipster-online/tree/main/src/test/javascript) (JS tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Spring Boot server"]
  node_webapi["REST API<br/>web layer"]
  node_services["Services<br/>business layer"]
  node_domain[("Domain model<br/>entities")]
  node_repos[("Repositories<br/>persistence")]
  node_security["JWT security<br/>auth"]
  node_config["Server config<br/>boot config"]
  node_generator["Generation flow<br/>orchestration"]
  node_git["Git integration<br/>external integration<br/>[GitService.java]"]
  node_cicd["CI/CD flow<br/>delivery automation<br/>[CiCdService.java]"]
  node_liquibase[("Liquibase<br/>schema migration")]
end

subgraph group_frontend["Angular app"]
  node_adminui["Admin area<br/>angular feature"]
  node_homeui["Home area<br/>angular feature"]
  node_accountui["Account area<br/>angular feature"]
  node_coreui["Core UI<br/>angular core"]
  node_sharedui["Shared models<br/>angular shared"]
  node_jdlstudio["JDL studio<br/>embedded editor"]
end

subgraph group_infra["Deployment & ops"]
  node_docker["Containers<br/>runtime ops"]
  node_workflows["GitHub Actions<br/>ci workflows<br/>[workflows]"]
end

subgraph group_tests["Validation"]
  node_tests_backend["Java tests<br/>backend tests"]
  node_tests_frontend["JS tests<br/>frontend tests"]
end

node_app(("JH Online<br/>monorepo app<br/>[JhonlineApp.java]"))

node_app -->|"serves"| node_webapi
node_app -->|"uses"| node_services
node_app -->|"protects"| node_security
node_app -->|"loads"| node_config
node_webapi -->|"calls"| node_services
node_services -->|"persists"| node_repos
node_repos -->|"maps"| node_domain
node_services -->|"transforms"| node_domain
node_config -->|"migrates"| node_liquibase
node_security -->|"loads users"| node_repos
node_generator -->|"publishes"| node_git
node_generator -->|"configures"| node_cicd
node_webapi -->|"triggers"| node_generator
node_webapi -->|"exposes"| node_git
node_webapi -->|"exposes"| node_cicd
node_homeui -->|"embeds"| node_jdlstudio
node_homeui -->|"uses"| node_coreui
node_accountui -->|"uses"| node_coreui
node_adminui -->|"uses"| node_sharedui
node_homeui -->|"uses"| node_sharedui
node_tests_backend -.->|"verifies"| node_services
node_tests_backend -.->|"verifies"| node_webapi
node_tests_frontend -.->|"verifies"| node_homeui
node_tests_frontend -.->|"verifies"| node_accountui
node_tests_frontend -.->|"verifies"| node_adminui
node_tests_frontend -.->|"verifies"| node_coreui
node_docker -->|"packages"| node_app
node_workflows -->|"builds"| node_docker
node_workflows -->|"tests"| node_app

click node_app "https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/JhonlineApp.java"
click node_webapi "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/web/rest"
click node_services "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/service"
click node_domain "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/domain"
click node_repos "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/repository"
click node_security "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/security"
click node_config "https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/config"
click node_generator "https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/GeneratorService.java"
click node_git "https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/GitService.java"
click node_cicd "https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/CiCdService.java"
click node_adminui "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/admin"
click node_homeui "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/home"
click node_accountui "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/account"
click node_coreui "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/core"
click node_sharedui "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/shared"
click node_jdlstudio "https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/home/jdl-metadata"
click node_docker "https://github.com/jhipster/jhipster-online/tree/main/src/main/docker"
click node_workflows "https://github.com/jhipster/jhipster-online/blob/main/.github/workflows"
click node_liquibase "https://github.com/jhipster/jhipster-online/tree/main/src/main/resources/config/liquibase"
click node_tests_backend "https://github.com/jhipster/jhipster-online/tree/main/src/test/java"
click node_tests_frontend "https://github.com/jhipster/jhipster-online/tree/main/src/test/javascript"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapi,node_services,node_domain,node_repos,node_security,node_config,node_generator,node_git,node_cicd,node_liquibase toneBlue
class node_adminui,node_homeui,node_accountui,node_coreui,node_sharedui,node_jdlstudio toneAmber
class node_docker,node_workflows toneMint
class node_tests_backend,node_tests_frontend toneRose
class node_app toneNeutral
```

## Components

### Spring Boot server

HTTP API, business logic, persistence, security, and domain model.

- [REST API](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/web/rest): web layer · Entry points for generator, JDL, Git, account, audit, stats, and admin operations. · `src/main/java/io/github/jhipster/online/web/rest`
- [Services](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/service): business layer · Orchestrates generation, Git integrations, user/account flows, mail, logs, and metrics. · `src/main/java/io/github/jhipster/online/service`
- [Domain model](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/domain): entities · Generator records, users, audit events, Git provider metadata, and statistics. · `src/main/java/io/github/jhipster/online/domain`
- [Repositories](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/repository): persistence · Spring Data/JPA access to generator, user, audit, and stats storage. · `src/main/java/io/github/jhipster/online/repository`
- [JWT security](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/security): auth · JWT filters, token provider, user details, and security configuration. · `src/main/java/io/github/jhipster/online/security`
- [Server config](https://github.com/jhipster/jhipster-online/tree/main/src/main/java/io/github/jhipster/online/config): boot config · Liquibase, database, async, cache, logging, web, locale, and audit wiring. · `src/main/java/io/github/jhipster/online/config`
- [Generation flow](https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/GeneratorService.java): orchestration · GeneratorService and JHipsterService run the CLI and manage temp workspaces. · `src/main/java/io/github/jhipster/online/service/GeneratorService.java`
- [Git integration](https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/GitService.java): external integration · GitService plus GitHub and GitLab support for repo setup and publishing. · `src/main/java/io/github/jhipster/online/service/GitService.java`
- [CI/CD flow](https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/service/CiCdService.java): delivery automation · CiCdService coordinates build and deployment metadata for generated projects. · `src/main/java/io/github/jhipster/online/service/CiCdService.java`
- [Liquibase](https://github.com/jhipster/jhipster-online/tree/main/src/main/resources/config/liquibase): schema migration · Database changelogs and seed data for schema and initial users. · `src/main/resources/config/liquibase`

### Angular app

Client-side feature areas, shared auth, and embedded editors.

- [Admin area](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/admin): angular feature · Audits, health, logs, metrics, configuration, and user management screens. · `src/main/webapp/app/admin`
- [Home area](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/home): angular feature · Generator, JDL studio, Git connection, welcome, and saved generators. · `src/main/webapp/app/home`
- [Account area](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/account): angular feature · Login, registration, activation, password reset, and settings flows. · `src/main/webapp/app/account`
- [Core UI](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/core): angular core · Auth services, Git provider models, login modal, and route access guards. · `src/main/webapp/app/core`
- [Shared models](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/shared): angular shared · Shared API models, interceptors, constants, alerts, and utilities. · `src/main/webapp/app/shared`
- [JDL studio](https://github.com/jhipster/jhipster-online/tree/main/src/main/webapp/app/home/jdl-metadata): embedded editor · Embedded JDL Studio assets and metadata editor for generator definitions. · `src/main/webapp/app/home/jdl-metadata`

### Deployment & ops

Containers, cloud deployment, monitoring, and build workflows.

- [Containers](https://github.com/jhipster/jhipster-online/tree/main/src/main/docker): runtime ops · Dockerfile and compose files for app, MySQL, mail, monitoring, and Sonar. · `src/main/docker`
- [GitHub Actions](https://github.com/jhipster/jhipster-online/blob/main/.github/workflows): ci workflows · Build, docker, deploy, copyright, and release automation. · `.github/workflows`

### Validation

Back-end and front-end test suites.

- [Java tests](https://github.com/jhipster/jhipster-online/tree/main/src/test/java): backend tests · Unit and integration tests for services, security, repositories, and REST APIs. · `src/test/java`
- [JS tests](https://github.com/jhipster/jhipster-online/tree/main/src/test/javascript): frontend tests · Jest specs for Angular components, services, and route behavior. · `src/test/javascript`

### Other components

- [JH Online](https://github.com/jhipster/jhipster-online/blob/main/src/main/java/io/github/jhipster/online/JhonlineApp.java): monorepo app · Spring Boot plus Angular service for generating JHipster projects. · `src/main/java/io/github/jhipster/online/JhonlineApp.java`

## Connections

- JH Online → REST API: serves · Bootstraps and exposes HTTP endpoints.
- JH Online → Services: uses · Application runtime wires business services.
- JH Online → JWT security: protects · Security filters and configuration guard requests.
- JH Online → Server config: loads · Core Spring Boot configuration.
- REST API → Services: calls · Controllers delegate to business logic.
- Services → Repositories: persists · Services read and write stored records.
- Repositories → Domain model: maps · Repositories operate on entity classes.
- Services → Domain model: transforms · Domain objects and DTOs flow through services.
- Server config → Liquibase: migrates · Startup applies schema and seed changelogs.
- JWT security → Repositories: loads users · JWT and user detail services resolve accounts.
- Generation flow → Git integration: publishes · Generation flow hands off Git setup and repo operations.
- Generation flow → CI/CD flow: configures · Generation flow prepares CI/CD details.
- REST API → Generation flow: triggers · Generator-related REST resources start project creation.
- REST API → Git integration: exposes · Git resources manage provider connections and callbacks.
- REST API → CI/CD flow: exposes · CI/CD endpoints surface automation settings.
- Home area → JDL studio: embeds · Home screens include the JDL editor experience.
- Home area → Core UI: uses · Home feature relies on auth and Git provider services.
- Account area → Core UI: uses · Account screens reuse auth services and guards.
- Admin area → Shared models: uses · Admin screens consume shared API and UI utilities.
- Home area → Shared models: uses · Generator and Git screens share models and interceptors.
- Java tests → Services: verifies · Backend tests cover orchestration and domain behavior.
- Java tests → REST API: verifies · Integration tests cover REST endpoints.
- JS tests → Home area: verifies · Jest specs validate generator and home feature flows.
- JS tests → Account area: verifies · Jest specs validate account flows and guards.
- JS tests → Admin area: verifies · Jest specs validate admin screens and services.
- JS tests → Core UI: verifies · Jest specs validate shared auth and user services.
- Containers → JH Online: packages · Container files build and run the application stack.
- GitHub Actions → Containers: builds · CI workflows build and deploy container images.
- GitHub Actions → JH Online: tests · Automation validates the full application.
