A modern, secure, and scalable multi-tenant Odoo SaaS platform built with microservices architecture.
- Modern Architecture: Microservices with FastAPI backend and React frontend
- Security First: JWT authentication, 2FA, rate limiting, input validation
- High Performance: Redis caching, connection pooling, optimized queries
- Scalable: Kubernetes-ready with horizontal pod autoscaling
- Production Ready: Comprehensive testing, monitoring, and CI/CD
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ React SPA │ │ API Gateway │ │ Auth Service │
│ (Frontend) │◄──►│ (FastAPI) │◄──►│ (JWT + 2FA) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌───────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐
│ Tenant │ │ Billing │ │ Backup │
│ Service │ │ Service │ │ Service │
└──────────────┘ └─────────────┘ └────────────┘
│ │ │
┌───────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐
│ PostgreSQL │ │ Redis │ │ S3 │
│ (Primary) │ │ (Cache/Jobs)│ │ (Backups) │
└──────────────┘ └─────────────┘ └────────────┘
- FastAPI: High-performance Python web framework
- PostgreSQL: Primary database with connection pooling
- Redis: Caching and background job queue
- Celery: Distributed task queue
- SQLAlchemy: ORM with Alembic migrations
- Pydantic: Data validation and serialization
- React 18: Modern UI library with hooks
- TypeScript: Type-safe JavaScript
- Material-UI: Professional component library
- React Query: Data fetching and caching
- Socket.IO: Real-time communication
- Docker: Containerization
- Kubernetes: Container orchestration
- Nginx: Reverse proxy and load balancer
- Prometheus: Monitoring and metrics
- Grafana: Visualization and dashboards
# Clone the repository
git clone <repository-url>
cd odoo-saas-platform
# Start with Docker Compose
docker-compose up -d
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs# Deploy to Kubernetes
kubectl apply -f infrastructure/kubernetes/
# Or use Helm
helm install odoo-saas ./infrastructure/helm/odoo-saas-platform/
├── backend/ # FastAPI backend service
│ ├── app/
│ │ ├── api/ # API routes and endpoints
│ │ ├── core/ # Core configuration and security
│ │ ├── models/ # Database models
│ │ ├── services/ # Business logic services
│ │ └── utils/ # Utility functions
│ ├── tests/ # Backend tests
│ └── migrations/ # Database migrations
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── utils/ # Utility functions
│ │ └── types/ # TypeScript type definitions
│ └── public/ # Static assets
├── infrastructure/ # Deployment and infrastructure
│ ├── docker/ # Docker configurations
│ ├── kubernetes/ # Kubernetes manifests
│ └── terraform/ # Infrastructure as code
├── docs/ # Documentation
└── scripts/ # Utility scripts
- Authentication: JWT tokens with refresh mechanism
- Authorization: Role-based access control (RBAC)
- Two-Factor Authentication: TOTP support
- Rate Limiting: Per-endpoint and per-user limits
- Input Validation: Comprehensive Pydantic validation
- Security Headers: CORS, CSP, and security headers
- Audit Logging: Complete audit trail
- Encryption: Data encryption at rest and in transit
- Caching: Multi-level Redis caching
- Connection Pooling: Optimized database connections
- Background Jobs: Async processing with Celery
- Query Optimization: Indexed queries and materialized views
- CDN Support: Static asset optimization
- Compression: Response compression and minification
All configuration is managed through environment variables:
# Database
DATABASE_URL=postgresql://user:pass@localhost/db
REDIS_URL=redis://localhost:6379
# Security
SECRET_KEY=your-secret-key
JWT_SECRET_KEY=your-jwt-secret
# External Services
AWS_ACCESS_KEY_ID=your-aws-key
STRIPE_SECRET_KEY=your-stripe-key- Health Checks: Kubernetes-ready health endpoints
- Metrics: Prometheus metrics collection
- Logging: Structured JSON logging
- Tracing: Distributed tracing support
- Alerts: Configurable alerting rules
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# Integration tests
docker-compose -f docker-compose.test.yml up- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.