# kikoyummy115-tech/event-parking architecture

> Architecture diagram of the GitHub repository kikoyummy115-tech/event-parking, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kikoyummy115-tech/event-parking
- Repository: https://github.com/kikoyummy115-tech/event-parking

## Overview

Event Parking is a Flask application for authenticated event and parking-zone management, with event images stored through Cloudinary and an implemented RAG chat path. Users browse, search, and manage events and their zones; separately, chat requests are handled by a route that stores conversation messages and calls retrieval and answer generation. Document ingestion is a distinct supporting workflow. The README also describes RAG models as initial foundations; the sampled source shows a working retrieval/chat path. Edges reflect excerpts or explicit README statements; unsampled template and persistence details are not inferred beyond documented links.

Main entry points: [`app/__init__.py`](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/__init__.py) (Flask application), [`app/routes/main.py`](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/main.py) (Event and zone routes), [`app/services/rag_service.py`](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/services/rag_service.py) (Retrieval and answers), [`app/models/rag_model.py`](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/rag_model.py) (Documents and conversations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_application["Flask application<br/>[__init__.py]"]
  node_configuration["Application config<br/>[config.py]"]
  node_extensions["Flask extensions<br/>[extension.py]"]
  node_templates["Rendered pages"]
end

subgraph group_events["Events and parking"]
  node_event_routes["Event and zone routes<br/>[main.py]"]
  node_event_models["Events and zones<br/>[event.py]"]
  node_image_store["Cloudinary images"]
end

subgraph group_identity["Authentication"]
  node_auth_routes["Auth routes<br/>[auth.py]"]
  node_user_model["User accounts<br/>[user.py]"]
end

subgraph group_rag["RAG chat and ingestion"]
  node_chat_routes["Chat API<br/>[chatbot.py]"]
  node_rag_service["Retrieval and answers<br/>[rag_service.py]"]
  node_rag_models["Documents and conversations<br/>[rag_model.py]"]
  node_ingestion["Document ingestion<br/>[ingest.py]"]
  node_openai["OpenAI API"]
end

node_browser(("Browser / user"))
node_operator(("Ingestion operator"))
node_relational_db[("Relational database")]

node_browser -->|"uses"| node_application
node_application -->|"loads"| node_configuration
node_application -->|"initializes"| node_extensions
node_application -->|"registers"| node_auth_routes
node_application -->|"registers"| node_event_routes
node_event_routes -->|"renders"| node_templates
node_auth_routes -->|"renders"| node_templates
node_auth_routes -->|"queries and saves"| node_user_model
node_event_routes -->|"queries and saves"| node_event_models
node_event_routes -->|"uploads and deletes"| node_image_store
node_application -->|"configures"| node_image_store
node_application -->|"registers"| node_chat_routes
node_chat_routes -->|"calls"| node_rag_service
node_chat_routes -->|"reads and saves"| node_rag_models
node_rag_service -->|"retrieves chunks"| node_rag_models
node_rag_service -.->|"requests embeddings and answers"| node_openai
node_operator -->|"runs"| node_ingestion
node_ingestion -->|"creates documents and chunks"| node_rag_models
node_ingestion -->|"generates embeddings"| node_rag_service
node_user_model -->|"persists account data"| node_relational_db
node_event_models -->|"persists event data"| node_relational_db
node_rag_models -->|"persists RAG records"| node_relational_db

click node_application "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/__init__.py"
click node_configuration "https://github.com/kikoyummy115-tech/event-parking/blob/main/config.py"
click node_extensions "https://github.com/kikoyummy115-tech/event-parking/blob/main/extension.py"
click node_templates "https://github.com/kikoyummy115-tech/event-parking/tree/main/app/templates"
click node_auth_routes "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/auth.py"
click node_user_model "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/user.py"
click node_event_routes "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/main.py"
click node_event_models "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/event.py"
click node_chat_routes "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/chatbot.py"
click node_rag_service "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/services/rag_service.py"
click node_rag_models "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/rag_model.py"
click node_ingestion "https://github.com/kikoyummy115-tech/event-parking/blob/main/app/services/ingest.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,node_configuration,node_extensions,node_templates,node_browser toneBlue
class node_event_routes,node_event_models,node_image_store,node_relational_db toneAmber
class node_auth_routes,node_user_model toneMint
class node_chat_routes,node_rag_service,node_rag_models,node_ingestion,node_openai toneRose
class node_operator toneIndigo
```

## Components

### Web application

- [Flask application](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/__init__.py): `app/__init__.py`
- [Application config](https://github.com/kikoyummy115-tech/event-parking/blob/main/config.py): `config.py`
- [Flask extensions](https://github.com/kikoyummy115-tech/event-parking/blob/main/extension.py): `extension.py`
- [Rendered pages](https://github.com/kikoyummy115-tech/event-parking/tree/main/app/templates): `app/templates`

### Events and parking

- [Event and zone routes](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/main.py): `app/routes/main.py`
- [Events and zones](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/event.py): `app/models/event.py`
- **Cloudinary images**

### Authentication

- [Auth routes](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/auth.py): `app/routes/auth.py`
- [User accounts](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/user.py): `app/models/user.py`

### RAG chat and ingestion

- [Chat API](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/routes/chatbot.py): `app/routes/chatbot.py`
- [Retrieval and answers](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/services/rag_service.py): `app/services/rag_service.py`
- [Documents and conversations](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/models/rag_model.py): `app/models/rag_model.py`
- [Document ingestion](https://github.com/kikoyummy115-tech/event-parking/blob/main/app/services/ingest.py): `app/services/ingest.py`
- **OpenAI API**

### Other components

- **Browser / user**
- **Ingestion operator**
- **Relational database**

## Connections

- Browser / user → Flask application: uses (evidence: `README.md`)
- Flask application → Application config: loads (evidence: `app/__init__.py`)
- Flask application → Flask extensions: initializes (evidence: `app/__init__.py`)
- Flask application → Auth routes: registers (evidence: `app/__init__.py`)
- Flask application → Event and zone routes: registers (evidence: `app/__init__.py`)
- Event and zone routes → Rendered pages: renders (evidence: `app/routes/main.py`)
- Auth routes → Rendered pages: renders (evidence: `app/routes/auth.py`)
- Auth routes → User accounts: queries and saves (evidence: `app/routes/auth.py`)
- Event and zone routes → Events and zones: queries and saves (evidence: `app/routes/main.py`)
- Event and zone routes → Cloudinary images: uploads and deletes (evidence: `app/routes/main.py`)
- Flask application → Cloudinary images: configures (evidence: `app/__init__.py`)
- Flask application → Chat API: registers (evidence: `app/__init__.py`)
- Chat API → Retrieval and answers: calls (evidence: `app/routes/chatbot.py`)
- Chat API → Documents and conversations: reads and saves (evidence: `app/routes/chatbot.py`)
- Retrieval and answers → Documents and conversations: retrieves chunks (evidence: `app/services/rag_service.py`)
- Retrieval and answers → OpenAI API: requests embeddings and answers (evidence: `app/services/rag_service.py`)
- Ingestion operator → Document ingestion: runs (evidence: `app/services/ingest.py`)
- Document ingestion → Documents and conversations: creates documents and chunks (evidence: `app/services/ingest.py`)
- Document ingestion → Retrieval and answers: generates embeddings (evidence: `app/services/ingest.py`)
- User accounts → Relational database: persists account data (evidence: `README.md`)
- Events and zones → Relational database: persists event data (evidence: `README.md`)
- Documents and conversations → Relational database: persists RAG records (evidence: `README.md`)
