Skip to content

f1sherFM/AirTrace-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirTrace v2

CI Production Assets Python FastAPI Postgres Redis Status

Standalone repository for the new AirTrace core: v2 API, Python SSR web app, Postgres-backed alerts, Telegram delivery, and production deployment assets.

Live Status

What v2 Contains

  • Stable public readonly API:
    • GET /v2/current
    • GET /v2/forecast
    • GET /v2/history
    • GET /v2/trends
    • GET /v2/health
  • Alert write paths:
    • POST /v2/alerts
    • GET /v2/alerts
    • GET /v2/alerts/{id}
    • PATCH /v2/alerts/{id}
    • DELETE /v2/alerts/{id}
  • Python SSR web:
    • city pages
    • history and trends pages
    • compare UI
    • alerts settings UI
    • explainability blocks
  • Production foundation:
    • Docker deployment profile
    • Postgres + Redis stack
    • Sentry integration
    • GitHub Actions safety net
    • VPS runbook

Architecture

api/v1/            legacy compatibility adapter
api/v2/            stable public v2 API
application/       use cases, queries, SSR web layer
domain/            AQI, NMU, confidence, pollutants
infrastructure/    DB, repositories, cache, providers
core/              app factory, lifecycle, settings
web/               Python SSR app, templates, static assets
config/            runtime config and cities mapping
docs/              roadmap, ADRs, ops and deployment docs
tests/             regression, contract, SSR, migration gates

Quick Start

Local setup

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python start_app.py

After startup:

Local env

The repo supports local .env loading. Typical local variables:

ALERTS_API_KEY=...
TELEGRAM_BOT_TOKEN=...
SENTRY_DSN=...
API_BASE_URL=http://127.0.0.1:8000

Production

Main deployment assets:

Repository Notes

  • main is the active branch for AirTrace-v2
  • this repository is the primary home for ongoing v2 work
  • the original Airtrace-RU repo is now the legacy/historical reference

Split provenance:

Key Docs

Testing

Examples:

.\.venv\Scripts\python -m pytest tests\test_stage0_ssr_smoke.py -q
.\.venv\Scripts\python -m pytest tests\test_v2_contract.py -q
.\.venv\Scripts\python -m pytest tests\test_stage5_alerts_ui.py -q

CI already checks:

  • compile safety
  • focused regression pack
  • production compose assets

Current Focus

  • post-deploy hardening
  • alerts UX polish
  • continued cleanup of remaining legacy weight inside v2

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors