A modular data platform for end-to-end analytics, data pipeline orchestration, machine learning model registry in local open-source environments or for a commercial cloud setup.
The project, as an example, used public air-quality data.
The main goal was an educational one.
Key Services:
Dagster, Superset, pgAdmin, MinIO, MLflow, JupyterLab, Grafana
Services are deployed via
Docker:
Analytics:
pgAdmin:
PostgreSQL database web management tool.http://localhost:5050
Superset:
Data visualization and dashboarding platform.http://localhost:8090
Data Science:
JupyterLab:
Interactive data analysis notebooks.http://localhost:8888
Monitoring Resources:
Documentation.
-
Grafana:
Visualize metrics and build dashboards.http://localhost:3000 -
Prometheus:
Metrics collection and time-series storage. -
Loki:
Centralized log aggregation and querying. -
Alertmanager:
Manage and route monitoring alerts. -
Promtail:
Collect and forward container logs. -
Caddy:
Secure reverse proxy and gateway.
Orchestration Data Pipelines:
Dagster:
Orchestrate and schedule data pipelines.http://localhost:5000
Database:
PostgreSQL:
Relational database for structured data.via client, not web: localhost:5432
Unstructured Data Storage / Datalake:
MinIO:
S3-compatible object data storage.
- API:
http://localhost:9000 - Web:
http://localhost:9001
- API:
Machine Learning Models Registry:
MLflow:
Track and manage ML models.http://localhost:5005
In-Memory, Key-Value, Database:
Redis:
Fast in-memory cache and queue used for Superset.
(Optional) Team Collaboration:
Mattermost:
Team chat and collaboration platform.http://localhost:8065
For Services Deployment:
For Cloud Deployment:
Tested Operating System:
Ubuntu 22.04.5 LTS
Linux
-
Clone the repository
git clone https://github.com/Luk-kar/SmogSense.git cd SmogSense -
Configure environment variables
cp .env.example .env # Open .env in your editor and adjust passwords, users or ports etc. -
Start services with Docker Compose
docker-compose up --build -d
-
Verify everything is running
docker ps # You should see: # smogsense_postgres, smogsense_pgadmin, smogsense_minio... etc
-
Access the application Open
Dagster at:
http://localhost:5000Run example tasks:
- upload_example_project_data_to_minio
- restore_example_project_database
-
Troubleshooting
Check asset logs for service issues -
Stop all services
docker compose stop
-
Remove all services from the machine and their resources
docker compose down -v
See server_deployment/README.md
🌐 Data Sources:
- GIOS API
Air quality data (stations, measurements, AQI) - Statistical API (GUS BDL)
Health and demographic statistics - Custom JSON Endpoint
Geospatial province data - Twitter (X) API
Social media data
✅ Data Quality:
Assets include automated Dagster checks for validation.
Example validation logic: air_quality/assets/annual_statistics/validations
🏗️ Dagster services setup:
See README.md
- Look at .env.example.
⚠️ Avoid storing secrets in .env for production - use dedicated secrets management- Security tags:
#SECRETS: Passwords/API keys requiring secure handling#WARNING: Critical configuration needing attention
Automated tests for data acquisition features:
tests/run_tests_data_air_quality.shor
tests/run_tests_all.sh-
Implementing a mapping table is more efficient than repeatedly dropping/recreating tables to unify schemas from disparate sources.
Advantages:
- Schema Preservation: Maintains original source structures
- Data Integrity: Avoids destructive operations
- Maintainability: Simplifies schema evolution
- Performance: Enables incremental updates without redefining foreign keys
This pattern is particularly valuable in ETL pipelines with independently changing source schemas.
-
Superset dashboard exports may encounter compatibility issues when imported on different machines.
Integrate
Jenkins for CI/CD automation.
Workflow:
- Code Commit: Changes pushed to repo
- Build Trigger: Jenkins detects changes
- Test Execution:
Uses development data environments (MinIO/PostgreSQL) to protect production data - Result Reporting: Archived logs and reports
- Deployment:
Development: Uses dev data environments
Production: Moves tested pipelines to production
Benefits:
- Automated testing on commit
- Pipeline-as-code via
Jenkinsfile - Build/test reporting and alerts
- Plugin ecosystem integration
MIT License - See LICENSE


