# punith-techub/aura architecture

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

- Interactive diagram: https://gitdiagram.com/punith-techub/aura
- Repository: https://github.com/punith-techub/aura

## Overview

AURA is a browser-based multi-model chat and response-comparison dashboard, with account access, chat history, and an admin control panel. The main workflow is user prompts into the dashboard, streamed responses from selected model providers, and chat state saved in Firebase. Admins monitor Firebase user records and can change account status and trigger email notices. The page excerpt confirms Firebase use and its visual components; it does not show the page’s API requests, so those workflow links are marked unverified.

Main entry points: [`app/page.tsx`](https://github.com/punith-techub/aura/blob/main/app/page.tsx) (Chat Dashboard), [`app/api/compare/route.ts`](https://github.com/punith-techub/aura/blob/main/app/api/compare/route.ts) (Compare API), [`app/admin/page.tsx`](https://github.com/punith-techub/aura/blob/main/app/admin/page.tsx) (Admin Console), [`app/api/admin-action/route.ts`](https://github.com/punith-techub/aura/blob/main/app/api/admin-action/route.ts) (Admin Email API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["User Dashboard"]
  node_dashboard_page["Chat Dashboard<br/>[page.tsx]"]
end

subgraph group_comparison["Model Comparison"]
  node_compare_api["Compare API<br/>[route.ts]"]
  node_openrouter["OpenRouter Models"]
  node_groq["Groq Models"]
  node_gemini["Gemini API"]
end

subgraph group_accounts["Accounts and Admin"]
  node_firebase[("Firebase Firestore")]
  node_admin_page["Admin Console<br/>[page.tsx]"]
  node_admin_api["Admin Email API<br/>[route.ts]"]
  node_gmail["Gmail SMTP"]
  node_otp_api["OTP Email API<br/>[route.ts]"]
end

subgraph group_visuals["Visual Effects"]
  node_aura_background["Aura Background<br/>[AuraBackground.tsx]"]
  node_comet_cursor["Comet Cursor<br/>[CometCursor.tsx]"]
end

node_user(("Dashboard User"))

node_user -->|"uses"| node_dashboard_page
node_dashboard_page -->|"reads and writes"| node_firebase
node_dashboard_page -.->|"requests comparisons"| node_compare_api
node_compare_api -->|"streams models"| node_openrouter
node_compare_api -->|"streams fallback"| node_groq
node_compare_api -->|"streams responses"| node_gemini
node_dashboard_page -->|"renders"| node_aura_background
node_dashboard_page -->|"renders"| node_comet_cursor
node_admin_page -->|"reads and updates"| node_firebase
node_admin_page -->|"requests notices"| node_admin_api
node_admin_api -->|"sends email"| node_gmail
node_dashboard_page -.->|"requests codes"| node_otp_api
node_otp_api -->|"sends email"| node_gmail

click node_dashboard_page "https://github.com/punith-techub/aura/blob/main/app/page.tsx"
click node_compare_api "https://github.com/punith-techub/aura/blob/main/app/api/compare/route.ts"
click node_admin_page "https://github.com/punith-techub/aura/blob/main/app/admin/page.tsx"
click node_admin_api "https://github.com/punith-techub/aura/blob/main/app/api/admin-action/route.ts"
click node_otp_api "https://github.com/punith-techub/aura/blob/main/app/api/send-otp/route.ts"
click node_aura_background "https://github.com/punith-techub/aura/blob/main/app/components/AuraBackground.tsx"
click node_comet_cursor "https://github.com/punith-techub/aura/blob/main/app/components/CometCursor.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_dashboard_page,node_user toneBlue
class node_compare_api,node_openrouter,node_groq,node_gemini toneAmber
class node_firebase,node_admin_page,node_admin_api,node_gmail,node_otp_api toneMint
class node_aura_background,node_comet_cursor toneRose
```

## Components

### User Dashboard

- [Chat Dashboard](https://github.com/punith-techub/aura/blob/main/app/page.tsx): `app/page.tsx`

### Model Comparison

- [Compare API](https://github.com/punith-techub/aura/blob/main/app/api/compare/route.ts): `app/api/compare/route.ts`
- **OpenRouter Models**
- **Groq Models**
- **Gemini API**

### Accounts and Admin

- **Firebase Firestore**
- [Admin Console](https://github.com/punith-techub/aura/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Admin Email API](https://github.com/punith-techub/aura/blob/main/app/api/admin-action/route.ts): `app/api/admin-action/route.ts`
- **Gmail SMTP**
- [OTP Email API](https://github.com/punith-techub/aura/blob/main/app/api/send-otp/route.ts): `app/api/send-otp/route.ts`

### Visual Effects

- [Aura Background](https://github.com/punith-techub/aura/blob/main/app/components/AuraBackground.tsx): `app/components/AuraBackground.tsx`
- [Comet Cursor](https://github.com/punith-techub/aura/blob/main/app/components/CometCursor.tsx): `app/components/CometCursor.tsx`

### Other components

- **Dashboard User**

## Connections

- Dashboard User → Chat Dashboard: uses
- Chat Dashboard → Firebase Firestore: reads and writes (evidence: `app/page.tsx`)
- Chat Dashboard → Compare API: requests comparisons
- Compare API → OpenRouter Models: streams models (evidence: `app/api/compare/route.ts`)
- Compare API → Groq Models: streams fallback (evidence: `app/api/compare/route.ts`)
- Compare API → Gemini API: streams responses (evidence: `app/api/compare/route.ts`)
- Chat Dashboard → Aura Background: renders (evidence: `app/page.tsx`)
- Chat Dashboard → Comet Cursor: renders (evidence: `app/page.tsx`)
- Admin Console → Firebase Firestore: reads and updates (evidence: `app/admin/page.tsx`)
- Admin Console → Admin Email API: requests notices (evidence: `app/admin/page.tsx`)
- Admin Email API → Gmail SMTP: sends email (evidence: `app/api/admin-action/route.ts`)
- Chat Dashboard → OTP Email API: requests codes
- OTP Email API → Gmail SMTP: sends email (evidence: `app/api/send-otp/route.ts`)
