# frakhmann/scribbles architecture

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

- Interactive diagram: https://gitdiagram.com/frakhmann/scribbles
- Repository: https://github.com/frakhmann/scribbles

## Overview

Scribbles Forum is a university-oriented community forum. Users register and activate accounts, sign in, then browse a post feed; the repository also exposes routes for creating and managing posts, comments, likes, notifications, universities, sections, users, and administration. The README is empty, and most route implementations were not sampled, so links among those features are not inferred. The graph shows only wiring supported by the sampled application entry point and authentication code.

Main entry points: [`app/main.py`](https://github.com/frakhmann/scribbles/blob/main/app/main.py) (FastAPI app), [`app/routers/auth.py`](https://github.com/frakhmann/scribbles/blob/main/app/routers/auth.py) (Authentication), [`app/db/session.py`](https://github.com/frakhmann/scribbles/blob/main/app/db/session.py) (DB sessions), [`app/auth/dependencies.py`](https://github.com/frakhmann/scribbles/blob/main/app/auth/dependencies.py) (Cookie identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_application["FastAPI app<br/>[main.py]"]
end

subgraph group_identity["Identity and access"]
  node_auth["Authentication<br/>[auth.py]"]
  node_auth_dependencies["Cookie identity<br/>[dependencies.py]"]
  node_security["Token security<br/>[security.py]"]
  node_users["User routes<br/>[users.py]"]
  node_admin["Admin routes<br/>[admin.py]"]
end

subgraph group_community["Forum features"]
  node_posts["Post routes<br/>[posts.py]"]
  node_comments["Comments<br/>[comments.py]"]
  node_likes["Likes<br/>[like.py]"]
  node_notifications["Notifications<br/>[notification.py]"]
  node_sections["Sections<br/>[sections.py]"]
  node_universities["Universities<br/>[universities.py]"]
  node_university_sections["University sections"]
  node_search["Search page<br/>[search.py]"]
end

subgraph group_data["Persistence and services"]
  node_database_session["DB sessions<br/>[session.py]"]
  node_database[("Relational database")]
  node_email["Confirmation email<br/>[email.py]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests"| node_application
node_application -->|"mounts routes"| node_auth
node_application -->|"mounts routes"| node_users
node_application -->|"mounts routes"| node_admin
node_application -->|"mounts routes"| node_posts
node_application -->|"mounts routes"| node_comments
node_application -->|"mounts routes"| node_likes
node_application -->|"mounts routes"| node_notifications
node_application -->|"mounts routes"| node_sections
node_application -->|"mounts routes"| node_universities
node_application -->|"mounts routes"| node_university_sections
node_application -->|"mounts routes"| node_search
node_application -->|"requests session"| node_database_session
node_application -->|"reads feed"| node_database
node_auth -->|"opens session"| node_database_session
node_auth -->|"reads and writes"| node_database
node_auth -->|"sends activation"| node_email
node_auth -->|"hashes and signs"| node_security
node_auth_dependencies -->|"opens session"| node_database_session
node_auth_dependencies -->|"looks up user"| node_database
node_database_session -->|"connects"| node_database

click node_application "https://github.com/frakhmann/scribbles/blob/main/app/main.py"
click node_auth "https://github.com/frakhmann/scribbles/blob/main/app/routers/auth.py"
click node_auth_dependencies "https://github.com/frakhmann/scribbles/blob/main/app/auth/dependencies.py"
click node_security "https://github.com/frakhmann/scribbles/blob/main/app/utils/security.py"
click node_users "https://github.com/frakhmann/scribbles/blob/main/app/routers/users.py"
click node_admin "https://github.com/frakhmann/scribbles/blob/main/app/routers/admin.py"
click node_posts "https://github.com/frakhmann/scribbles/blob/main/app/routers/posts.py"
click node_comments "https://github.com/frakhmann/scribbles/blob/main/app/routers/comments.py"
click node_likes "https://github.com/frakhmann/scribbles/blob/main/app/routers/like.py"
click node_notifications "https://github.com/frakhmann/scribbles/blob/main/app/routers/notification.py"
click node_sections "https://github.com/frakhmann/scribbles/blob/main/app/routers/sections.py"
click node_universities "https://github.com/frakhmann/scribbles/blob/main/app/routers/universities.py"
click node_university_sections "https://github.com/frakhmann/scribbles/blob/main/app/routers/universities_sections.py"
click node_search "https://github.com/frakhmann/scribbles/blob/main/app/routers/search.py"
click node_database_session "https://github.com/frakhmann/scribbles/blob/main/app/db/session.py"
click node_email "https://github.com/frakhmann/scribbles/blob/main/app/utils/email.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_application toneBlue
class node_auth,node_auth_dependencies,node_security,node_users,node_admin toneAmber
class node_posts,node_comments,node_likes,node_notifications,node_sections,node_universities,node_university_sections,node_search toneMint
class node_database_session,node_database,node_email toneRose
class node_visitor toneIndigo
```

## Components

### Application entry

- [FastAPI app](https://github.com/frakhmann/scribbles/blob/main/app/main.py): `app/main.py`

### Identity and access

- [Authentication](https://github.com/frakhmann/scribbles/blob/main/app/routers/auth.py): `app/routers/auth.py`
- [Cookie identity](https://github.com/frakhmann/scribbles/blob/main/app/auth/dependencies.py): `app/auth/dependencies.py`
- [Token security](https://github.com/frakhmann/scribbles/blob/main/app/utils/security.py): `app/utils/security.py`
- [User routes](https://github.com/frakhmann/scribbles/blob/main/app/routers/users.py): `app/routers/users.py`
- [Admin routes](https://github.com/frakhmann/scribbles/blob/main/app/routers/admin.py): `app/routers/admin.py`

### Forum features

- [Post routes](https://github.com/frakhmann/scribbles/blob/main/app/routers/posts.py): `app/routers/posts.py`
- [Comments](https://github.com/frakhmann/scribbles/blob/main/app/routers/comments.py): `app/routers/comments.py`
- [Likes](https://github.com/frakhmann/scribbles/blob/main/app/routers/like.py): `app/routers/like.py`
- [Notifications](https://github.com/frakhmann/scribbles/blob/main/app/routers/notification.py): `app/routers/notification.py`
- [Sections](https://github.com/frakhmann/scribbles/blob/main/app/routers/sections.py): `app/routers/sections.py`
- [Universities](https://github.com/frakhmann/scribbles/blob/main/app/routers/universities.py): `app/routers/universities.py`
- [University sections](https://github.com/frakhmann/scribbles/blob/main/app/routers/universities_sections.py): `app/routers/universities_sections.py`
- [Search page](https://github.com/frakhmann/scribbles/blob/main/app/routers/search.py): `app/routers/search.py`

### Persistence and services

- [DB sessions](https://github.com/frakhmann/scribbles/blob/main/app/db/session.py): `app/db/session.py`
- **Relational database**
- [Confirmation email](https://github.com/frakhmann/scribbles/blob/main/app/utils/email.py): `app/utils/email.py`

### Other components

- **Visitor**

## Connections

- Visitor → FastAPI app: requests
- FastAPI app → Authentication: mounts routes
- FastAPI app → User routes: mounts routes
- FastAPI app → Admin routes: mounts routes
- FastAPI app → Post routes: mounts routes
- FastAPI app → Comments: mounts routes
- FastAPI app → Likes: mounts routes
- FastAPI app → Notifications: mounts routes
- FastAPI app → Sections: mounts routes
- FastAPI app → Universities: mounts routes
- FastAPI app → University sections: mounts routes
- FastAPI app → Search page: mounts routes
- FastAPI app → DB sessions: requests session
- FastAPI app → Relational database: reads feed
- Authentication → DB sessions: opens session
- Authentication → Relational database: reads and writes
- Authentication → Confirmation email: sends activation
- Authentication → Token security: hashes and signs
- Cookie identity → DB sessions: opens session
- Cookie identity → Relational database: looks up user
- DB sessions → Relational database: connects
