# teagamer/projectwithregestration architecture

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

- Interactive diagram: https://gitdiagram.com/teagamer/projectwithregestration
- Repository: https://github.com/teagamer/projectwithregestration

## Overview

Alex is a browser-based AI assistant centered on a calendar: users sign in, chat with the assistant, manage calendar events, and optionally use voice input or profile settings. The calendar page coordinates chat, event parsing and editing, reminders, and local-note migration; service modules make requests to a separate API. Login and registration, profile editing, and the dashboard provide adjacent account workflows. The source excerpts show key calls, but the README is empty and backend implementations are absent, so those services are represented as external. Some routes and UI capabilities are known only from the file tree or documented configuration.

Main entry points: [`app/Kalendar/page.tsx`](https://github.com/teagamer/projectwithregestration/blob/main/app/Kalendar/page.tsx) (Calendar Workspace), [`app/Login/page.tsx`](https://github.com/teagamer/projectwithregestration/blob/main/app/Login/page.tsx) (Login & Register), [`app/components/Profile.tsx`](https://github.com/teagamer/projectwithregestration/blob/main/app/components/Profile.tsx) (Profile Editor), [`app/services/chatService.ts`](https://github.com/teagamer/projectwithregestration/blob/main/app/services/chatService.ts) (Chat Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account &amp; Profile"]
  node_login["Login &amp; Register<br/>[page.tsx]"]
  node_dashboard["Dashboard Settings<br/>[page.tsx]"]
  node_profile["Profile Editor<br/>[Profile.tsx]"]
  node_profile_config["Profile Config<br/>[profileConfig.ts]"]
  node_timezone["Timezone Helpers"]
  node_profile_hook["Profile Modal Hook<br/>[useProfileModal.ts]"]
end

subgraph group_calendar["Calendar Workflow"]
  node_calendar_page["Calendar Workspace<br/>[page.tsx]"]
  node_calendar_utils["Calendar Sorting<br/>[calendarUtils.ts]"]
  node_calendar_service["Calendar Service<br/>[calendarService.ts]"]
end

subgraph group_assistant["AI Assistant"]
  node_chat_ui["Chat Component<br/>[Chat.tsx]"]
  node_chat_service["Chat Service<br/>[chatService.ts]"]
  node_voice_hook["Voice Chat Hook<br/>[useVoiceChat.ts]"]
end

subgraph group_auth["Session Security"]
  node_demo_route["Demo Login Route<br/>[route.ts]"]
  node_demo_auth["Demo Session Signing<br/>[demoAuth.ts]"]
  node_middleware["Session Middleware<br/>[middleware.ts]"]
end

node_visitor(("User"))
node_api{{"Application API"}}

node_visitor -->|"signs in"| node_login
node_login -->|"requests auth"| node_api
node_visitor -->|"uses calendar"| node_calendar_page
node_calendar_page -->|"renders"| node_profile
node_calendar_page -->|"uses modal state"| node_profile_hook
node_calendar_page -->|"resolves timezone"| node_timezone
node_calendar_page -->|"sorts notes"| node_calendar_utils
node_calendar_page -->|"manages events"| node_calendar_service
node_calendar_service -->|"requests calendar"| node_api
node_calendar_page -->|"sends messages"| node_chat_service
node_chat_ui -->|"calls chat API"| node_chat_service
node_chat_service -->|"requests chat"| node_api
node_calendar_page -->|"uses voice controls"| node_voice_hook
node_visitor -->|"opens settings"| node_dashboard
node_dashboard -->|"returns to calendar"| node_calendar_page
node_profile -->|"updates profile"| node_api
node_profile -->|"normalizes timezone"| node_timezone
node_login -->|"uses user model"| node_profile_config
node_profile -->|"uses user model"| node_profile_config
node_login -->|"sets timezone"| node_timezone
node_demo_route -->|"creates session"| node_demo_auth
node_demo_route -->|"sets session cookie"| node_visitor
node_middleware -->|"verifies session"| node_demo_auth

click node_login "https://github.com/teagamer/projectwithregestration/blob/main/app/Login/page.tsx"
click node_dashboard "https://github.com/teagamer/projectwithregestration/blob/main/app/Dashboard/page.tsx"
click node_profile "https://github.com/teagamer/projectwithregestration/blob/main/app/components/Profile.tsx"
click node_profile_config "https://github.com/teagamer/projectwithregestration/blob/main/app/constants/profileConfig.ts"
click node_timezone "https://github.com/teagamer/projectwithregestration/blob/main/app/constants/countryTimezones.ts"
click node_calendar_page "https://github.com/teagamer/projectwithregestration/blob/main/app/Kalendar/page.tsx"
click node_calendar_utils "https://github.com/teagamer/projectwithregestration/blob/main/app/Kalendar/calendarUtils.ts"
click node_calendar_service "https://github.com/teagamer/projectwithregestration/blob/main/app/services/calendarService.ts"
click node_chat_ui "https://github.com/teagamer/projectwithregestration/blob/main/app/components/Chat.tsx"
click node_chat_service "https://github.com/teagamer/projectwithregestration/blob/main/app/services/chatService.ts"
click node_voice_hook "https://github.com/teagamer/projectwithregestration/blob/main/app/hooks/useVoiceChat.ts"
click node_profile_hook "https://github.com/teagamer/projectwithregestration/blob/main/app/hooks/useProfileModal.ts"
click node_demo_route "https://github.com/teagamer/projectwithregestration/blob/main/app/api/demo-login/route.ts"
click node_demo_auth "https://github.com/teagamer/projectwithregestration/blob/main/app/lib/demoAuth.ts"
click node_middleware "https://github.com/teagamer/projectwithregestration/blob/main/middleware.ts"

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_login,node_dashboard,node_profile,node_profile_config,node_timezone,node_profile_hook,node_visitor toneBlue
class node_calendar_page,node_calendar_utils,node_calendar_service toneAmber
class node_chat_ui,node_chat_service,node_voice_hook,node_api toneMint
class node_demo_route,node_demo_auth,node_middleware toneRose
```

## Components

### Account & Profile

- [Login & Register](https://github.com/teagamer/projectwithregestration/blob/main/app/Login/page.tsx): `app/Login/page.tsx`
- [Dashboard Settings](https://github.com/teagamer/projectwithregestration/blob/main/app/Dashboard/page.tsx): `app/Dashboard/page.tsx`
- [Profile Editor](https://github.com/teagamer/projectwithregestration/blob/main/app/components/Profile.tsx): `app/components/Profile.tsx`
- [Profile Config](https://github.com/teagamer/projectwithregestration/blob/main/app/constants/profileConfig.ts): `app/constants/profileConfig.ts`
- [Timezone Helpers](https://github.com/teagamer/projectwithregestration/blob/main/app/constants/countryTimezones.ts): `app/constants/countryTimezones.ts`
- [Profile Modal Hook](https://github.com/teagamer/projectwithregestration/blob/main/app/hooks/useProfileModal.ts): `app/hooks/useProfileModal.ts`

### Calendar Workflow

- [Calendar Workspace](https://github.com/teagamer/projectwithregestration/blob/main/app/Kalendar/page.tsx): `app/Kalendar/page.tsx`
- [Calendar Sorting](https://github.com/teagamer/projectwithregestration/blob/main/app/Kalendar/calendarUtils.ts): `app/Kalendar/calendarUtils.ts`
- [Calendar Service](https://github.com/teagamer/projectwithregestration/blob/main/app/services/calendarService.ts): `app/services/calendarService.ts`

### AI Assistant

- [Chat Component](https://github.com/teagamer/projectwithregestration/blob/main/app/components/Chat.tsx): `app/components/Chat.tsx`
- [Chat Service](https://github.com/teagamer/projectwithregestration/blob/main/app/services/chatService.ts): `app/services/chatService.ts`
- [Voice Chat Hook](https://github.com/teagamer/projectwithregestration/blob/main/app/hooks/useVoiceChat.ts): `app/hooks/useVoiceChat.ts`

### Session Security

- [Demo Login Route](https://github.com/teagamer/projectwithregestration/blob/main/app/api/demo-login/route.ts): `app/api/demo-login/route.ts`
- [Demo Session Signing](https://github.com/teagamer/projectwithregestration/blob/main/app/lib/demoAuth.ts): `app/lib/demoAuth.ts`
- [Session Middleware](https://github.com/teagamer/projectwithregestration/blob/main/middleware.ts): `middleware.ts`

### Other components

- **User**
- **Application API**

## Connections

- User → Login & Register: signs in (evidence: `app/Login/page.tsx`)
- Login & Register → Application API: requests auth (evidence: `app/Login/page.tsx`)
- User → Calendar Workspace: uses calendar (evidence: `app/Kalendar/page.tsx`)
- Calendar Workspace → Profile Editor: renders (evidence: `app/Kalendar/page.tsx`)
- Calendar Workspace → Profile Modal Hook: uses modal state (evidence: `app/Kalendar/page.tsx`)
- Calendar Workspace → Timezone Helpers: resolves timezone (evidence: `app/Kalendar/page.tsx`)
- Calendar Workspace → Calendar Sorting: sorts notes (evidence: `app/Kalendar/page.tsx`)
- Calendar Workspace → Calendar Service: manages events (evidence: `app/Kalendar/page.tsx`)
- Calendar Service → Application API: requests calendar (evidence: `app/services/calendarService.ts`)
- Calendar Workspace → Chat Service: sends messages (evidence: `app/Kalendar/page.tsx`)
- Chat Component → Chat Service: calls chat API (evidence: `app/components/Chat.tsx`)
- Chat Service → Application API: requests chat (evidence: `app/services/chatService.ts`)
- Calendar Workspace → Voice Chat Hook: uses voice controls (evidence: `app/Kalendar/page.tsx`)
- User → Dashboard Settings: opens settings (evidence: `app/Dashboard/page.tsx`)
- Dashboard Settings → Calendar Workspace: returns to calendar (evidence: `app/Dashboard/page.tsx`)
- Profile Editor → Application API: updates profile (evidence: `app/components/Profile.tsx`)
- Profile Editor → Timezone Helpers: normalizes timezone (evidence: `app/components/Profile.tsx`)
- Login & Register → Profile Config: uses user model (evidence: `app/Login/page.tsx`)
- Profile Editor → Profile Config: uses user model (evidence: `app/components/Profile.tsx`)
- Login & Register → Timezone Helpers: sets timezone (evidence: `app/Login/page.tsx`)
- Demo Login Route → Demo Session Signing: creates session (evidence: `app/api/demo-login/route.ts`)
- Demo Login Route → User: sets session cookie (evidence: `app/api/demo-login/route.ts`)
- Session Middleware → Demo Session Signing: verifies session (evidence: `middleware.ts`)
