# cihanelias/mwf-projekterfassung architecture

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

- Interactive diagram: https://gitdiagram.com/cihanelias/mwf-projekterfassung
- Repository: https://github.com/cihanelias/mwf-projekterfassung

## Overview

Projekterfassung is a project-planning and time-tracking web application. Users sign in, then manage projects, milestones, work packages and recorded effort; the UI also presents due-date dashboards, calendar events and plan-versus-actual evaluation. Angular services call the Express REST API, whose domain services use PostgreSQL-backed repositories. OAuth/OIDC and guest login are documented capabilities. Several domain handlers and views were not sampled, so their internal links are omitted; unsampled README capabilities remain represented as subsystem nodes.

Main entry points: [`projekterfassung-backend/src/routes`](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/routes) (API routes), [`projekterfassung-backend/src/db/data-source.ts`](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/db/data-source.ts) (Postgres connection), [`projekterfassung-backend/src/controllers/auth.controller.ts`](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/controllers/auth.controller.ts) (Auth controller), [`projekterfassung-backend/src/services`](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/services) (Domain services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular application"]
  node_angular["Angular app<br/>[app.ts]"]
  node_routes_ui["App routes<br/>[app.routes.ts]"]
  node_views["Project views"]
  node_auth_ui["Auth service<br/>[auth.service.ts]"]
  node_project_data["Project data"]
  node_api_client["REST client"]
end

subgraph group_backend["REST backend"]
  node_backend_app["Express app<br/>[app.ts]"]
  node_api_routes["API routes"]
  node_controllers["Request controllers"]
  node_auth_controller["Auth controller<br/>[auth.controller.ts]"]
end

subgraph group_domain["Project domain"]
  node_domain_services["Domain services"]
  node_calendar_service["Calendar and due dates<br/>[termine.service.ts]"]
  node_domain_models["Project entities"]
  node_calendar_dto["Calendar event DTO"]
end

subgraph group_persistence["Persistence"]
  node_repositories["Domain repositories"]
  node_work_repo["Work package repository"]
  node_data_source[("Postgres connection<br/>[data-source.ts]")]
end

subgraph group_identity["Identity"]
  node_google_oidc["Google OIDC helpers<br/>[google.oidc.ts]"]
end

node_user(("Project user"))
node_google(("Google identity"))

node_user -->|"uses"| node_angular
node_angular -->|"routes through"| node_routes_ui
node_routes_ui -->|"selects"| node_views
node_auth_ui -->|"requests identity"| node_api_client
node_project_data -->|"requests project data"| node_api_client
node_api_client -->|"calls REST API"| node_api_routes
node_backend_app -->|"mounts"| node_api_routes
node_api_routes -->|"dispatches"| node_controllers
node_api_routes -->|"dispatches"| node_auth_controller
node_controllers -.->|"delegates to"| node_domain_services
node_auth_controller -.->|"starts login via"| node_google_oidc
node_auth_controller -->|"loads user repository"| node_data_source
node_google_oidc -->|"OIDC exchange"| node_google
node_domain_services -.->|"uses"| node_repositories
node_calendar_service -->|"loads owner data"| node_repositories
node_calendar_service -->|"produces events"| node_calendar_dto
node_repositories -.->|"query store"| node_data_source
node_work_repo -->|"gets entity repository"| node_data_source
node_data_source -->|"registers entities"| node_domain_models
node_domain_services -.->|"manages records"| node_domain_models

click node_angular "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/app.ts"
click node_routes_ui "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/app.routes.ts"
click node_views "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-frontend/src/app/views"
click node_auth_ui "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/auth.service.ts"
click node_project_data "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/project-data.service.ts"
click node_api_client "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/project-api.service.ts"
click node_backend_app "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/app.ts"
click node_api_routes "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/routes"
click node_controllers "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/controllers"
click node_auth_controller "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/controllers/auth.controller.ts"
click node_domain_services "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/services"
click node_calendar_service "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/services/termine.service.ts"
click node_domain_models "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/entities"
click node_calendar_dto "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/models/dto/calendar-event.dto.ts"
click node_repositories "https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/repositories"
click node_work_repo "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/repositories/arbeitspaket.repository.ts"
click node_data_source "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/db/data-source.ts"
click node_google_oidc "https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/auth/google.oidc.ts"

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_angular,node_routes_ui,node_views,node_auth_ui,node_project_data,node_api_client,node_user toneBlue
class node_backend_app,node_api_routes,node_controllers,node_auth_controller toneAmber
class node_domain_services,node_calendar_service,node_domain_models,node_calendar_dto toneMint
class node_repositories,node_work_repo,node_data_source toneRose
class node_google_oidc,node_google toneIndigo
```

## Components

### Angular application

- [Angular app](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/app.ts): `projekterfassung-frontend/src/app/app.ts`
- [App routes](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/app.routes.ts): `projekterfassung-frontend/src/app/app.routes.ts`
- [Project views](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-frontend/src/app/views): `projekterfassung-frontend/src/app/views`
- [Auth service](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/auth.service.ts): `projekterfassung-frontend/src/app/services/auth.service.ts`
- [Project data](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/project-data.service.ts): `projekterfassung-frontend/src/app/services/project-data.service.ts`
- [REST client](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-frontend/src/app/services/project-api.service.ts): `projekterfassung-frontend/src/app/services/project-api.service.ts`

### REST backend

- [Express app](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/app.ts): `projekterfassung-backend/src/app.ts`
- [API routes](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/routes): `projekterfassung-backend/src/routes`
- [Request controllers](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/controllers): `projekterfassung-backend/src/controllers`
- [Auth controller](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/controllers/auth.controller.ts): `projekterfassung-backend/src/controllers/auth.controller.ts`

### Project domain

- [Domain services](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/services): `projekterfassung-backend/src/services`
- [Calendar and due dates](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/services/termine.service.ts): `projekterfassung-backend/src/services/termine.service.ts`
- [Project entities](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/entities): `projekterfassung-backend/src/entities`
- [Calendar event DTO](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/models/dto/calendar-event.dto.ts): `projekterfassung-backend/src/models/dto/calendar-event.dto.ts`

### Persistence

- [Domain repositories](https://github.com/cihanelias/mwf-projekterfassung/tree/main/projekterfassung-backend/src/repositories): `projekterfassung-backend/src/repositories`
- [Work package repository](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/repositories/arbeitspaket.repository.ts): `projekterfassung-backend/src/repositories/arbeitspaket.repository.ts`
- [Postgres connection](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/db/data-source.ts): `projekterfassung-backend/src/db/data-source.ts`

### Identity

- [Google OIDC helpers](https://github.com/cihanelias/mwf-projekterfassung/blob/main/projekterfassung-backend/src/auth/google.oidc.ts): `projekterfassung-backend/src/auth/google.oidc.ts`

### Other components

- **Project user**
- **Google identity**

## Connections

- Project user → Angular app: uses (evidence: `README.md`)
- Angular app → App routes: routes through (evidence: `projekterfassung-frontend/src/app/app.routes.ts`)
- App routes → Project views: selects (evidence: `projekterfassung-frontend/src/app/app.routes.ts`)
- Auth service → REST client: requests identity (evidence: `projekterfassung-frontend/src/app/services/auth.service.ts`)
- Project data → REST client: requests project data (evidence: `projekterfassung-frontend/src/app/services/project-data.service.ts`)
- REST client → API routes: calls REST API (evidence: `README.md`)
- Express app → API routes: mounts (evidence: `projekterfassung-backend/src/app.ts`)
- API routes → Request controllers: dispatches (evidence: `projekterfassung-backend/src/routes/arbeitspaket.routes.ts`)
- API routes → Auth controller: dispatches (evidence: `projekterfassung-backend/src/routes/auth.routes.ts`)
- Request controllers → Domain services: delegates to (evidence: `projekterfassung-backend/src/controllers/auth.controller.ts`)
- Auth controller → Google OIDC helpers: starts login via
- Auth controller → Postgres connection: loads user repository (evidence: `projekterfassung-backend/src/controllers/auth.controller.ts`)
- Google OIDC helpers → Google identity: OIDC exchange
- Domain services → Domain repositories: uses (evidence: `projekterfassung-backend/src/services/termine.service.ts`)
- Calendar and due dates → Domain repositories: loads owner data (evidence: `projekterfassung-backend/src/services/termine.service.ts`)
- Calendar and due dates → Calendar event DTO: produces events (evidence: `projekterfassung-backend/src/services/termine.service.ts`)
- Domain repositories → Postgres connection: query store (evidence: `projekterfassung-backend/src/repositories/arbeitspaket.repository.ts`)
- Work package repository → Postgres connection: gets entity repository (evidence: `projekterfassung-backend/src/repositories/arbeitspaket.repository.ts`)
- Postgres connection → Project entities: registers entities (evidence: `projekterfassung-backend/src/db/data-source.ts`)
- Domain services → Project entities: manages records (evidence: `projekterfassung-backend/src/services/auth.service.ts`)
