Architecture
Athena ERP consists of three main components:- Backend API: FastAPI application (Python 3.12+)
- Frontend: React application built with Vite
- Database: PostgreSQL 16+ (managed via Supabase or self-hosted)
Deployment Options
Athena ERP can be deployed in several configurations:1. Production (Recommended)
- Backend: Railway, Render, or any Python hosting platform
- Frontend: Vercel, Netlify, or Cloudflare Pages
- Database: Supabase (managed PostgreSQL)
- Storage: Cloudflare R2 for document uploads
2. Docker Compose (Development/Testing)
- Full stack running locally with Docker
- PostgreSQL container included
- Best for development and testing
3. Self-Hosted
- Deploy all components on your own infrastructure
- Full control over environment and scaling
- Requires more maintenance
Prerequisites
Before deploying, ensure you have:- Python 3.12 or higher (for backend)
- Node.js 18+ (for frontend)
- PostgreSQL 16+ database
- Domain name (for production)
- SSL certificates (handled by hosting platforms)
Quick Start
Follow these steps for a production deployment:- Database Setup: Create a Supabase project or PostgreSQL database
- Backend Deployment: Deploy the FastAPI application
- Run Migrations: Apply Alembic database migrations
- Frontend Deployment: Build and deploy the React application
- Environment Configuration: Set all required environment variables
- Create Admin User: Run the superadmin creation script
Security Checklist
Before going live, verify:-
JWT_SECRETis a strong, randomly generated secret -
ENVIRONMENTis set toproduction - Database credentials are secure and not exposed
- CORS origins are restricted to your frontend domain
- HTTPS is enabled for all services
- Supabase service role key is only in backend (never frontend)
- Sentry is configured for error tracking (optional)
Monitoring
Health Checks
The API provides health check endpoints:GET /health- Basic health statusGET /api/v1/health- Detailed health information
Error Tracking
Configure Sentry DSN in environment variables for automatic error reporting:Next Steps
Backend Deployment
Deploy the FastAPI backend to Railway or other platforms
Frontend Deployment
Build and deploy the React frontend
Database Setup
Configure PostgreSQL and run migrations
Environment Variables
Complete reference of all configuration options
Support
For deployment issues:- Check the logs from your hosting platform
- Verify all environment variables are set correctly
- Test database connectivity
- Review the API health endpoint