# afotiou01/thesis-recom architecture

> Architecture diagram of the GitHub repository afotiou01/thesis-recom, 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/afotiou01/thesis-recom
- Repository: https://github.com/afotiou01/thesis-recom

## Overview

thesis-recom is a concert recommender demo: attendees provide preferences, then request ranked events with score explanations. Admins can add events, while the API exposes database-derived options and recommendation-weight controls. The recommendation route filters by date, scores and ranks eligible events, optionally diversifies results, and records requests. The README also describes onboarding language preferences; the sampled profile payload stores preferences through tags and does not show a separate language field. Web page request wiring was not sampled, so frontend-to-API links are omitted.

Main entry points: [`api/database.py`](https://github.com/afotiou01/thesis-recom/blob/main/api/database.py) (SQLite models), [`api/main.py`](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py) (Recommendation route), [`api/recommender.py`](https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py) (Event scoring), [`api/seed.py`](https://github.com/afotiou01/thesis-recom/blob/main/api/seed.py) (Default seed data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_onboard["Preference onboarding<br/>[index.html]"]
  node_adminui["Event admin<br/>[admin.html]"]
end

subgraph group_api["API workflows"]
  node_http["FastAPI endpoints<br/>[main.py]"]
  node_options["Dynamic options<br/>[main.py]"]
  node_eventadmin["Event management<br/>[main.py]"]
  node_profile["Profile management<br/>[main.py]"]
  node_weightconfig["Weight settings<br/>[main.py]"]
  node_recroute["Recommendation route<br/>[main.py]"]
end

subgraph group_recommend["Recommendation"]
  node_datefilter["Date eligibility<br/>[recommender.py]"]
  node_scoring["Event scoring<br/>[recommender.py]"]
  node_diversify["Result diversification<br/>[main.py]"]
  node_explanations["Score explanations<br/>[recommender.py]"]
end

subgraph group_storage["Persistence"]
  node_sqlite[("SQLite models<br/>[database.py]")]
  node_seed["Default seed data<br/>[seed.py]"]
  node_requestlogs[("Recommendation logs<br/>[database.py]")]
end

node_attendee(("Attendee"))
node_admin(("Administrator"))

node_recroute -->|"filters dates"| node_datefilter
node_recroute -->|"scores events"| node_scoring
node_recroute -->|"optionally diversifies"| node_diversify
node_scoring -->|"produces breakdown"| node_explanations
node_http -->|"opens sessions"| node_sqlite
node_options -->|"reads events"| node_sqlite
node_eventadmin -->|"writes events"| node_sqlite
node_profile -->|"reads and writes profiles"| node_sqlite
node_weightconfig -->|"reads and writes weights"| node_sqlite
node_recroute -->|"reads profiles and events"| node_sqlite
node_recroute -->|"writes request log"| node_requestlogs
node_requestlogs -->|"stored in"| node_sqlite
node_seed -->|"seeds config and events"| node_sqlite

click node_onboard "https://github.com/afotiou01/thesis-recom/blob/main/web/index.html"
click node_adminui "https://github.com/afotiou01/thesis-recom/blob/main/web/admin.html"
click node_http "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_options "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_eventadmin "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_profile "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_weightconfig "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_recroute "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_datefilter "https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py"
click node_scoring "https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py"
click node_diversify "https://github.com/afotiou01/thesis-recom/blob/main/api/main.py"
click node_explanations "https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py"
click node_sqlite "https://github.com/afotiou01/thesis-recom/blob/main/api/database.py"
click node_seed "https://github.com/afotiou01/thesis-recom/blob/main/api/seed.py"
click node_requestlogs "https://github.com/afotiou01/thesis-recom/blob/main/api/database.py"

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_onboard,node_adminui toneBlue
class node_http,node_options,node_eventadmin,node_profile,node_weightconfig,node_recroute toneAmber
class node_datefilter,node_scoring,node_diversify,node_explanations toneMint
class node_sqlite,node_seed,node_requestlogs toneRose
class node_attendee,node_admin toneIndigo
```

## Components

### Web experience

- [Preference onboarding](https://github.com/afotiou01/thesis-recom/blob/main/web/index.html): `web/index.html`
- [Event admin](https://github.com/afotiou01/thesis-recom/blob/main/web/admin.html): `web/admin.html`

### API workflows

- [FastAPI endpoints](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Dynamic options](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Event management](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Profile management](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Weight settings](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Recommendation route](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`

### Recommendation

- [Date eligibility](https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py): `api/recommender.py`
- [Event scoring](https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py): `api/recommender.py`
- [Result diversification](https://github.com/afotiou01/thesis-recom/blob/main/api/main.py): `api/main.py`
- [Score explanations](https://github.com/afotiou01/thesis-recom/blob/main/api/recommender.py): `api/recommender.py`

### Persistence

- [SQLite models](https://github.com/afotiou01/thesis-recom/blob/main/api/database.py): `api/database.py`
- [Default seed data](https://github.com/afotiou01/thesis-recom/blob/main/api/seed.py): `api/seed.py`
- [Recommendation logs](https://github.com/afotiou01/thesis-recom/blob/main/api/database.py): `api/database.py`

### Other components

- **Attendee**
- **Administrator**

## Connections

- Recommendation route → Date eligibility: filters dates (evidence: `api/main.py`)
- Recommendation route → Event scoring: scores events (evidence: `api/main.py`)
- Recommendation route → Result diversification: optionally diversifies (evidence: `api/main.py`)
- Event scoring → Score explanations: produces breakdown (evidence: `api/recommender.py`)
- FastAPI endpoints → SQLite models: opens sessions (evidence: `api/main.py`)
- Dynamic options → SQLite models: reads events (evidence: `api/main.py`)
- Event management → SQLite models: writes events (evidence: `api/main.py`)
- Profile management → SQLite models: reads and writes profiles (evidence: `api/main.py`)
- Weight settings → SQLite models: reads and writes weights (evidence: `api/main.py`)
- Recommendation route → SQLite models: reads profiles and events (evidence: `api/main.py`)
- Recommendation route → Recommendation logs: writes request log (evidence: `api/main.py`)
- Recommendation logs → SQLite models: stored in (evidence: `api/database.py`)
- Default seed data → SQLite models: seeds config and events (evidence: `api/seed.py`)
