An AI-powered platform for analyzing written and oral French productions for FLE (French as a Foreign Language) students.
The application is configured for deployment on Render with separate backend and frontend services.
- Backend: Web Service ($7/month) with persistent disk storage ($2/month)
- Frontend: Static Site (FREE)
- Total Cost: ~$9/month
- GitHub repository with your code
- Render account (sign up at https://render.com)
- OpenAI API key
-
Connect Repository: In Render dashboard, click "New +" → "Web Service"
-
Select Repository: Connect your GitHub repository
-
Configure Service:
- Name:
maister-backend - Runtime: Python 3
- Build Command:
chmod +x build.sh && ./build.sh - Start Command:
uvicorn backend.main:app --host 0.0.0.0 --port $PORT - Plan: Starter ($7/month)
- Name:
-
Add Persistent Disk:
- Go to your service → "Disks" tab
- Click "Add Disk"
- Name:
maister-data - Mount Path:
/data - Size: 2GB ($2/month)
-
Environment Variables (in Render dashboard):
OPENAI_API_KEY=your_openai_key_here PROVIDER=openai DATA_DIR=/data PYTHON_VERSION=3.13.1 LOG_LEVEL=INFO -
Deploy: Click "Create Web Service" and wait for deployment
-
Create Static Site: In Render dashboard, click "New +" → "Static Site"
-
Select Repository: Connect the same GitHub repository
-
Configure Service:
- Name:
maister-frontend - Build Command:
cd frontend && npm install && npm run build - Publish Directory:
frontend/dist
- Name:
-
Environment Variables:
VITE_API_URL=https://your-backend-service.onrender.com(Replace
your-backend-servicewith your actual backend service name) -
Deploy: Click "Create Static Site"
After frontend is deployed, update backend environment variable:
FRONTEND_URL=https://your-frontend-service.onrender.com
(Replace with your actual frontend URL)
- Test Backend: Visit
https://your-backend.onrender.com/api/health - Test Frontend: Visit your frontend URL and verify API calls work
- Monitor Logs: Check Render dashboard logs for any errors
- Verify Data Persistence: Create a test user and restart backend service to confirm data persists
Backend:
OPENAI_API_KEY- Your OpenAI API key (required)PROVIDER- Provider name, defaults to "openai"DATA_DIR- Data directory path, set to/datafor productionFRONTEND_URL- Frontend URL for CORS (set after frontend deployment)PYTHON_VERSION- Python version (3.13.1)LOG_LEVEL- Logging level (INFO)
Frontend:
VITE_API_URL- Backend API URL (required)
Backend won't start:
- Check logs in Render dashboard
- Verify
build.shhas execute permissions (handled by build command) - Ensure all environment variables are set
CORS errors:
- Verify
FRONTEND_URLenvironment variable is set correctly in backend - Check that frontend URL matches exactly (including https://)
Data not persisting:
- Verify persistent disk is mounted at
/data - Check that
DATA_DIRenvironment variable is set to/data - Ensure build script creates necessary directories
Frontend can't connect to backend:
- Verify
VITE_API_URLis set correctly in frontend environment variables - Check backend health endpoint is accessible
- Ensure backend CORS allows frontend origin
- Free Tier: Available but services spin down after 15 min inactivity (30-60s cold starts)
- Starter Plan: $7/month keeps backend always running (recommended for production)
- Persistent Disk: Required for data persistence ($1/GB/month)
Since we're using JSON files on persistent disk:
- Regularly export user data via API
- Consider migrating to PostgreSQL for better scalability
- Set up automated backups of persistent disk data
Last Updated: January 2025