# dancs-kornel/regexpath architecture

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

- Interactive diagram: https://gitdiagram.com/dancs-kornel/regexpath
- Repository: https://github.com/dancs-kornel/regexpath

## Overview

RegExPath is a web-based platform for learning regular expressions and XPath, with structured lessons and teacher-led group assignments. Learners enter through the Angular application, explore sandboxes or lessons, and can submit exercise answers for validation; teachers manage groups and assignments and review progress and statistics. The backend separates HTTP controllers, application use cases/services, domain repositories, and persistence. The README documents several capabilities whose individual frontend files are not in the supplied tree; those branches are represented at their listed backend source paths. Connections are limited where sampled source does not show the caller.

Main entry points: [`webapp/src/app/app.routes.ts`](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/app.routes.ts) (Feature routes), [`server/src/main/java/hu/kornel/server/application/service/ExerciseValidationService.java`](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/ExerciseValidationService.java) (Exercise validation), [`webapp/src/main.ts`](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/main.ts) (Angular app), [`webapp/src/app/core/services/auth.service.ts`](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/core/services/auth.service.ts) (Auth client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Angular app<br/>[main.ts]"]
  node_routes["Feature routes<br/>[app.routes.ts]"]
  node_authclient["Auth client<br/>[auth.service.ts]"]
end

subgraph group_learning["Learning features"]
  node_xpathui["XPath evaluator"]
  node_lessons["Lessons and progress"]
  node_exercises["Exercise validation"]
  node_xpathvalidate["XPath validation"]
  node_regexparse["Regex parsing"]
  node_sandbox["Saved sandbox content"]
end

subgraph group_teaching["Teaching features"]
  node_groups["Group management"]
  node_assignments["Assignment workflows"]
  node_assignmentcases["Assignment use cases"]
  node_analytics["Progress analytics"]
end

subgraph group_backend["Backend services"]
  node_authapi["Authentication"]
  node_validationapi["Validation endpoint"]
end

subgraph group_storage["Persistence"]
  node_database[("PostgreSQL")]
  node_assignmentstore[("Assignment persistence")]
  node_contentstore[("Content persistence")]
end

node_learner(("Learner"))
node_teacher(("Teacher"))

node_learner -->|"uses"| node_app
node_teacher -->|"uses"| node_app
node_app -->|"routes"| node_routes
node_routes -->|"authenticates"| node_authclient
node_routes -->|"opens sandbox"| node_xpathui
node_xpathui -->|"shows evaluation"| node_learner
node_authclient -->|"HTTP requests"| node_authapi
node_validationapi -->|"validates answers"| node_exercises
node_exercises -->|"evaluates XPath"| node_xpathvalidate
node_exercises -->|"checks regex"| node_regexparse
node_learner -.->|"studies lessons"| node_lessons
node_learner -.->|"submits answers"| node_validationapi
node_teacher -->|"manages assignments"| node_assignments
node_assignments -->|"dispatches"| node_assignmentcases
node_assignmentcases -->|"reads and writes"| node_assignmentstore
node_teacher -.->|"manages groups"| node_groups
node_teacher -.->|"reviews progress"| node_analytics
node_learner -.->|"saves content"| node_sandbox
node_sandbox -.->|"reads and writes"| node_contentstore
node_assignmentstore -->|"persists in"| node_database
node_contentstore -->|"persists in"| node_database

click node_app "https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/main.ts"
click node_routes "https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/app.routes.ts"
click node_authclient "https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/core/services/auth.service.ts"
click node_xpathui "https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/features/xpath-sandbox/services/evaluation-orchestrator.service.ts"
click node_lessons "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/lessons"
click node_exercises "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/ExerciseValidationService.java"
click node_xpathvalidate "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/XPathValidationService.java"
click node_regexparse "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/infrastructure/service/regex/RegexParserServiceImpl.java"
click node_groups "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/groups"
click node_assignments "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/presentation/controller/AssignmentController.java"
click node_assignmentcases "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/assignments"
click node_analytics "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/assignments"
click node_sandbox "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/sandbox"
click node_authapi "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/AuthenticationApplicationService.java"
click node_validationapi "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/presentation/controller/ExerciseValidationController.java"
click node_assignmentstore "https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/infrastructure/persistence/assignments"
click node_contentstore "https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/infrastructure/persistence/sandbox/SandboxContentRepositoryImpl.java"

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_authclient toneBlue
class node_xpathui,node_lessons,node_exercises,node_xpathvalidate,node_regexparse,node_sandbox toneAmber
class node_groups,node_assignments,node_assignmentcases,node_analytics toneMint
class node_authapi,node_validationapi toneRose
class node_database,node_assignmentstore,node_contentstore,node_learner,node_teacher toneIndigo
```

## Components

### Web client

- [Angular app](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/main.ts): `webapp/src/main.ts`
- [Feature routes](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/app.routes.ts): `webapp/src/app/app.routes.ts`
- [Auth client](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/core/services/auth.service.ts): `webapp/src/app/core/services/auth.service.ts`

### Learning features

- [XPath evaluator](https://github.com/dancs-kornel/regexpath/blob/main/webapp/src/app/features/xpath-sandbox/services/evaluation-orchestrator.service.ts): `webapp/src/app/features/xpath-sandbox/services/evaluation-orchestrator.service.ts`
- [Lessons and progress](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/lessons): `server/src/main/java/hu/kornel/server/application/usecase/lessons`
- [Exercise validation](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/ExerciseValidationService.java): `server/src/main/java/hu/kornel/server/application/service/ExerciseValidationService.java`
- [XPath validation](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/XPathValidationService.java): `server/src/main/java/hu/kornel/server/application/service/XPathValidationService.java`
- [Regex parsing](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/infrastructure/service/regex/RegexParserServiceImpl.java): `server/src/main/java/hu/kornel/server/infrastructure/service/regex/RegexParserServiceImpl.java`
- [Saved sandbox content](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/sandbox): `server/src/main/java/hu/kornel/server/application/usecase/sandbox`

### Teaching features

- [Group management](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/groups): `server/src/main/java/hu/kornel/server/application/usecase/groups`
- [Assignment workflows](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/presentation/controller/AssignmentController.java): `server/src/main/java/hu/kornel/server/presentation/controller/AssignmentController.java`
- [Assignment use cases](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/assignments): `server/src/main/java/hu/kornel/server/application/usecase/assignments`
- [Progress analytics](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/application/usecase/assignments): `server/src/main/java/hu/kornel/server/application/usecase/assignments`

### Backend services

- [Authentication](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/application/service/AuthenticationApplicationService.java): `server/src/main/java/hu/kornel/server/application/service/AuthenticationApplicationService.java`
- [Validation endpoint](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/presentation/controller/ExerciseValidationController.java): `server/src/main/java/hu/kornel/server/presentation/controller/ExerciseValidationController.java`

### Persistence

- **PostgreSQL**
- [Assignment persistence](https://github.com/dancs-kornel/regexpath/tree/main/server/src/main/java/hu/kornel/server/infrastructure/persistence/assignments): `server/src/main/java/hu/kornel/server/infrastructure/persistence/assignments`
- [Content persistence](https://github.com/dancs-kornel/regexpath/blob/main/server/src/main/java/hu/kornel/server/infrastructure/persistence/sandbox/SandboxContentRepositoryImpl.java): `server/src/main/java/hu/kornel/server/infrastructure/persistence/sandbox/SandboxContentRepositoryImpl.java`

### Other components

- **Learner**
- **Teacher**

## Connections

- Learner → Angular app: uses
- Teacher → Angular app: uses
- Angular app → Feature routes: routes
- Feature routes → Auth client: authenticates
- Feature routes → XPath evaluator: opens sandbox
- XPath evaluator → Learner: shows evaluation
- Auth client → Authentication: HTTP requests
- Validation endpoint → Exercise validation: validates answers
- Exercise validation → XPath validation: evaluates XPath
- Exercise validation → Regex parsing: checks regex
- Learner → Lessons and progress: studies lessons
- Learner → Validation endpoint: submits answers
- Teacher → Assignment workflows: manages assignments
- Assignment workflows → Assignment use cases: dispatches
- Assignment use cases → Assignment persistence: reads and writes
- Teacher → Group management: manages groups
- Teacher → Progress analytics: reviews progress
- Learner → Saved sandbox content: saves content
- Saved sandbox content → Content persistence: reads and writes
- Assignment persistence → PostgreSQL: persists in
- Content persistence → PostgreSQL: persists in
