-
BACKUP_ENCRYPTION_KEY - If you lose or change this, ALL previous backups become unrecoverable
- Currently stored in Proton Pass
- Used for Fernet encryption (AES-128-CBC + HMAC)
-
Pre-Deploy Command in Render - MUST remain empty
- Any migration command will fail due to pre-existing tables
- Migrations are handled in start_render.sh
- Problem: Badge was counting to 99 during streaming (incrementing per chunk)
- Fix: Only increment once on first chunk when
assistantMessage.content === '' - File:
frontend/src/components/chat/ChatInterface.tsxline 287
- Problem: Study Materials panel had two scrollbars (outer Paper + inner List)
- Fix: Removed
overflow: 'auto'from Paper, used flexbox layout - Files:
App.tsxline 283,ContentSelector.tsxline 129
- Problem: API keys checked at import time before env vars loaded
- Fix: Use
@propertydecorator for runtime checking - Files:
claude_service.py,openai_fallback.py
# If chat is blank/empty
1. Check API keys are set in Render env vars
2. Verify @property decorators in place
3. Check credentials: 'omit' in ChatInterface.tsx
# If build fails on Render
1. Ensure Pre-Deploy is EMPTY
2. Check build_starter.sh has Unix line endings
3. Verify requirements.txt is complete
# If PostgreSQL won't connect locally (Windows)
Use port 5433, not 5432
# If backup fails
Check BACKUP_TOKEN matches between GitHub and Render- Username: dropout_taekwondo
- Password: (in your password manager)
- Test on: https://aistudyarchitect.com
-
Why Claude Primary, OpenAI Fallback?
- Claude: 93.7% on HumanEval (better for education)
- OpenAI: 92.0% (good fallback)
- Socratic questioning works better with Claude
-
Why No Redis?
- MockRedisClient works fine for current scale
- Saves $0-20/month
- Can add Upstash later if needed
-
Why 7 Agents?
- Each has specific role in learning process
- Not arbitrary - designed for cognitive development
- Lead Tutor orchestrates the others
# Every deployment
git add . && git commit -m "type: message" && git push
# Vercel deploys immediately
# Render takes 2-3 minutes
# Verify deployment
curl https://ai-study-architect.onrender.com/api/v1/healthMUST HAVE:
- ANTHROPIC_API_KEY
- OPENAI_API_KEY
- DATABASE_URL (auto-set by Render)
- BACKUP_ENCRYPTION_KEY (NEVER CHANGE)
NICE TO HAVE:
- R2/S3 backup credentials
- BACKUP_TOKEN
AUTO-GENERATED (don't set manually):
- SECRET_KEY
- JWT_SECRET_KEY
- Add video URL to README.md line 2
- Version tagged: v1.0.0
- Live site: https://aistudyarchitect.com
- GitHub: https://github.com/belumume/ai-study-architect
- Check Render logs first - usually shows the issue
- Frontend issues - Check Vercel function logs
- Can't fix it? - Rollback in Render/Vercel dashboard
- Still broken? - Restore from R2/S3 backup
- Add Ollama for local/private AI option
- Implement WebSockets for better real-time feel
- Add voice input/output for accessibility
- Create mobile app with React Native
- Add collaborative study features
- Rotate API keys quarterly (set calendar reminder)
- Test backup restore monthly
- Never commit secrets to git
- Keep BACKUP_ENCRYPTION_KEY safe
- Use different passwords for dev/prod
Last Updated: 2025-08-24 Next Review: Before any major changes Contact: Check GitHub issues if you forget something