# Terminal 1 - Backend
cd backend
python main.py
# Terminal 2 - Frontend
cd frontend
python -m http.server 3000
# Access: http://localhost:3000# Dockerfile for backend
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]- Create account on Railway.app or Render.com
- Connect GitHub repository
- Add environment variables:
ANTHROPIC_API_KEYFASTAPI_PORT=8000DEBUG_MODE=False
- Deploy - automatic!
- Upload frontend folder to Vercel/Netlify
- Update API_URL in all HTML files:
const API_URL = 'https://your-backend-url.com';
- Deploy - done!
DEBUG_MODE=True
ALLOWED_ORIGINS=http://localhost:3000
USE_MOCK_RESPONSES=FalseDEBUG_MODE=False
ALLOWED_ORIGINS=https://your-frontend-domain.com
USE_MOCK_RESPONSES=False
ANTHROPIC_API_KEY=sk-ant-xxxxx- Use HTTPS in production
- Secure API keys (never commit to git)
- Set proper CORS origins
- Implement rate limiting
- Add authentication (if needed)
- Use environment variables for secrets
# Use connection pooling for Claude API
# Cache frequent queries
# Implement request rate limiting// Use debouncing for user inputs
// Implement lazy loading for products
// Cache API responsescurl http://localhost:8000/health# View backend logs
tail -f backend/logs/app.log- Use Redis for session storage
- Deploy multiple backend instances
- Add load balancer
- Use CDN for frontend
- Implement caching strategy
Development (Free):
- Claude API: Free tier (limited requests)
- Hosting: Local/GitHub Pages
Production (Small):
- Claude API: ~$50/month (depends on usage)
- Backend hosting: $5-10/month (Railway/Render)
- Frontend hosting: Free (Vercel/Netlify)
- Total: ~$55-60/month
Production (Medium - 10k users):
- Claude API: ~$500/month
- Backend: $50/month (scaled instances)
- Database: $25/month (PostgreSQL)
- Total: ~$575/month
- Check error logs
- Monitor API usage
- Review session data
- Update dependencies
- Security audit
- Performance review
- Cost optimization
- Feature updates
For Techathon Demo: Local deployment is perfect! ✅