# resgistro-team/registro architecture

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

- Interactive diagram: https://gitdiagram.com/resgistro-team/registro
- Repository: https://github.com/resgistro-team/registro

## Overview

Registro is an event discovery and management platform; this repository currently implements a Flask API, while the frontend directory contains no application source. The intended workflow is organizer event creation and publication, attendee discovery and registration, then organizer registration tracking and attendee My Events. The graph shows the implemented API stages and shared persistence layer, plus Supabase authentication and PostgreSQL. README capabilities without frontend implementation are not represented as working components; the routes are sampled, but database schema details and unsampled repository functions are not expanded.

Main entry points: [`backend/routes/auth.py`](https://github.com/resgistro-team/registro/blob/main/backend/routes/auth.py) (Profile routes), [`backend/routes/users.py`](https://github.com/resgistro-team/registro/blob/main/backend/routes/users.py) (User views), [`backend/routes/events.py`](https://github.com/resgistro-team/registro/blob/main/backend/routes/events.py) (Event routes), [`backend/auth_middleware.py`](https://github.com/resgistro-team/registro/blob/main/backend/auth_middleware.py) (Auth middleware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_server["Server entry<br/>[server.py]"]
  node_app["Flask app<br/>[app.py]"]
  node_json_helpers["JSON conversion<br/>[json_helpers.py]"]
  node_http_helpers["HTTP helpers<br/>[helpers.py]"]
end

subgraph group_identity["Identity"]
  node_auth_routes["Profile routes<br/>[auth.py]"]
  node_auth_middleware["Auth middleware<br/>[auth_middleware.py]"]
end

subgraph group_events["Events and registrations"]
  node_user_routes["User views<br/>[users.py]"]
  node_event_routes["Event routes<br/>[events.py]"]
end

subgraph group_storage["Persistence"]
  node_repo["Domain repository<br/>[repository.py]"]
  node_db_pool["Connection pool<br/>[db.py]"]
end

node_client(("API client"))
node_supabase["Supabase Auth"]
node_postgres[("PostgreSQL")]

node_client -->|"sends requests"| node_server
node_server -->|"creates app"| node_app
node_app -->|"registers routes"| node_auth_routes
node_app -->|"registers routes"| node_event_routes
node_app -->|"registers routes"| node_user_routes
node_auth_routes -->|"requires auth"| node_auth_middleware
node_event_routes -->|"checks identity"| node_auth_middleware
node_user_routes -->|"requires auth"| node_auth_middleware
node_auth_middleware -->|"verifies token"| node_supabase
node_auth_middleware -->|"resolves profile"| node_repo
node_auth_routes -->|"manages profile"| node_repo
node_event_routes -->|"manages events"| node_repo
node_user_routes -->|"loads user views"| node_repo
node_repo -->|"opens connections"| node_db_pool
node_db_pool -->|"queries database"| node_postgres
node_auth_routes -->|"serializes responses"| node_json_helpers
node_event_routes -->|"serializes responses"| node_json_helpers
node_user_routes -->|"serializes responses"| node_json_helpers
node_auth_routes -->|"formats errors"| node_http_helpers
node_event_routes -->|"formats errors"| node_http_helpers
node_user_routes -->|"formats errors"| node_http_helpers
node_http_helpers -->|"converts values"| node_json_helpers

click node_server "https://github.com/resgistro-team/registro/blob/main/backend/server.py"
click node_app "https://github.com/resgistro-team/registro/blob/main/backend/app.py"
click node_auth_routes "https://github.com/resgistro-team/registro/blob/main/backend/routes/auth.py"
click node_auth_middleware "https://github.com/resgistro-team/registro/blob/main/backend/auth_middleware.py"
click node_user_routes "https://github.com/resgistro-team/registro/blob/main/backend/routes/users.py"
click node_event_routes "https://github.com/resgistro-team/registro/blob/main/backend/routes/events.py"
click node_repo "https://github.com/resgistro-team/registro/blob/main/backend/data/repository.py"
click node_db_pool "https://github.com/resgistro-team/registro/blob/main/backend/data/db.py"
click node_json_helpers "https://github.com/resgistro-team/registro/blob/main/backend/data/json_helpers.py"
click node_http_helpers "https://github.com/resgistro-team/registro/blob/main/backend/helpers.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_server,node_app,node_json_helpers,node_http_helpers,node_client toneBlue
class node_auth_routes,node_auth_middleware,node_postgres toneAmber
class node_user_routes,node_event_routes toneMint
class node_repo,node_db_pool toneRose
class node_supabase toneIndigo
```

## Components

### API runtime

- [Server entry](https://github.com/resgistro-team/registro/blob/main/backend/server.py): `backend/server.py`
- [Flask app](https://github.com/resgistro-team/registro/blob/main/backend/app.py): `backend/app.py`
- [JSON conversion](https://github.com/resgistro-team/registro/blob/main/backend/data/json_helpers.py): `backend/data/json_helpers.py`
- [HTTP helpers](https://github.com/resgistro-team/registro/blob/main/backend/helpers.py): `backend/helpers.py`

### Identity

- [Profile routes](https://github.com/resgistro-team/registro/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Auth middleware](https://github.com/resgistro-team/registro/blob/main/backend/auth_middleware.py): `backend/auth_middleware.py`

### Events and registrations

- [User views](https://github.com/resgistro-team/registro/blob/main/backend/routes/users.py): `backend/routes/users.py`
- [Event routes](https://github.com/resgistro-team/registro/blob/main/backend/routes/events.py): `backend/routes/events.py`

### Persistence

- [Domain repository](https://github.com/resgistro-team/registro/blob/main/backend/data/repository.py): `backend/data/repository.py`
- [Connection pool](https://github.com/resgistro-team/registro/blob/main/backend/data/db.py): `backend/data/db.py`

### Other components

- **API client**
- **Supabase Auth**
- **PostgreSQL**

## Connections

- API client → Server entry: sends requests (evidence: `backend/server.py`)
- Server entry → Flask app: creates app (evidence: `backend/server.py`)
- Flask app → Profile routes: registers routes (evidence: `backend/app.py`)
- Flask app → Event routes: registers routes (evidence: `backend/app.py`)
- Flask app → User views: registers routes (evidence: `backend/app.py`)
- Profile routes → Auth middleware: requires auth (evidence: `backend/routes/auth.py`)
- Event routes → Auth middleware: checks identity (evidence: `backend/routes/events.py`)
- User views → Auth middleware: requires auth (evidence: `backend/routes/users.py`)
- Auth middleware → Supabase Auth: verifies token (evidence: `backend/auth_middleware.py`)
- Auth middleware → Domain repository: resolves profile (evidence: `backend/auth_middleware.py`)
- Profile routes → Domain repository: manages profile (evidence: `backend/routes/auth.py`)
- Event routes → Domain repository: manages events (evidence: `backend/routes/events.py`)
- User views → Domain repository: loads user views (evidence: `backend/routes/users.py`)
- Domain repository → Connection pool: opens connections (evidence: `backend/data/repository.py`)
- Connection pool → PostgreSQL: queries database (evidence: `backend/data/db.py`)
- Profile routes → JSON conversion: serializes responses (evidence: `backend/routes/auth.py`)
- Event routes → JSON conversion: serializes responses (evidence: `backend/routes/events.py`)
- User views → JSON conversion: serializes responses (evidence: `backend/routes/users.py`)
- Profile routes → HTTP helpers: formats errors (evidence: `backend/routes/auth.py`)
- Event routes → HTTP helpers: formats errors (evidence: `backend/routes/events.py`)
- User views → HTTP helpers: formats errors (evidence: `backend/routes/users.py`)
- HTTP helpers → JSON conversion: converts values (evidence: `backend/helpers.py`)
