# rishabhv28/ai-calendar-web-app architecture

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

- Interactive diagram: https://gitdiagram.com/rishabhv28/ai-calendar-web-app
- Repository: https://github.com/rishabhv28/ai-calendar-web-app

## Overview

This repository is a small FastAPI scheduler API. A client submits event requests; the event routes validate inputs, delegate create/list/update/delete and optional time-range queries to the service, and return event responses. The service applies event defaults and uses SQLAlchemy models and a database session to persist or retrieve data. The sampled files show a local SQLite store and a fixed development user ID; no authentication or external integrations are evidenced. The README is empty, so capabilities and links are based on sampled source only.

Main entry points: [`app/main.py`](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/main.py) (FastAPI entry), [`app/routes/events.py`](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/routes/events.py) (Event routes), [`app/models/event.py`](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/models/event.py) (Event model), [`app/database.py`](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/database.py) (DB sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API layer"]
  node_app_entry["FastAPI entry<br/>[main.py]"]
  node_event_routes["Event routes<br/>[events.py]"]
end

subgraph group_domain["Event domain"]
  node_event_schemas["Event schemas<br/>[event.py]"]
  node_event_service["Event service<br/>[event_service.py]"]
  node_event_model["Event model<br/>[event.py]"]
  node_user_model["User model<br/>[user.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_session["DB sessions<br/>[database.py]"]
  node_sqlite_store[("SQLite database<br/>[scheduler.db]")]
end

node_client(("API client"))

node_client -->|"sends requests"| node_app_entry
node_app_entry -->|"registers router"| node_event_routes
node_app_entry -->|"creates tables"| node_db_session
node_app_entry -->|"loads models"| node_event_model
node_app_entry -->|"loads models"| node_user_model
node_event_routes -.->|"returns results"| node_client
node_event_routes -->|"validates and shapes"| node_event_schemas
node_event_routes -->|"delegates events"| node_event_service
node_event_routes -->|"requests session"| node_db_session
node_event_service -->|"accepts event data"| node_event_schemas
node_event_service -->|"queries and writes"| node_event_model
node_event_model -->|"uses declarative base"| node_db_session
node_user_model -->|"uses declarative base"| node_db_session
node_db_session -->|"connects to"| node_sqlite_store
node_event_model -->|"relates to owner"| node_user_model
node_user_model -->|"relates to events"| node_event_model

click node_app_entry "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/main.py"
click node_event_routes "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/routes/events.py"
click node_event_schemas "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/schemas/event.py"
click node_event_service "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/services/event_service.py"
click node_event_model "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/models/event.py"
click node_user_model "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/models/user.py"
click node_db_session "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/database.py"
click node_sqlite_store "https://github.com/rishabhv28/ai-calendar-web-app/blob/main/scheduler.db"

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_entry,node_event_routes,node_client toneBlue
class node_event_schemas,node_event_service,node_event_model,node_user_model toneAmber
class node_db_session,node_sqlite_store toneMint
```

## Components

### API layer

- [FastAPI entry](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/main.py): `app/main.py`
- [Event routes](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/routes/events.py): `app/routes/events.py`

### Event domain

- [Event schemas](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/schemas/event.py): `app/schemas/event.py`
- [Event service](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/services/event_service.py): `app/services/event_service.py`
- [Event model](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/models/event.py): `app/models/event.py`
- [User model](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/models/user.py): `app/models/user.py`

### Persistence

- [DB sessions](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/app/database.py): `app/database.py`
- [SQLite database](https://github.com/rishabhv28/ai-calendar-web-app/blob/main/scheduler.db): `scheduler.db`

### Other components

- **API client**

## Connections

- API client → FastAPI entry: sends requests
- FastAPI entry → Event routes: registers router (evidence: `app/main.py`)
- FastAPI entry → DB sessions: creates tables (evidence: `app/main.py`)
- FastAPI entry → Event model: loads models (evidence: `app/main.py`)
- FastAPI entry → User model: loads models (evidence: `app/main.py`)
- Event routes → API client: returns results
- Event routes → Event schemas: validates and shapes (evidence: `app/routes/events.py`)
- Event routes → Event service: delegates events (evidence: `app/routes/events.py`)
- Event routes → DB sessions: requests session (evidence: `app/routes/events.py`)
- Event service → Event schemas: accepts event data (evidence: `app/services/event_service.py`)
- Event service → Event model: queries and writes (evidence: `app/services/event_service.py`)
- Event model → DB sessions: uses declarative base (evidence: `app/models/event.py`)
- User model → DB sessions: uses declarative base (evidence: `app/models/user.py`)
- DB sessions → SQLite database: connects to (evidence: `app/database.py`)
- Event model → User model: relates to owner (evidence: `app/models/event.py`)
- User model → Event model: relates to events (evidence: `app/models/user.py`)
