How temkin236/aura-ai works
AURA AI is an editorial chat companion: users choose a persona and submit a prompt, then read a streamed or fallback response in a conversation. The main flow is visible from the workspace through the Express server to Gemini and back; the server also persists authenticated conversation messages. Auth, conversation APIs, PostgreSQL access, persona configuration, markdown rendering, settings, and the prototype admin console are distinct supporting capabilities. Some client/server and endpoint wiring is only partially excerpted, so unverified links are omitted.
Main entry points: App.tsx App shell · ChatWorkspace.tsx Chat workspace · server.ts API server · auth.ts Auth routes
Components 23
Chat experience
- App shell
src/App.tsx - Chat workspace
src/components/chat/ChatWorkspace.tsx - Prompt composer
src/components/chat/ChatComposer.tsx - AI personas
src/data/modes.ts - Message display
src/components/chat/ChatMessage.tsx - Markdown renderer
src/components/chat/MarkdownContent.tsx - Conversation sidebar
src/components/chat/ChatSidebar.tsx - Welcome screen
src/components/chat/WelcomeScreen.tsx
AI service
- API server
server.ts - Gemini model
- Local fallback
server.ts
Identity and data
- Auth routes
src/routes/auth.ts - Conversation routes
src/routes/conversations.ts - Auth middleware
src/middleware/auth.ts - Session and roles
src/auth/service.ts - Conversation storage
src/db/conversations.ts - PostgreSQL pool
src/db/index.ts - PostgreSQL
Product surfaces
- Landing page
src/components/landing/LandingPage.tsx - User settings
src/components/settings/SettingsModal.tsx - Admin prototype
src/components/admin/AdminDashboard.tsx - Sign-in UI
src/components/auth/AuthModal.tsx
Other components
- User
Connections 29
- User → App shell: opens
src/App.tsx - App shell → Chat workspace: renders
src/App.tsx - App shell → Landing page: renders
src/App.tsx - App shell → User settings: renders
src/App.tsx - App shell → Admin prototype: renders
src/App.tsx - App shell → Sign-in UI: renders
src/App.tsx - Chat workspace → Prompt composer: renders
src/components/chat/ChatWorkspace.tsx - Chat workspace → Message display: renders
src/components/chat/ChatWorkspace.tsx - Chat workspace → Conversation sidebar: renders
src/components/chat/ChatWorkspace.tsx - Chat workspace → Welcome screen: renders
src/components/chat/ChatWorkspace.tsx - Chat workspace → API server: requests stream
README.md - Chat workspace → AI personas: reads persona data
src/components/chat/ChatWorkspace.tsx - Prompt composer → AI personas: selects persona
src/components/chat/ChatComposer.tsx - Message display → Markdown renderer: renders content
src/components/chat/ChatMessage.tsx - API server → Gemini model: streams generation
README.md - API server → Local fallback: uses on failure
README.md - API server → Conversation routes: mounts routes
server.ts - API server → Auth routes: mounts routes
server.ts - API server → Conversation storage: persists messages
server.ts - Auth routes → Auth middleware: guards identity route
src/routes/auth.ts - Conversation routes → Auth middleware: uses authorization
src/routes/conversations.ts - Auth middleware → Session and roles: validates session
src/middleware/auth.ts - Auth routes → Session and roles: creates sessions
src/routes/auth.ts - Session and roles → PostgreSQL pool: queries database
src/auth/service.ts - Conversation storage → PostgreSQL pool: queries database
src/db/conversations.ts - PostgreSQL pool → PostgreSQL: opens connection
src/db/index.ts - Conversation routes → Conversation storage: reads and writes
src/routes/conversations.ts - App shell → Auth routes: checks session
src/App.tsx - Landing page → Markdown renderer: renders markdown
src/components/landing/LandingPage.tsx