# bertiola/donde-vamos architecture

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

- Interactive diagram: https://gitdiagram.com/bertiola/donde-vamos
- Repository: https://github.com/bertiola/donde-vamos

## Overview

¿Dónde Vamos? is a Flask backend for discovering published events and administering event-related records. Public clients can retrieve categories and published events; administrators authenticate, then manage venue and organizer catalogs. The model layer also defines events, categories, administrators, and date-change history, though event editing and history workflows are not shown. Edges reflect the sampled Flask routes and imports; templates and deployment/database services are represented only where their use is explicit.

Main entry points: [`backend/auth.py`](https://github.com/bertiola/donde-vamos/blob/main/backend/auth.py) (Login and sessions), [`backend/app.py`](https://github.com/bertiola/donde-vamos/blob/main/backend/app.py) (Flask application), [`backend/catalogos.py`](https://github.com/bertiola/donde-vamos/blob/main/backend/catalogos.py) (Catalog management), [`backend/database.py`](https://github.com/bertiola/donde-vamos/blob/main/backend/database.py) (SQLAlchemy database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_app["Flask application<br/>[app.py]"]
  node_publicapi["Public event API<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_auth["Login and sessions<br/>[auth.py]"]
  node_catalogs["Catalog management<br/>[catalogos.py]"]
  node_loginview["Login view<br/>[login.html]"]
  node_adminview["Admin panel view<br/>[admin.html]"]
  node_venuesview["Venue view<br/>[lugares.html]"]
  node_organizersview["Organizer view<br/>[organizadores.html]"]
end

subgraph group_domain["Event domain"]
  node_eventmodels["Event records<br/>[models.py]"]
  node_catalogmodels["Catalog records<br/>[models.py]"]
  node_adminmodels["Administrator records<br/>[models.py]"]
  node_history["Date history<br/>[models.py]"]
end

subgraph group_infra["Configuration and persistence"]
  node_db[("SQLAlchemy database<br/>[database.py]")]
  node_config["App configuration<br/>[config.py]"]
end

node_visitor(("Public client"))
node_adminuser(("Administrator"))
node_supabase["Supabase Auth"]
node_database_service[("Configured SQL database")]

node_visitor -->|"requests routes"| node_app
node_app -->|"serves endpoints"| node_publicapi
node_publicapi -->|"queries events"| node_eventmodels
node_publicapi -->|"queries categories"| node_catalogmodels
node_adminuser -->|"submits credentials"| node_auth
node_auth -->|"validates identity"| node_supabase
node_auth -->|"checks permissions"| node_adminmodels
node_auth -->|"renders login"| node_loginview
node_auth -->|"renders panel"| node_adminview
node_adminuser -->|"manages catalogs"| node_catalogs
node_catalogs -->|"reads and writes"| node_catalogmodels
node_catalogs -->|"renders venues"| node_venuesview
node_catalogs -->|"renders organizers"| node_organizersview
node_app -->|"registers blueprint"| node_auth
node_app -->|"registers blueprint"| node_catalogs
node_app -->|"loads settings"| node_config
node_app -->|"initializes database"| node_db
node_auth -->|"queries session"| node_db
node_catalogs -->|"persists catalogs"| node_db
node_publicapi -->|"queries records"| node_db
node_db -.->|"connects to"| node_database_service
node_eventmodels -->|"relates venues and categories"| node_catalogmodels
node_eventmodels -->|"references creator"| node_adminmodels
node_eventmodels -->|"tracks date changes"| node_history

click node_app "https://github.com/bertiola/donde-vamos/blob/main/backend/app.py"
click node_publicapi "https://github.com/bertiola/donde-vamos/blob/main/backend/app.py"
click node_auth "https://github.com/bertiola/donde-vamos/blob/main/backend/auth.py"
click node_catalogs "https://github.com/bertiola/donde-vamos/blob/main/backend/catalogos.py"
click node_loginview "https://github.com/bertiola/donde-vamos/blob/main/backend/templates/login.html"
click node_adminview "https://github.com/bertiola/donde-vamos/blob/main/backend/templates/admin.html"
click node_venuesview "https://github.com/bertiola/donde-vamos/blob/main/backend/templates/lugares.html"
click node_organizersview "https://github.com/bertiola/donde-vamos/blob/main/backend/templates/organizadores.html"
click node_eventmodels "https://github.com/bertiola/donde-vamos/blob/main/backend/models.py"
click node_catalogmodels "https://github.com/bertiola/donde-vamos/blob/main/backend/models.py"
click node_adminmodels "https://github.com/bertiola/donde-vamos/blob/main/backend/models.py"
click node_history "https://github.com/bertiola/donde-vamos/blob/main/backend/models.py"
click node_db "https://github.com/bertiola/donde-vamos/blob/main/backend/database.py"
click node_config "https://github.com/bertiola/donde-vamos/blob/main/backend/config.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_app,node_publicapi,node_visitor toneBlue
class node_auth,node_catalogs,node_loginview,node_adminview,node_venuesview,node_organizersview,node_database_service toneAmber
class node_eventmodels,node_catalogmodels,node_adminmodels,node_history toneMint
class node_db,node_config toneRose
class node_adminuser,node_supabase toneIndigo
```

## Components

### API runtime

- [Flask application](https://github.com/bertiola/donde-vamos/blob/main/backend/app.py): `backend/app.py`
- [Public event API](https://github.com/bertiola/donde-vamos/blob/main/backend/app.py): `backend/app.py`

### Administration

- [Login and sessions](https://github.com/bertiola/donde-vamos/blob/main/backend/auth.py): `backend/auth.py`
- [Catalog management](https://github.com/bertiola/donde-vamos/blob/main/backend/catalogos.py): `backend/catalogos.py`
- [Login view](https://github.com/bertiola/donde-vamos/blob/main/backend/templates/login.html): `backend/templates/login.html`
- [Admin panel view](https://github.com/bertiola/donde-vamos/blob/main/backend/templates/admin.html): `backend/templates/admin.html`
- [Venue view](https://github.com/bertiola/donde-vamos/blob/main/backend/templates/lugares.html): `backend/templates/lugares.html`
- [Organizer view](https://github.com/bertiola/donde-vamos/blob/main/backend/templates/organizadores.html): `backend/templates/organizadores.html`

### Event domain

- [Event records](https://github.com/bertiola/donde-vamos/blob/main/backend/models.py): `backend/models.py`
- [Catalog records](https://github.com/bertiola/donde-vamos/blob/main/backend/models.py): `backend/models.py`
- [Administrator records](https://github.com/bertiola/donde-vamos/blob/main/backend/models.py): `backend/models.py`
- [Date history](https://github.com/bertiola/donde-vamos/blob/main/backend/models.py): `backend/models.py`

### Configuration and persistence

- [SQLAlchemy database](https://github.com/bertiola/donde-vamos/blob/main/backend/database.py): `backend/database.py`
- [App configuration](https://github.com/bertiola/donde-vamos/blob/main/backend/config.py): `backend/config.py`

### Other components

- **Public client**
- **Administrator**
- **Supabase Auth**
- **Configured SQL database**

## Connections

- Public client → Flask application: requests routes (evidence: `backend/app.py`)
- Flask application → Public event API: serves endpoints (evidence: `backend/app.py`)
- Public event API → Event records: queries events (evidence: `backend/app.py`)
- Public event API → Catalog records: queries categories (evidence: `backend/app.py`)
- Administrator → Login and sessions: submits credentials (evidence: `backend/auth.py`)
- Login and sessions → Supabase Auth: validates identity (evidence: `backend/auth.py`)
- Login and sessions → Administrator records: checks permissions (evidence: `backend/auth.py`)
- Login and sessions → Login view: renders login (evidence: `backend/auth.py`)
- Login and sessions → Admin panel view: renders panel (evidence: `backend/auth.py`)
- Administrator → Catalog management: manages catalogs (evidence: `backend/catalogos.py`)
- Catalog management → Catalog records: reads and writes (evidence: `backend/catalogos.py`)
- Catalog management → Venue view: renders venues (evidence: `backend/catalogos.py`)
- Catalog management → Organizer view: renders organizers (evidence: `backend/catalogos.py`)
- Flask application → Login and sessions: registers blueprint (evidence: `backend/app.py`)
- Flask application → Catalog management: registers blueprint (evidence: `backend/app.py`)
- Flask application → App configuration: loads settings (evidence: `backend/app.py`)
- Flask application → SQLAlchemy database: initializes database (evidence: `backend/app.py`)
- Login and sessions → SQLAlchemy database: queries session (evidence: `backend/auth.py`)
- Catalog management → SQLAlchemy database: persists catalogs (evidence: `backend/catalogos.py`)
- Public event API → SQLAlchemy database: queries records (evidence: `backend/app.py`)
- SQLAlchemy database → Configured SQL database: connects to
- Event records → Catalog records: relates venues and categories (evidence: `backend/models.py`)
- Event records → Administrator records: references creator (evidence: `backend/models.py`)
- Event records → Date history: tracks date changes (evidence: `backend/models.py`)
