Refonte de l application avec:
- Frontend moderne en React + Vite
- Backend Flask API stateless
- Integration OpenRouter cote serveur (cle non exposee au client)
- Aucune persistance des conversations (alignement RGPD)
Snapshot: March 4, 2026
Done:
- F1 Personalized 30-Day Plan
- F2 Daily Check-ins
- F3 Message Lab
- F4 Before-Send Mode
- UI SaaS: homepage, chat page, coach hub, message lab, legal pages, contact
- FR/EN switch and language-aware assistant behavior
- OpenRouter backend integration (
/api/chat)
In progress:
- F7 Playbooks v1
Remaining:
- F5 Conversation Simulator
- F6 Pattern Detection
- F8 Relationship Timeline
- F9 Couple Mode
- F11 Exercise Library
- Cross-sprint: analytics instrumentation, observability, rate limiting, E2E tests
Reference docs:
docs/PRD.mddocs/SPRINT_BACKLOG.md
src/: React interfaceapp.py: Flask API (/api/chat,/api/health).env.example: environment variables (backend + frontend)
- Node.js 20+
- Python 3.11+
- Install frontend dependencies:
npm install- Install backend dependencies:
pip install -r requirements.txt- Create
.envfrom.env.exampleand set:
OPENROUTER_API_KEYOPENROUTER_MODEL(optional, defaultopenrouter/freefor free models)
Useful OpenRouter options:
OPENROUTER_MODEL=openrouter/freeroutes requests to currently available free models.- You can force a specific free model with
:freesuffix (example:meta-llama/llama-3.2-3b-instruct:free). - Optional headers:
OPENROUTER_SITE_URLandOPENROUTER_APP_NAME.
- Start Flask backend:
python app.py- In another terminal, start frontend:
npm run devFrontend calls backend through VITE_API_BASE_URL.
Health endpoint:
GET /api/health-> returnsstatus, provider, and configured model.
- User chat messages are not stored in database.
- Backend does not keep persistent conversation history.
- App logs avoid message content.
Procfile runs Flask API:
web: gunicorn app:appThis repo includes netlify.toml:
- Build command:
npm run build - Publish dir:
dist - SPA routing redirect:
/* -> /index.html - Built-in Netlify Functions for API:
/api/chat->netlify/functions/chat.js/api/health->netlify/functions/health.js
Important:
- You can deploy only on Netlify (no separate backend URL required).
- In Netlify environment variables, set:
OPENROUTER_API_KEY(required)OPENROUTER_MODEL(optional, defaultopenrouter/free)OPENROUTER_SITE_URL(optional, your Netlify site URL)OPENROUTER_APP_NAME(optional)AI_TEMPERATURE,REQUEST_TIMEOUT_SECONDS,MAX_MESSAGE_LENGTH,MAX_HISTORY_ITEMS(optional)
- If you still use an external backend, you can set
VITE_API_BASE_URL.
Quick deploy with CLI:
npx netlify-cli login
npx netlify-cli init
npx netlify-cli deploy --build
npx netlify-cli deploy --prod --build