# pouliotalexis/novaflow architecture

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

- Interactive diagram: https://gitdiagram.com/pouliotalexis/novaflow
- Repository: https://github.com/pouliotalexis/novaflow

## Overview

NovaFlow is a student-oriented Life OS: its web interface brings chat, Moodle, documents, calendar, tasks, and focus tools together. The main user path runs from the frontend through the FastAPI application to domain services and persisted or externally sourced data. The README documents major product capabilities; sampled source and the SOURCE INDEX support selected backend calls and storage links. Some frontend/API wiring and unsampled integrations are therefore shown only where documented, or omitted.

Main entry points: [`backend/app/api/routes/chat.py`](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/api/routes/chat.py) (API routes), [`backend/app/main.py`](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/services/automation.py`](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/automation.py) (Automations), [`backend/app/services/context_builder.py`](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/context_builder.py) (Context builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web app<br/>[page.tsx]"]
  node_chat_ui["Chat view<br/>[page.tsx]"]
  node_dashboard["Dashboard tools<br/>[CalendarView.tsx]"]
end

subgraph group_api["Application API"]
  node_api_routes["API routes<br/>[chat.py]"]
  node_app_entry["FastAPI app<br/>[main.py]"]
  node_auth["Authentication<br/>[auth_service.py]"]
end

subgraph group_intelligence["AI and documents"]
  node_context["Context builder<br/>[context_builder.py]"]
  node_ai["Hybrid AI<br/>[ai_engine.py]"]
  node_privacy["Sanitizer<br/>[sanitizer.py]"]
  node_rag["RAG ingestion and search<br/>[ingest.py]"]
end

subgraph group_productivity["Planning and sync"]
  node_automation["Automations<br/>[automation.py]"]
  node_tasks["Task manager<br/>[task_manager.py]"]
  node_events["Event manager<br/>[event_manager.py]"]
  node_calendar["Calendar aggregation<br/>[aggregator.py]"]
  node_moodle["Moodle sync"]
  node_focus["Focus mode<br/>[focus_manager.py]"]
  node_notifications["Notifications"]
end

subgraph group_persistence["Data and integrations"]
  node_sql[("Relational database<br/>[database.py]")]
  node_models["Data models<br/>[models.py]"]
  node_google["Google services<br/>[google.py]"]
  node_microsoft["Microsoft calendar<br/>[outlook.py]"]
end

node_user(("User"))
node_external_ai{{"AI providers"}}
node_vector_store[("Vector store")]
node_moodle_service{{"Moodle"}}
node_drive{{"Google Drive"}}

node_user -->|"uses"| node_web
node_web -->|"calls API"| node_api_routes
node_chat_ui -->|"sends chat"| node_api_routes
node_api_routes -.->|"handled by"| node_app_entry
node_app_entry -->|"uses"| node_auth
node_api_routes -->|"builds context"| node_context
node_api_routes -->|"requests response"| node_ai
node_api_routes -->|"searches documents"| node_rag
node_context -->|"reads tasks"| node_tasks
node_context -->|"reads events"| node_events
node_context -->|"retrieves context"| node_rag
node_app_entry -->|"sanitizes prompts"| node_privacy
node_ai -->|"queries providers"| node_external_ai
node_rag -->|"indexes and searches"| node_vector_store
node_app_entry -->|"starts workflows"| node_automation
node_automation -->|"manages tasks"| node_tasks
node_automation -->|"manages events"| node_events
node_automation -->|"syncs calendars"| node_calendar
node_automation -->|"syncs Moodle"| node_moodle
node_app_entry -->|"uses notifications"| node_notifications
node_dashboard -.->|"displays tasks"| node_tasks
node_dashboard -.->|"displays calendar"| node_calendar
node_dashboard -.->|"offers focus mode"| node_focus
node_tasks -->|"reads and writes"| node_sql
node_events -->|"reads and writes"| node_sql
node_models -->|"defines schema"| node_sql
node_calendar -->|"aggregates Google"| node_google
node_calendar -->|"aggregates Outlook"| node_microsoft
node_moodle -.->|"synchronizes"| node_moodle_service
node_google -->|"syncs documents"| node_drive

click node_web "https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/app/page.tsx"
click node_chat_ui "https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/app/chat/%5BcourseId%5D/page.tsx"
click node_dashboard "https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/components/CalendarView.tsx"
click node_api_routes "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/api/routes/chat.py"
click node_app_entry "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/main.py"
click node_auth "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/auth_service.py"
click node_context "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/context_builder.py"
click node_ai "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/ai_engine.py"
click node_privacy "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/sanitizer.py"
click node_rag "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/rag_engine/ingest.py"
click node_automation "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/automation.py"
click node_tasks "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/task_manager.py"
click node_events "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/event_manager.py"
click node_calendar "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/aggregator.py"
click node_moodle "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/moodle_sync_service.py"
click node_focus "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/focus_manager.py"
click node_notifications "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/notification_manager.py"
click node_sql "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/db/database.py"
click node_models "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/db/models.py"
click node_google "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/google.py"
click node_microsoft "https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/outlook.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_web,node_chat_ui,node_dashboard,node_user toneBlue
class node_api_routes,node_app_entry,node_auth,node_vector_store toneAmber
class node_context,node_ai,node_privacy,node_rag toneMint
class node_automation,node_tasks,node_events,node_calendar,node_moodle,node_focus,node_notifications toneRose
class node_sql,node_models,node_google,node_microsoft,node_external_ai,node_moodle_service,node_drive toneIndigo
```

## Components

### User experience

- [Web app](https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Chat view](https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/app/chat/%5BcourseId%5D/page.tsx): `frontend/src/app/chat/[courseId]/page.tsx`
- [Dashboard tools](https://github.com/pouliotalexis/novaflow/blob/main/frontend/src/components/CalendarView.tsx): `frontend/src/components/CalendarView.tsx`

### Application API

- [API routes](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/api/routes/chat.py): `backend/app/api/routes/chat.py`
- [FastAPI app](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`

### AI and documents

- [Context builder](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/context_builder.py): `backend/app/services/context_builder.py`
- [Hybrid AI](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/ai_engine.py): `backend/app/services/ai_engine.py`
- [Sanitizer](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/sanitizer.py): `backend/app/services/sanitizer.py`
- [RAG ingestion and search](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/rag_engine/ingest.py): `backend/app/services/rag_engine/ingest.py`

### Planning and sync

- [Automations](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/automation.py): `backend/app/services/automation.py`
- [Task manager](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/task_manager.py): `backend/app/services/task_manager.py`
- [Event manager](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/event_manager.py): `backend/app/services/event_manager.py`
- [Calendar aggregation](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/aggregator.py): `backend/app/services/calendar_sync/aggregator.py`
- [Moodle sync](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/moodle_sync_service.py): `backend/app/services/moodle_sync_service.py`
- [Focus mode](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/focus_manager.py): `backend/app/services/focus_manager.py`
- [Notifications](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/notification_manager.py): `backend/app/services/notification_manager.py`

### Data and integrations

- [Relational database](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/db/database.py): `backend/app/db/database.py`
- [Data models](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/db/models.py): `backend/app/db/models.py`
- [Google services](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/google.py): `backend/app/services/calendar_sync/google.py`
- [Microsoft calendar](https://github.com/pouliotalexis/novaflow/blob/main/backend/app/services/calendar_sync/outlook.py): `backend/app/services/calendar_sync/outlook.py`

### Other components

- **User**
- **AI providers**
- **Vector store**
- **Moodle**
- **Google Drive**

## Connections

- User → Web app: uses
- Web app → API routes: calls API
- Chat view → API routes: sends chat (evidence: `backend/app/api/routes/chat.py`)
- API routes → FastAPI app: handled by (evidence: `backend/app/main.py`)
- FastAPI app → Authentication: uses (evidence: `backend/app/services/auth_service.py`)
- API routes → Context builder: builds context (evidence: `backend/app/api/routes/chat.py`)
- API routes → Hybrid AI: requests response (evidence: `backend/app/api/routes/chat.py`)
- API routes → RAG ingestion and search: searches documents (evidence: `backend/app/api/routes/chat.py`)
- Context builder → Task manager: reads tasks (evidence: `backend/app/services/context_builder.py`)
- Context builder → Event manager: reads events (evidence: `backend/app/services/context_builder.py`)
- Context builder → RAG ingestion and search: retrieves context (evidence: `backend/app/services/context_builder.py`)
- FastAPI app → Sanitizer: sanitizes prompts (evidence: `backend/app/main.py`)
- Hybrid AI → AI providers: queries providers (evidence: `backend/app/services/ai_engine.py`)
- RAG ingestion and search → Vector store: indexes and searches
- FastAPI app → Automations: starts workflows (evidence: `backend/app/main.py`)
- Automations → Task manager: manages tasks (evidence: `backend/app/services/automation.py`)
- Automations → Event manager: manages events (evidence: `backend/app/services/automation.py`)
- Automations → Calendar aggregation: syncs calendars (evidence: `backend/app/services/automation.py`)
- Automations → Moodle sync: syncs Moodle (evidence: `backend/app/services/automation.py`)
- FastAPI app → Notifications: uses notifications (evidence: `backend/app/main.py`)
- Dashboard tools → Task manager: displays tasks
- Dashboard tools → Calendar aggregation: displays calendar
- Dashboard tools → Focus mode: offers focus mode
- Task manager → Relational database: reads and writes (evidence: `backend/app/services/task_manager.py`)
- Event manager → Relational database: reads and writes (evidence: `backend/app/services/event_manager.py`)
- Data models → Relational database: defines schema (evidence: `backend/app/db/models.py`)
- Calendar aggregation → Google services: aggregates Google (evidence: `backend/app/services/calendar_sync/aggregator.py`)
- Calendar aggregation → Microsoft calendar: aggregates Outlook (evidence: `backend/app/services/calendar_sync/aggregator.py`)
- Moodle sync → Moodle: synchronizes
- Google services → Google Drive: syncs documents
