# sanithreddy06/control-center architecture

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

- Interactive diagram: https://gitdiagram.com/sanithreddy06/control-center
- Repository: https://github.com/sanithreddy06/control-center

## Overview

Control Center is a private, authenticated personal hub. Users sign in, then work through dashboard and productivity modules; each module's API route validates access and reads or writes Supabase. The README also documents vault-protected document storage, owner-only cross-domain analytics, reminders, weather, settings, and PWA offline support. Sampled API code confirms the key data paths; unsampled features are represented by their documented source directories, with uncertain internal wiring omitted.

Main entry points: [`src/app/api`](https://github.com/sanithreddy06/control-center/tree/main/src/app/api) (Feature APIs), [`src/components/layout/AppShell.tsx`](https://github.com/sanithreddy06/control-center/blob/main/src/components/layout/AppShell.tsx) (Protected app shell), [`src/components/dashboard/DashboardSummary.tsx`](https://github.com/sanithreddy06/control-center/blob/main/src/components/dashboard/DashboardSummary.tsx) (Dashboard), [`src/auth.ts`](https://github.com/sanithreddy06/control-center/blob/main/src/auth.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["Protected app shell<br/>[AppShell.tsx]"]
  node_dashboard["Dashboard"]
  node_login["Login<br/>[page.tsx]"]
  node_offline["Offline fallback<br/>[page.tsx]"]
end

subgraph group_productivity["Personal tools"]
  node_notes["Notes<br/>[NotesPage.tsx]"]
  node_todos["Todos<br/>[TodosPage.tsx]"]
  node_exams["Exams<br/>[ExamsPage.tsx]"]
  node_calendar["Calendar<br/>[CalendarPage.tsx]"]
  node_bookmarks["Bookmarks<br/>[BookmarksPage.tsx]"]
  node_documents["Documents vault<br/>[DocumentsPage.tsx]"]
  node_search["Universal search<br/>[SearchPage.tsx]"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
  node_analytics["Analytics dashboard<br/>[AnalyticsPage.tsx]"]
end

subgraph group_services["Application services"]
  node_api["Feature APIs"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_reminders["Reminder service<br/>[route.ts]"]
  node_weather["Weather service<br/>[route.ts]"]
  node_tracking["Analytics tracking<br/>[route.ts]"]
end

subgraph group_platform["External services"]
  node_supabase[("Supabase")]
  node_storage[("Document storage")]
  node_weather_provider["Weather and geocoding"]
end

node_user(("User"))
node_external_sites(("Owner's websites"))

node_user -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"checks account"| node_supabase
node_user -->|"opens modules"| node_app
node_app -->|"shows"| node_dashboard
node_app -->|"opens"| node_notes
node_app -->|"opens"| node_todos
node_app -->|"opens"| node_exams
node_app -->|"opens"| node_calendar
node_app -->|"opens"| node_bookmarks
node_app -->|"opens"| node_documents
node_app -->|"opens"| node_search
node_app -->|"opens"| node_settings
node_app -->|"opens"| node_analytics
node_notes -->|"requests notes"| node_api
node_todos -->|"requests tasks"| node_api
node_exams -->|"requests exams"| node_api
node_calendar -->|"requests events"| node_api
node_bookmarks -->|"requests links"| node_api
node_documents -->|"requests files"| node_api
node_search -->|"searches records"| node_api
node_settings -->|"updates settings"| node_api
node_dashboard -->|"loads summary"| node_api
node_api -->|"requires user"| node_auth
node_api -->|"reads and writes"| node_supabase
node_api -->|"stores files"| node_storage
node_dashboard -->|"loads forecast"| node_weather
node_weather -->|"fetches forecast"| node_weather_provider
node_tracking -->|"records visits"| node_supabase
node_external_sites -.->|"sends page views"| node_tracking
node_analytics -->|"loads traffic"| node_api
node_api -->|"serves reminders"| node_reminders
node_offline -.->|"fallback for"| node_app

click node_app "https://github.com/sanithreddy06/control-center/blob/main/src/components/layout/AppShell.tsx"
click node_dashboard "https://github.com/sanithreddy06/control-center/blob/main/src/components/dashboard/DashboardSummary.tsx"
click node_login "https://github.com/sanithreddy06/control-center/blob/main/src/app/login/page.tsx"
click node_notes "https://github.com/sanithreddy06/control-center/blob/main/src/components/notes/NotesPage.tsx"
click node_todos "https://github.com/sanithreddy06/control-center/blob/main/src/components/todos/TodosPage.tsx"
click node_exams "https://github.com/sanithreddy06/control-center/blob/main/src/components/exams/ExamsPage.tsx"
click node_calendar "https://github.com/sanithreddy06/control-center/blob/main/src/components/calendar/CalendarPage.tsx"
click node_bookmarks "https://github.com/sanithreddy06/control-center/blob/main/src/components/bookmarks/BookmarksPage.tsx"
click node_documents "https://github.com/sanithreddy06/control-center/blob/main/src/components/documents/DocumentsPage.tsx"
click node_search "https://github.com/sanithreddy06/control-center/blob/main/src/components/search/SearchPage.tsx"
click node_settings "https://github.com/sanithreddy06/control-center/blob/main/src/components/settings/SettingsPage.tsx"
click node_analytics "https://github.com/sanithreddy06/control-center/blob/main/src/components/analytics/AnalyticsPage.tsx"
click node_api "https://github.com/sanithreddy06/control-center/tree/main/src/app/api"
click node_auth "https://github.com/sanithreddy06/control-center/blob/main/src/auth.ts"
click node_reminders "https://github.com/sanithreddy06/control-center/blob/main/src/app/api/reminders/route.ts"
click node_weather "https://github.com/sanithreddy06/control-center/blob/main/src/app/api/weather/route.ts"
click node_tracking "https://github.com/sanithreddy06/control-center/blob/main/src/app/api/analytics/track/route.ts"
click node_offline "https://github.com/sanithreddy06/control-center/blob/main/src/app/offline/page.tsx"

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_dashboard,node_login,node_offline,node_user toneBlue
class node_notes,node_todos,node_exams,node_calendar,node_bookmarks,node_documents,node_search,node_settings,node_analytics toneAmber
class node_api,node_auth,node_reminders,node_weather,node_tracking toneMint
class node_supabase,node_storage,node_weather_provider toneRose
class node_external_sites toneIndigo
```

## Components

### App experience

- [Protected app shell](https://github.com/sanithreddy06/control-center/blob/main/src/components/layout/AppShell.tsx): `src/components/layout/AppShell.tsx`
- [Dashboard](https://github.com/sanithreddy06/control-center/blob/main/src/components/dashboard/DashboardSummary.tsx): `src/components/dashboard/DashboardSummary.tsx`
- [Login](https://github.com/sanithreddy06/control-center/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Offline fallback](https://github.com/sanithreddy06/control-center/blob/main/src/app/offline/page.tsx): `src/app/offline/page.tsx`

### Personal tools

- [Notes](https://github.com/sanithreddy06/control-center/blob/main/src/components/notes/NotesPage.tsx): `src/components/notes/NotesPage.tsx`
- [Todos](https://github.com/sanithreddy06/control-center/blob/main/src/components/todos/TodosPage.tsx): `src/components/todos/TodosPage.tsx`
- [Exams](https://github.com/sanithreddy06/control-center/blob/main/src/components/exams/ExamsPage.tsx): `src/components/exams/ExamsPage.tsx`
- [Calendar](https://github.com/sanithreddy06/control-center/blob/main/src/components/calendar/CalendarPage.tsx): `src/components/calendar/CalendarPage.tsx`
- [Bookmarks](https://github.com/sanithreddy06/control-center/blob/main/src/components/bookmarks/BookmarksPage.tsx): `src/components/bookmarks/BookmarksPage.tsx`
- [Documents vault](https://github.com/sanithreddy06/control-center/blob/main/src/components/documents/DocumentsPage.tsx): `src/components/documents/DocumentsPage.tsx`
- [Universal search](https://github.com/sanithreddy06/control-center/blob/main/src/components/search/SearchPage.tsx): `src/components/search/SearchPage.tsx`
- [Settings](https://github.com/sanithreddy06/control-center/blob/main/src/components/settings/SettingsPage.tsx): `src/components/settings/SettingsPage.tsx`
- [Analytics dashboard](https://github.com/sanithreddy06/control-center/blob/main/src/components/analytics/AnalyticsPage.tsx): `src/components/analytics/AnalyticsPage.tsx`

### Application services

- [Feature APIs](https://github.com/sanithreddy06/control-center/tree/main/src/app/api): `src/app/api`
- [Authentication](https://github.com/sanithreddy06/control-center/blob/main/src/auth.ts): `src/auth.ts`
- [Reminder service](https://github.com/sanithreddy06/control-center/blob/main/src/app/api/reminders/route.ts): `src/app/api/reminders/route.ts`
- [Weather service](https://github.com/sanithreddy06/control-center/blob/main/src/app/api/weather/route.ts): `src/app/api/weather/route.ts`
- [Analytics tracking](https://github.com/sanithreddy06/control-center/blob/main/src/app/api/analytics/track/route.ts): `src/app/api/analytics/track/route.ts`

### External services

- **Supabase**
- **Document storage**
- **Weather and geocoding**

### Other components

- **User**
- **Owner's websites**

## Connections

- User → Login: signs in
- Login → Authentication: authenticates
- Authentication → Supabase: checks account
- User → Protected app shell: opens modules
- Protected app shell → Dashboard: shows
- Protected app shell → Notes: opens
- Protected app shell → Todos: opens
- Protected app shell → Exams: opens
- Protected app shell → Calendar: opens
- Protected app shell → Bookmarks: opens
- Protected app shell → Documents vault: opens
- Protected app shell → Universal search: opens
- Protected app shell → Settings: opens
- Protected app shell → Analytics dashboard: opens
- Notes → Feature APIs: requests notes
- Todos → Feature APIs: requests tasks
- Exams → Feature APIs: requests exams
- Calendar → Feature APIs: requests events
- Bookmarks → Feature APIs: requests links
- Documents vault → Feature APIs: requests files
- Universal search → Feature APIs: searches records
- Settings → Feature APIs: updates settings
- Dashboard → Feature APIs: loads summary
- Feature APIs → Authentication: requires user
- Feature APIs → Supabase: reads and writes
- Feature APIs → Document storage: stores files
- Dashboard → Weather service: loads forecast
- Weather service → Weather and geocoding: fetches forecast
- Analytics tracking → Supabase: records visits
- Owner's websites → Analytics tracking: sends page views
- Analytics dashboard → Feature APIs: loads traffic
- Feature APIs → Reminder service: serves reminders
- Offline fallback → Protected app shell: fallback for
