# Sriphat Hospital Data Platform Modern Data Stack สำหรับโรงพยาบาลศรีพัฒน์ ประกอบด้วย: - **Nginx Proxy Manager** - Gateway + SSL - **Keycloak** - Single Sign-On (SSO) - **PostgreSQL** - Data Warehouse - **API Service** - Custom FastAPI endpoints - **Airbyte** - Data Ingestion - **Apache Superset** - Business Intelligence ## 🚀 Quick Start ### Ubuntu Server (Production) ```bash # Quick install (recommended) bash install.sh # Or manual setup sudo bash setup-ubuntu.sh # (logout/login, then continue) bash start-all.sh ``` See **[README-UBUNTU.md](README-UBUNTU.md)** for detailed Ubuntu installation guide. ### Development/Windows ```bash # 1. Configure environment notepad .env.global # 2. Start all services bash start-all.sh # 3. Access services # - Nginx Proxy Manager: http://localhost:81 # - Keycloak: http://localhost:8080 # - API Service: http://localhost/apiservice ``` ## 📁 Project Structure ``` ├── 00-network/ # Shared Docker network ├── 01-infra/ # Nginx + Keycloak + PostgreSQL ├── 03-apiservice/ # Custom FastAPI service ├── 04-ingestion/ # Airbyte ETL ├── 06-analytics/ # Apache Superset ├── .env.global # Global configuration ├── start-all.sh # Start all services ├── stop-all.sh # Stop all services └── DEPLOYMENT.md # Full deployment guide ``` ## 📖 Documentation - **[DEPLOYMENT.md](DEPLOYMENT.md)** - Complete deployment guide - **[tech_stack.md](tech_stack.md)** - Architecture blueprint - **[01-infra/README.md](01-infra/README.md)** - Infrastructure layer - **[03-apiservice/README.md](03-apiservice/README.md)** - API service details - **[04-ingestion/README.md](04-ingestion/README.md)** - Airbyte setup - **[06-analytics/README.md](06-analytics/README.md)** - Superset configuration ## 🔒 Security All services communicate via `shared_data_network` and are exposed through Nginx Proxy Manager only. Keycloak provides centralized authentication (SSO) for all components. ## 📊 API Service Custom FastAPI service with: - Admin UI for managing API keys - Permission-based access control - Integration with PostgreSQL schemas (fastapi, operationbi) - Endpoint: `POST /api/v1/feed/checkpoint` Required permission: `feed.checkpoint:write`