Horizon is a production-ready AI-powered platform for detecting disease outbreaks, assessing health risks, and optimizing hospital resource allocation in real-time. Built with modern technologies and designed for healthcare organizations, public health agencies, and hospital systems.
- ML-Powered Risk Scoring: Multi-factor outbreak risk assessment by region
- Anomaly Detection: Early detection of unusual patterns in health indicators
- Risk Visualization: Interactive color-coded risk map showing regional threats
- Predictive Analytics: Forecast outbreak trends and resource demands
- Integrated Dashboard: Comprehensive hospital operations overview (Emory Hospital integration)
- Budget Management: Track and optimize hospital budget allocations
- Resource Optimization: AI-powered recommendations for capacity planning
- Financial Impact Analysis: Cost-benefit analysis for operational decisions
- Automated Alerts: Real-time notifications for high-risk situations
- Severity Classification: Critical, high, medium, and low priority alerts
- Alert Acknowledgment: Track alert status and response times
- Filtering & Search: Quickly find relevant alerts by region, severity, or status
- Natural Language Queries: Ask questions in plain English
- Context-Aware Responses: Leverages real-time data for accurate answers
- Risk Explanations: Detailed breakdowns of risk score calculations
- Actionable Insights: Data-driven recommendations for decision-makers
- Time-Series Analysis: Historical trend visualization with interactive charts
- Multi-Source Data Integration: CDC data, pharmacy trends, hospital metrics
- ETL Pipelines: Automated data ingestion and processing
- Multi-Tenant Support: Organization-level data isolation
- Clean Design: Minimalist white/black/red color scheme
- Responsive: Works on desktop, tablet, and mobile devices
- Interactive Visualizations: Charts, maps, and real-time dashboards
- Modal Details: Click-to-expand detailed information views
- FastAPI 0.104+ - Modern async Python web framework
- PostgreSQL 15+ - Relational database
- TimescaleDB - Time-series database extension
- SQLAlchemy 2.0+ - ORM for database operations
- Alembic - Database migration tool
- Prefect 2.14+ - Workflow orchestration for ETL
- OpenRouter - Multi-model LLM API access
- React 18+ with TypeScript - Modern UI framework with type safety
- Vite 5+ - Lightning-fast build tool
- Recharts 2.5+ - Data visualization library
- Axios - HTTP client for API communication
- React Router 6+ - Client-side routing
- Scikit-learn 1.3+ - Machine learning algorithms
- XGBoost 2.0+ - Gradient boosting models
- PyOD 1.1+ - Outlier/anomaly detection
- NumPy & Pandas - Data processing and analysis
- MLflow 2.9+ - ML experiment tracking
- OpenAI GPT-4 / Claude - Advanced language models via OpenRouter
- Docker & Docker Compose - Containerization
- Nginx - Web server and reverse proxy
- Gunicorn/Uvicorn - Python application servers
- Snowflake - Cloud data warehouse (configured, not yet deployed)
- Redis - Caching layer (planned)
- Grafana - Monitoring dashboards (planned)
π For comprehensive feature documentation and technology mapping, see FEATURES.md
- Docker and Docker Compose
- Python 3.11+ (for local development)
- Node.js 18+ (for frontend development)
- PostgreSQL 15+ with TimescaleDB extension
- Clone the repository:
git clone <repository-url>
cd horizon- Create a
.envfile in the backend directory:
cd backend
cp .env.example .env
# Edit .env and add your OpenRouter API key- Start all services:
docker compose up -d(Note: If you have an older Docker installation, you may need to use docker-compose instead)
- Run database migrations:
docker compose exec backend alembic upgrade head- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Create a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up PostgreSQL database:
# Install TimescaleDB extension
psql -U horizon -d horizon -c "CREATE EXTENSION IF NOT EXISTS timescaledb;"- Run migrations:
alembic upgrade head- Start the backend server:
uvicorn app.main:app --reload- Install dependencies:
cd frontend
npm install- Start the development server:
npm run devhorizon/
βββ backend/
β βββ app/
β β βββ api/ # API endpoints
β β βββ core/ # Core configuration
β β βββ models/ # Database models
β β βββ services/ # Business logic
β β βββ etl/ # ETL flows
β βββ alembic/ # Database migrations
β βββ requirements.txt
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API services
β βββ package.json
βββ docker-compose.yml
Clean landing page with platform introduction and navigation.
Central command center showing:
- Risk overview with critical/high-risk regions
- Recent alerts panel
- Emory Hospital integrated intelligence
- Budget overview with visual cards
- Resource allocation recommendations
- AI-powered recommendations
- Risk trend charts (line/bar toggle, time range selection)
- Horizon Assistant chat interface
Interactive visualization showing:
- Regional outbreak risk levels
- Color-coded severity indicators
- Click-to-view region details
- Filter by risk level
Comprehensive alert management:
- All alerts with severity badges
- Filter by severity (critical/high/medium/low)
- Filter by read/unread status
- Mark as read and acknowledge actions
- Detailed alert information
Hospital-specific intelligence dashboard:
- Facility overview with regional risk
- Budget management and tracking
- Resource capacity analysis
- AI-powered operational recommendations
- Financial impact projections
Information about platform capabilities and integrations.
GET /api/health/metrics- Get health metrics with filtersGET /api/health/search-trends- Google Trends symptom searchesGET /api/health/pharmacy- Pharmacy medication purchase dataGET /api/health/hospital-utilization- Hospital capacity and utilization
GET /api/risk/scores- Historical risk scores (filterable by region, date, level)GET /api/risk/scores/latest- Current risk scores for all regionsGET /api/risk/anomalies- Detected anomalies in health indicators
GET /api/alerts- Get alerts (filter by severity, status, region)PATCH /api/alerts/{id}/read- Mark alert as readPATCH /api/alerts/{id}/acknowledge- Acknowledge alert
GET /api/hospital/dashboard/{facility_id}- Complete hospital dashboard dataGET /api/hospital/budget/{facility_id}- Budget information and recommendationsGET /api/hospital/resources/{facility_id}- Resource allocation insightsGET /api/hospital/recommendations/{facility_id}- AI-powered recommendations
GET /api/fintech/allocations- Fund allocation simulations
POST /api/llm/query- Natural language query to Horizon AssistantPOST /api/llm/explain-risk- Get detailed risk score explanation
π Interactive API Documentation: http://localhost:8000/docs (Swagger UI)
To run Prefect ETL flows for data ingestion:
cd backend
python -m app.etl.flowsOr schedule them with Prefect Cloud/Server:
prefect deploy app/etl/flows.py:ingest_public_data_flow
prefect deploy app/etl/flows.py:ingest_synthetic_data_flowDATABASE_URL=postgresql://horizon:horizon@localhost:5432/horizon
OPENROUTER_API_KEY=your-api-key-here
OPENROUTER_MODEL=openai/gpt-4o-mini
SECRET_KEY=your-secret-key
MLFLOW_TRACKING_URI=http://localhost:5000# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test# Backend
black app/
isort app/
# Frontend
npm run lint- FEATURES.md - Comprehensive feature list with technology mapping
- PROJECT_SUMMARY.md - Project overview and implementation details
- TECH_STACK.md - Detailed technology stack documentation
- SETUP.md - Detailed setup and configuration guide
- DATA_SOURCES.md - Data sources and integration guide
- HACKATHON_GUIDE.md - Hackathon-specific guide and demos
- DEPLOYMENT.md - Deployment instructions
- API Documentation: http://localhost:8000/docs (when running)
-
Multi-Faceted Risk Assessment
- Combines multiple data sources (search trends, pharmacy data, hospital metrics)
- ML-powered anomaly detection catches early outbreak signals
- Real-time risk scoring updated continuously
-
Hospital Integration
- First platform to integrate outbreak detection with hospital operations
- AI-powered budget and resource recommendations
- Financial impact analysis for operational decisions
-
Production-Ready Architecture
- Modern async Python backend with FastAPI
- Time-series optimized database with TimescaleDB
- Containerized deployment with Docker
- Scalable ETL pipelines with Prefect
-
AI-Powered Intelligence
- Natural language assistant using state-of-the-art LLMs
- Context-aware responses based on real-time data
- Explainable AI for risk score transparency
-
Clean, Intuitive UI
- Minimalist design focused on critical information
- Responsive across all devices
- Interactive visualizations for better insights
-
Enterprise Features
- Multi-tenant architecture for multiple organizations
- Comprehensive API for integrations
- Audit trails for all actions
- Export and reporting capabilities
- Monitor outbreak risks across jurisdictions
- Early warning system for disease outbreaks
- Data-driven resource allocation decisions
- Population health trend analysis
- Optimize resource allocation based on risk levels
- Budget planning with AI recommendations
- Capacity planning for surge scenarios
- Supply chain optimization
- Track regional health trends
- Predict resource demands
- Coordinate response efforts
- Generate compliance reports
- Access to aggregated health data
- Study outbreak patterns
- Test predictive models
- Publish findings
- Multi-Tenant Data Isolation - Organization-level data separation
- Input Validation - All inputs validated with Pydantic
- SQL Injection Prevention - ORM-based database access
- CORS Configuration - Controlled API access
- Environment-based Secrets - No hardcoded credentials
- Future: HIPAA compliance, SOC2 certification, encryption at rest/transit
- Real-time websocket notifications
- Mobile app (React Native)
- Advanced geospatial visualization (Mapbox)
- User authentication & RBAC
- Email/SMS alert notifications
- Snowflake data warehouse integration
- BI tool connectors (Tableau, PowerBI)
- Advanced ML model training UI
- GraphQL API
- Multi-language support
- Automated testing suite
- Performance monitoring dashboard
- Integration marketplace
- White-label capabilities
- Enterprise SLA support
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 for Python code
- Use ESLint/Prettier for TypeScript/React
- Write tests for new features
- Update documentation as needed
For questions, issues, or feature requests:
- GitHub Issues: Create an issue
- Email: support@horizon-platform.com
- Documentation: See docs above
[Your License Here]
- CDC & OWID for public health data
- OpenRouter for LLM API access
- TimescaleDB for time-series database technology
- FastAPI community for excellent documentation
- React and TypeScript communities
Built with β€οΈ for public health
Horizon - Detecting outbreaks before they become crises.