Athena:基于 OpenAI gpt-4o-mini 的 AI 身心健康应用
vkur-78/athena-ai-wellness
Athena 是一款 AI 身心健康应用,通过 OpenAI 的 gpt-4o-mini 提供支持性对话、每日情绪打卡、私密日记与引导练习,并生成每周及每月回顾 PDF。
Your sanctuary for reflection, clarity, and mindful growth.
Live Demo
Experience Athena directly in production:
🌟 Open Athena Live Sanctuary
No registration required to explore — visitors can launch the full interactive Sample Journey directly from the landing experience.
Product Overview
Athena is an AI-powered wellness sanctuary designed to help people reflect, build mindful routines, journal, explore guided practices, understand patterns in their personal history, and engage in supportive conversations within a calm, private environment.
Athena creates an intentional space between stimulus and response. By coupling continuous longitudinal reflection with gentle AI guidance, Athena illuminates cognitive habits, celebrates emotional milestones, and fosters self-awareness.
Note
Safety & Medical Disclaimer: Athena is an AI wellness sanctuary designed for self-reflection and personal growth. Athena is not a healthcare provider, clinical diagnostic tool, or a replacement for professional medical advice, psychotherapy, or emergency psychiatric services.
Experience Athena
Sanctuary Home
Personalized reflection dashboard displaying daily rhythm, emotional weather, and quick mindfulness practices.

Supportive AI Conversations
Compassionate, context-aware dialogues with real-time streaming and safety interception.

Longitudinal Behavioral Insights
Longitudinal habit patterns, emotional weather trends, and reflection rhythms over time.

Guided Practice Studio
Immersive breathing exercises, grounding audio practices, and unguided meditation timers.

Replay & Keepsakes
Weekly and monthly reflective retrospectives synthesizing historical growth into PDF keepsakes.

Core Features
💬 AI Conversations
- Safety-aware, compassionate conversational support powered by OpenAI.
- Real-time token streaming via Server-Sent Events (SSE) with smooth typography.
- Intelligent context injection drawing from recent check-ins and reflection themes.
☀️ Daily Check-ins
- Structured emotional check-ins logging mood valence, energy, and grounding notes.
- Historical check-in tracking with instant retrospective lookup.
📖 Private Journaling
- Private journal entries with instant full-text search and historical filtering.
- Optional AI-assisted reflection prompts highlighting cognitive clarity.
🧘 Studio & Guided Practices
- Multi-modality wellness studio featuring Box Breathing, 4-7-8 Relaxation, and Body Scans.
- Atmospheric soundscapes and unguided session timers.
📊 Behavioral & Mood Insights
- Longitudinal analytics tracking mood distribution, practice duration, and reflection consistency.
- Pattern recognition detecting correlations between practices and positive affect.
🔄 Living Replay & Monthly Keepsake
- Weekly and monthly retrospectives synthesized directly from recorded check-in history.
- Branded, publication-grade Monthly Keepsake PDF export generated headlessly via ReportLab.
🛡️ Crisis Care Safeguards
- Embedded crisis resource hub with instant 24/7 emergency hotlines (988 Lifeline, Crisis Text Line, Vandrevala Foundation).
- Automatic semantic distress detection escalating immediate supportive care resources.
🌐 Localization & Multilingual Support
- Built-in localized sanctuary experiences across 6 languages:
- English
- Hindi (हिन्दी)
- Tamil (தமிழ்)
- Telugu (తెలుగు)
- Marathi (मराठी)
- Gujarati (ગુજરાતી)
Public Demo Experience
Athena provides a frictionless Sample Journey for recruiters, reviewers, and visitors:
- No Credentials Required: Click "Explore Sample Journey" on the login page to immediately experience Athena with pre-populated, realistic reflection history.
- Strictly Isolated State: Demo sessions run in an ephemeral sandbox completely isolated from real user accounts.
- Quota Safeguard: Demo sessions feature a device-bound 3-message conversational AI quota to prevent abuse.
- Clean Logout: Logging out immediately clears demo session tokens and resets the client environment.
Technology Stack
| Layer | Technology | Description |
|---|---|---|
| Frontend | Next.js 15 / React 19 / TypeScript | Server-side rendering, client state, and App Router |
| Styling | Tailwind CSS | Sanctuary design system with custom CSS token themes |
| Backend | FastAPI / Python 3.13 | High-performance asynchronous REST & SSE streaming API |
| Database | Supabase PostgreSQL | Relational database with strict Row-Level Security (RLS) |
| Authentication | Supabase Auth + JWT Verification | RS256 cryptographic signature validation |
| AI Intelligence | OpenAI (gpt-4o-mini) |
Contextual reflection, pattern synthesis, and chat |
| Streaming | Server-Sent Events (SSE) | Low-latency token-by-token streaming |
| PDF Generation | ReportLab | Headless server-side generation of Monthly Keepsake PDFs |
| Frontend Hosting | Vercel Edge Network | Global CDN edge network with automatic API proxy rewrites |
| Edge & Tunnel | Cloudflare Zero-Trust Tunnel | Secure HTTPS tunnel proxying traffic to the backend process |
| Testing | Pytest / Playwright | Automated unit, regression, and browser verification |
System Architecture
flowchart TD
Client["Client Browser / Mobile PWA"]
subgraph Edge_and_Frontend ["Edge & Frontend (Vercel)"]
NextFrontend["Next.js 15 (React 19, TypeScript)"]
NextProxy["Next.js API Rewrite Proxy (/api/*)"]
end
subgraph Secure_Tunnel ["Zero-Trust Connectivity"]
CFTunnel["Cloudflare HTTPS Tunnel"]
end
subgraph Backend_Services ["FastAPI Backend Layer"]
FastAPIApp["FastAPI Service (Python 3.13)"]
AuthMiddleware["JWT Verification & IDOR Enforcement"]
AIServices["AI Orchestrator & Safety Interceptor"]
PDFGen["ReportLab PDF Keepsake Engine"]
AnalyticsEngine["Longitudinal Analytics"]
end
subgraph External_Services ["Managed Cloud Services"]
SupabaseDB["Supabase PostgreSQL (RLS Enforced)"]
SupabaseAuth["Supabase Auth"]
OpenAIAPI["OpenAI API (gpt-4o-mini)"]
end
Client --> NextFrontend
NextFrontend --> NextProxy
NextProxy --> CFTunnel
CFTunnel --> FastAPIApp
FastAPIApp --> AuthMiddleware
AuthMiddleware --> SupabaseAuth
FastAPIApp --> AIServices
FastAPIApp --> PDFGen
FastAPIApp --> AnalyticsEngine
AIServices --> OpenAIAPI
FastAPIApp --> SupabaseDB
Loading
Detailed architectural specifications are documented in docs/ARCHITECTURE.md.
Security & Safety Engineering
Athena was engineered under privacy-by-design principles:
- Row-Level Security (RLS): Enforced pervasively on all Supabase PostgreSQL tables.
- IDOR Prevention: Server-side user identity is extracted strictly from cryptographically verified JWT claims, never client-submitted query parameters or body payloads.
- Remediated Vulnerability: An object-level authorization issue was identified in the monthly keepsake PDF endpoint during pre-production security testing and was remediated with authenticated ownership enforcement and regression test coverage.
- Zero-Secret Architecture: No credentials, tokens, or private user data are committed to the repository.
- Cross-User Isolation: Verified cross-tenant isolation ensuring zero leakage between demo sessions and authenticated user accounts.
Full security documentation is available in docs/SECURITY.md.
Quality Assurance & Verification
Athena's production release candidate was subjected to comprehensive automated verification:
| Verification Gate | Result | Details |
|---|---|---|
| Backend Test Suite | 91 / 91 Passed | Pytest unit, service, and API coverage |
| Regression Suite | 17 / 17 Passed | Full verification of reported bug remediations |
| Demo Hardening | Passed | Isolation, clean logout, and 3-message quota |
| Security & IDOR Audit | Passed | PDF ownership, JWT auth, and tenant isolation |
| Final Release Gate | Passed | Pre-production QA master suite passing |
| Responsive QA | 4 / 4 Viewports | Mobile (390px), Tablet (768px), Desktop (1024px, 1440px) |
| Frontend Production Build | 28 / 28 Pages | Next.js clean build with 0 TypeScript/lint errors |
| Runtime & Console Exceptions | 0 Errors | Clean console on live production deployment |
Production release testing completed successfully for the tested authentication, authorization, data-isolation, AI safety, responsive, and functional scenarios.
Repository Structure
athena-ai-wellness/
│
├── frontend/ # Next.js 15 React application
│ ├── app/ # App Router pages and routes
│ ├── components/ # Modular UI components (auth, checkin, chat, studio)
│ ├── context/ # React Context providers (theme, language, checkin)
│ ├── lib/ # API clients, offline sync queue, Supabase client
│ └── types/ # TypeScript interfaces and data models
│
├── backend/ # FastAPI Python backend
│ ├── ai/ # AI orchestrator, safety prompts, reflection engine
│ ├── api/ # REST & SSE endpoint routers
│ ├── auth/ # JWT validation and demo session handlers
│ ├── models/ # Pydantic schemas and database models
│ ├── services/ # Business logic, PDF generator, analytics
│ └── tests/ # Pytest test suite (91+ tests)
│
├── docs/ # Engineering documentation
│ ├── ARCHITECTURE.md # System architecture & data flow
│ ├── DEVELOPMENT.md # Local setup & testing instructions
│ ├── DEPLOYMENT.md # Production hosting & Cloudflare tunnel setup
│ └── SECURITY.md # Security, RLS, IDOR defense & safety rules
│
├── public/ # Assets & documentation media
│ ├── athena-logo.png # Athena brand logo
│ └── screenshots/ # Real production application screenshots
│
├── .env.example # Safe environment variable configuration template
├── .gitignore # Production gitignore excluding secrets & caches
├── CONTRIBUTING.md # Contribution guidelines & code standards
├── LICENSE # Source-available evaluation license
└── README.md # Product showcase & documentation
Getting Started Locally
To run Athena on your local machine:
- Clone the repository:
git clone https://github.com/vkur-78/athena-ai-wellness.git cd athena-ai-wellness - Configure
.envfrom.env.example:cp .env.example backend/.env cp .env.example frontend/.env.local
- Follow the complete step-by-step instructions in docs/DEVELOPMENT.md.
License
Athena is source-available for evaluation, interview review, and personal assessment under the terms outlined in LICENSE. All commercial rights reserved.
来源:GitHub · github.com
