A production-ready SaaS system that predicts hospital surge capacity, recommends resource allocation, provides public health advisories, and enables multi-agent healthcare intelligence for event-driven healthcare management.
FestSafe AI ingests real-time and historical data to:
- Predict hospital surge capacity for events (festivals, concerts, marathons)
- Recommend optimal resource allocation (staffing, supplies, beds)
- Provide public health advisories
- Enable multi-agent decision-making for healthcare operations
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Frontend ββββββΆβ Backend ββββββΆβ ML Service β
β (React) βββββββ (FastAPI) βββββββ (PyTorch) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β
βΌ
ββββββββββββββββ
β PostgreSQL β
β (TimescaleDB)β
ββββββββββββββββ
β
βββββββββ΄ββββββββ
β β
βββββββββΌβββββ ββββββββΌβββββββ
β Redis β β Kafka/ β
β (Cache) β β RabbitMQ β
ββββββββββββββ βββββββββββββββ
- Docker & Docker Compose
- Python 3.10+
- Node.js 18+
- PostgreSQL 14+ (or use Docker)
- Redis (or use Docker)
-
Clone the repository
git clone <repo-url> cd "FestSafe AI"
-
Start infrastructure services
docker-compose -f infra/docker-compose.dev.yml up -d
-
Generate synthetic data
cd ml/training python data_simulator.py --hospitals 50 --events 10 --days 90 -
Train initial model
python train.py --config configs/baseline.yaml
-
Start backend
cd backend pip install -r requirements.txt uvicorn app.main:app --reload --port 8000 -
Start frontend
cd frontend npm install npm start -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
docker-compose -f infra/docker-compose.dev.yml up --buildFestSafe AI/
βββ frontend/ # React + TypeScript frontend
βββ backend/ # FastAPI backend
βββ ml/ # ML training and inference
β βββ training/ # Model training scripts
β βββ inference/ # Model serving
βββ infra/ # Infrastructure as code
β βββ terraform/ # AWS infrastructure
β βββ k8s/ # Kubernetes manifests
βββ ci/ # CI/CD workflows
βββ docs/ # Documentation
βββ tests/ # Integration and E2E tests
- Real-time Forecasting: Predict patient surge with <500ms latency
- Multi-Agent System: Orchestrated agents for forecasting, triage, and communication
- Event Management: Register and track festivals, concerts, and other events
- Resource Recommendations: AI-powered staffing and supply suggestions
- Public Health Advisories: Automated communication for affected areas
- HIPAA-Conscious Design: Privacy-preserving defaults and encryption
# Backend tests
cd backend
pytest tests/ -v --cov=app
# Frontend tests
cd frontend
npm test
# Integration tests
pytest tests/integration/ -v- Prometheus metrics: http://localhost:9090
- Grafana dashboards: http://localhost:3001
- MLflow tracking: http://localhost:5000
- JWT-based authentication
- RBAC (Role-Based Access Control)
- TLS encryption in transit
- Database encryption at rest
- PII anonymization on ingestion
- Audit logging
- Frontend: React, TypeScript, Tailwind CSS, React Query, Recharts, Mapbox GL
- Backend: FastAPI, PostgreSQL (TimescaleDB), Redis, RabbitMQ
- ML: PyTorch, scikit-learn, MLflow
- Infrastructure: Docker, Kubernetes, Terraform, AWS
- CI/CD: GitHub Actions
- Monitoring: Prometheus, Grafana, Loki, Sentry
See LICENSE file.
See CONTRIBUTING.md for guidelines.
This system provides suggestions and references only. All medical decisions require clinician review and approval. The system does not provide prescriptive medical advice.