# mfro200/ihk_ap2_fiae architecture

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

- Interactive diagram: https://gitdiagram.com/mfro200/ihk_ap2_fiae
- Repository: https://github.com/mfro200/ihk_ap2_fiae

## Overview

This is a Vue/NestJS application for studying IHK FIAE exams: users browse exam documents and OCR findings, enter solutions, request AI scoring, and review training or psychological analyses. The backend exposes domain APIs backed by Prisma, while PDFs and uploaded answer media are stored as files. The README documents broader capabilities such as full-text search, versioning, and WISO practice; those are represented even where their implementation was not sampled. Some frontend-to-API wiring and unsampled service internals remain unverified.

Main entry points: [`frontend/src/router/index.ts`](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/router/index.ts) (Page routing), [`backend/src/dokumente/dokumente.controller.ts`](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/dokumente/dokumente.controller.ts) (Exam and document API), [`frontend/src/services/api.ts`](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/services/api.ts) (HTTP API client), [`backend/src/app.module.ts`](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/app.module.ts) (Backend module registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Study interface"]
  node_app["Application shell<br/>[App.vue]"]
  node_routes["Page routing<br/>[index.ts]"]
  node_exam_views["Exam browsing<br/>[PruefungenView.vue]"]
  node_pdf_view["PDF viewer<br/>[PdfViewerView.vue]"]
  node_search_views["Search and terms"]
  node_answer_view["Solution editor"]
  node_score_view["Scoring interface<br/>[BewertungView.vue]"]
  node_training_view["Training plan"]
  node_psycho_view["Psychological profile"]
  node_api_client["HTTP API client<br/>[api.ts]"]
end

subgraph group_exam["Exam content"]
  node_exam_api["Exam and document API"]
  node_exam_records["Exam records"]
  node_pdf_files["PDF storage"]
  node_pdf_versions["PDF versioning"]
  node_ocr_search["OCR full-text search<br/>[seiten.service.ts]"]
  node_terms["Score terms"]
  node_hits["Exam term hits<br/>[treffer.service.ts]"]
end

subgraph group_practice["Practice and assessment"]
  node_answers["Answers and uploads"]
  node_ai_scoring["AI scoring and extraction"]
  node_wiso["WISO practice"]
end

subgraph group_analysis["Learning analysis"]
  node_dashboard["Progress dashboard<br/>[DashboardView.vue]"]
  node_psycho_service["Psychological analysis"]
end

subgraph group_data["Persistence"]
  node_prisma["Database access<br/>[prisma.service.ts]"]
  node_database[("PostgreSQL")]
  node_backend_modules["Backend module registry<br/>[app.module.ts]"]
end

node_learner(("Learner"))
node_llm{{"AI providers"}}

node_learner -->|"uses"| node_app
node_app -->|"loads routes"| node_routes
node_routes -->|"routes to"| node_exam_views
node_routes -->|"routes to"| node_pdf_view
node_routes -->|"routes to"| node_search_views
node_routes -->|"routes to"| node_answer_view
node_routes -->|"routes to"| node_score_view
node_routes -->|"routes to"| node_training_view
node_routes -->|"routes to"| node_psycho_view
node_exam_views -.->|"requests data"| node_api_client
node_pdf_view -.->|"requests PDF"| node_api_client
node_search_views -.->|"requests search"| node_api_client
node_answer_view -.->|"saves answers"| node_api_client
node_score_view -.->|"requests scoring"| node_api_client
node_training_view -.->|"requests progress"| node_api_client
node_psycho_view -.->|"requests profile"| node_api_client
node_api_client -.->|"calls REST API"| node_exam_api
node_exam_api -->|"streams and writes"| node_pdf_files
node_exam_api -.->|"loads exams"| node_exam_records
node_exam_api -.->|"manages versions"| node_pdf_versions
node_exam_api -.->|"serves OCR search"| node_ocr_search
node_exam_api -.->|"serves term search"| node_terms
node_exam_api -.->|"serves hit statistics"| node_hits
node_answer_view -.->|"supports practice"| node_wiso
node_answer_view -.->|"stores solutions"| node_answers
node_answers -->|"reads and writes"| node_prisma
node_score_view -.->|"requests evaluation"| node_ai_scoring
node_ai_scoring -.->|"calls providers"| node_llm
node_ai_scoring -.->|"loads and stores scores"| node_prisma
node_psycho_view -.->|"requests analysis"| node_psycho_service
node_psycho_service -->|"reads learning data"| node_prisma
node_dashboard -.->|"loads statistics"| node_api_client
node_prisma -.->|"queries"| node_database
node_backend_modules -->|"registers module"| node_exam_api
node_backend_modules -->|"registers module"| node_answers
node_backend_modules -->|"registers module"| node_ai_scoring
node_backend_modules -->|"registers module"| node_psycho_service
node_backend_modules -->|"registers module"| node_prisma

click node_app "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/App.vue"
click node_routes "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/router/index.ts"
click node_exam_views "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungenView.vue"
click node_pdf_view "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PdfViewerView.vue"
click node_search_views "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/VolltextSucheView.vue"
click node_answer_view "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungBearbeitenView.vue"
click node_score_view "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/BewertungView.vue"
click node_training_view "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/TrainingsplanView.vue"
click node_psycho_view "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PsychoAnalyseView.vue"
click node_api_client "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/services/api.ts"
click node_exam_api "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/dokumente/dokumente.controller.ts"
click node_exam_records "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/pruefungen/pruefungen.service.ts"
click node_pdf_files "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/dokumente/dokumente.controller.ts"
click node_pdf_versions "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/versionen/versionen.controller.ts"
click node_ocr_search "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/seiten/seiten.service.ts"
click node_terms "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/suchbegriffe/suchbegriffe.service.ts"
click node_hits "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/treffer/treffer.service.ts"
click node_answers "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/antworten/antworten.service.ts"
click node_ai_scoring "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/bewertung/bewertung.service.ts"
click node_wiso "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungsbereichView.vue"
click node_dashboard "https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/DashboardView.vue"
click node_psycho_service "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/psycho-analyse/psycho-analyse.service.ts"
click node_prisma "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/prisma/prisma.service.ts"
click node_backend_modules "https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/app.module.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_app,node_routes,node_exam_views,node_pdf_view,node_search_views,node_answer_view,node_score_view,node_training_view,node_psycho_view,node_api_client toneBlue
class node_exam_api,node_exam_records,node_pdf_files,node_pdf_versions,node_ocr_search,node_terms,node_hits toneAmber
class node_answers,node_ai_scoring,node_wiso toneMint
class node_dashboard,node_psycho_service toneRose
class node_prisma,node_database,node_backend_modules,node_learner,node_llm toneIndigo
```

## Components

### Study interface

- [Application shell](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/App.vue): `frontend/src/App.vue`
- [Page routing](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/router/index.ts): `frontend/src/router/index.ts`
- [Exam browsing](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungenView.vue): `frontend/src/views/PruefungenView.vue`
- [PDF viewer](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PdfViewerView.vue): `frontend/src/views/PdfViewerView.vue`
- [Search and terms](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/VolltextSucheView.vue): `frontend/src/views/VolltextSucheView.vue`
- [Solution editor](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungBearbeitenView.vue): `frontend/src/views/PruefungBearbeitenView.vue`
- [Scoring interface](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/BewertungView.vue): `frontend/src/views/BewertungView.vue`
- [Training plan](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/TrainingsplanView.vue): `frontend/src/views/TrainingsplanView.vue`
- [Psychological profile](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PsychoAnalyseView.vue): `frontend/src/views/PsychoAnalyseView.vue`
- [HTTP API client](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Exam content

- [Exam and document API](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/dokumente/dokumente.controller.ts): `backend/src/dokumente/dokumente.controller.ts`
- [Exam records](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/pruefungen/pruefungen.service.ts): `backend/src/pruefungen/pruefungen.service.ts`
- [PDF storage](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/dokumente/dokumente.controller.ts): `backend/src/dokumente/dokumente.controller.ts`
- [PDF versioning](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/versionen/versionen.controller.ts): `backend/src/versionen/versionen.controller.ts`
- [OCR full-text search](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/seiten/seiten.service.ts): `backend/src/seiten/seiten.service.ts`
- [Score terms](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/suchbegriffe/suchbegriffe.service.ts): `backend/src/suchbegriffe/suchbegriffe.service.ts`
- [Exam term hits](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/treffer/treffer.service.ts): `backend/src/treffer/treffer.service.ts`

### Practice and assessment

- [Answers and uploads](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/antworten/antworten.service.ts): `backend/src/antworten/antworten.service.ts`
- [AI scoring and extraction](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/bewertung/bewertung.service.ts): `backend/src/bewertung/bewertung.service.ts`
- [WISO practice](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/PruefungsbereichView.vue): `frontend/src/views/PruefungsbereichView.vue`

### Learning analysis

- [Progress dashboard](https://github.com/mfro200/ihk_ap2_fiae/blob/master/frontend/src/views/DashboardView.vue): `frontend/src/views/DashboardView.vue`
- [Psychological analysis](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/psycho-analyse/psycho-analyse.service.ts): `backend/src/psycho-analyse/psycho-analyse.service.ts`

### Persistence

- [Database access](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/prisma/prisma.service.ts): `backend/src/prisma/prisma.service.ts`
- **PostgreSQL**
- [Backend module registry](https://github.com/mfro200/ihk_ap2_fiae/blob/master/backend/src/app.module.ts): `backend/src/app.module.ts`

### Other components

- **Learner**
- **AI providers**

## Connections

- Learner → Application shell: uses
- Application shell → Page routing: loads routes (evidence: `frontend/src/App.vue`)
- Page routing → Exam browsing: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → PDF viewer: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → Search and terms: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → Solution editor: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → Scoring interface: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → Training plan: routes to (evidence: `frontend/src/router/index.ts`)
- Page routing → Psychological profile: routes to (evidence: `frontend/src/router/index.ts`)
- Exam browsing → HTTP API client: requests data
- PDF viewer → HTTP API client: requests PDF
- Search and terms → HTTP API client: requests search
- Solution editor → HTTP API client: saves answers
- Scoring interface → HTTP API client: requests scoring
- Training plan → HTTP API client: requests progress
- Psychological profile → HTTP API client: requests profile
- HTTP API client → Exam and document API: calls REST API
- Exam and document API → PDF storage: streams and writes (evidence: `backend/src/dokumente/dokumente.controller.ts`)
- Exam and document API → Exam records: loads exams
- Exam and document API → PDF versioning: manages versions
- Exam and document API → OCR full-text search: serves OCR search
- Exam and document API → Score terms: serves term search
- Exam and document API → Exam term hits: serves hit statistics
- Solution editor → WISO practice: supports practice
- Solution editor → Answers and uploads: stores solutions
- Answers and uploads → Database access: reads and writes (evidence: `backend/src/antworten/antworten.service.ts`)
- Scoring interface → AI scoring and extraction: requests evaluation
- AI scoring and extraction → AI providers: calls providers
- AI scoring and extraction → Database access: loads and stores scores (evidence: `backend/src/bewertung/bewertung.service.ts`)
- Psychological profile → Psychological analysis: requests analysis
- Psychological analysis → Database access: reads learning data (evidence: `backend/src/psycho-analyse/psycho-analyse.service.ts`)
- Progress dashboard → HTTP API client: loads statistics
- Database access → PostgreSQL: queries
- Backend module registry → Exam and document API: registers module (evidence: `backend/src/app.module.ts`)
- Backend module registry → Answers and uploads: registers module (evidence: `backend/src/app.module.ts`)
- Backend module registry → AI scoring and extraction: registers module (evidence: `backend/src/app.module.ts`)
- Backend module registry → Psychological analysis: registers module (evidence: `backend/src/app.module.ts`)
- Backend module registry → Database access: registers module (evidence: `backend/src/app.module.ts`)
