Metadata-Version: 2.4
Name: aimarket-atlas
Version: 0.1.0
Summary: ATLAS — planetary physical-sensor map over GAIA relays (LIVE/SIM pins + Analyst)
Author: AICOM (alexar76)
License-Expression: MIT
Project-URL: Homepage, https://atlas.modelmarket.dev/
Project-URL: Documentation, https://github.com/alexar76/atlas
Project-URL: Repository, https://github.com/alexar76/atlas
Project-URL: Issues, https://github.com/alexar76/atlas/issues
Project-URL: Landing, https://alexar76.github.io/atlas/
Keywords: atlas,gaia,iot,sensors,maplibre,aimarket,aicom,fastapi
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: FastAPI
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.115.0
Requires-Dist: uvicorn[standard]>=0.34.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: orjson>=3.10.0
Requires-Dist: pydantic>=2.11.0
Requires-Dist: pydantic-settings>=2.9.0
Requires-Dist: PyYAML>=6.0.2
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Requires-Dist: httpx>=0.28; extra == "dev"
Dynamic: license-file

# ATLAS

<!-- aicom-readme-badges -->
<p align="center">
  <a href="https://github.com/alexar76/atlas/actions/workflows/ci.yml"><img src="docs/badges/ci.svg" alt="CI" /></a>
  <a href="https://github.com/alexar76/atlas/actions/workflows/pages.yml"><img src="https://github.com/alexar76/atlas/actions/workflows/pages.yml/badge.svg" alt="Pages deploy" /></a>
  <a href="https://alexar76.github.io/atlas/"><img src="docs/badges/landing.svg" alt="Landing" /></a>
  <a href="https://iot.modelmarket.dev/"><img src="docs/badges/gaia.svg" alt="GAIA relays" /></a>
  <a href="https://atlas.modelmarket.dev/"><img src="docs/badges/demo.svg" alt="demo status" /></a>
  <a href="https://pypi.org/project/aimarket-atlas/"><img src="docs/badges/pypi.svg" alt="PyPI" /></a>
  <img src="docs/badges/python.svg" alt="Python >=3.11" />
  <img src="docs/badges/tests.svg" alt="64 tests passed" />
  <img src="docs/badges/docker.svg" alt="Docker ready" />
  <img src="docs/badges/maplibre.svg" alt="MapLibre SPA" />
  <img src="docs/badges/deepseek.svg" alt="DeepSeek default" />
  <a href="LICENSE"><img src="docs/badges/license.svg" alt="License: MIT" /></a>
</p>
<!-- /aicom-readme-badges -->

<p align="center">
  <strong>ATLAS</strong> — planetary physical-sensor map over <a href="https://iot.modelmarket.dev/">GAIA</a> relays<br/>
  Honest <strong>LIVE</strong> vs <strong>SIM</strong> pins · part of the <a href="https://github.com/alexar76">alexar76</a> AI agent economy
</p>

<p align="center">
  <a href="https://atlas.modelmarket.dev/">
    <img src="docs/screenshots/readme/hero-orbit.png" alt="ATLAS — Earth from orbit with live sensor constellation" width="820">
  </a>
  <br>
  <sub>Weather · air · tide · grid · quake · energy — <a href="https://atlas.modelmarket.dev/"><b>live map →</b></a> · <a href="https://alexar76.github.io/atlas/"><b>landing →</b></a> · <a href="#quick-start"><b>run locally →</b></a></sub>
</p>

<p align="center">
  <strong><a href="https://atlas.modelmarket.dev/">Live map</a></strong>
  ·
  <strong><a href="https://alexar76.github.io/atlas/">Landing</a></strong>
  ·
  <strong><a href="docs/GUIDE.md">Guide (EN)</a></strong>
  ·
  <strong><a href="https://iot.modelmarket.dev/">GAIA</a></strong>
  ·
  <strong><a href="https://magic-ai-factory.com/monitor/">Alien Monitor</a></strong>
</p>

**Docs:** [EN](docs/GUIDE.md) · [RU](docs/i18n/GUIDE.ru.md) · [ES](docs/i18n/GUIDE.es.md) · [FR](docs/i18n/GUIDE.fr.md) · [ZH](docs/i18n/GUIDE.zh.md)

ATLAS is the ecosystem **physical sensor map**: weather, air quality, tides, UK grid carbon, earthquakes, and energy plotted from [GAIA](https://iot.modelmarket.dev/) relays. Pins are labelled **LIVE** only when GAIA exposes an upstream provenance `source` URL; simulators are **SIM**. It ships as the **`atlas`** node on [Alien Monitor](https://magic-ai-factory.com/monitor/) (`/embed` preview + full-map CTA) and includes **ATLAS Analyst** (DeepSeek `deepseek-v4-pro` by default) with prompt-injection firewall, LLM retries, reply language matching the question (fallback: UI locale), and a full **AICOM / AIMarket ecosystem brief** so the assistant can answer Hub / ARGUS / Metis / GAIA questions — not only sensor readings.

## Gallery

<p align="center">
  <img src="docs/screenshots/readme/map.png" alt="ATLAS full map" width="820"><br>
  <sub>Full map · layers · LIVE/SIM badges · in-view list</sub>
</p>

<p align="center">
  <img src="docs/screenshots/readme/analyst.png" alt="ATLAS Analyst" width="400">
  &nbsp;
  <img src="docs/screenshots/readme/embed.png" alt="ATLAS embed" width="400"><br>
  <sub>ATLAS Analyst · Alien Monitor embed</sub>
</p>

## Surfaces

| Surface | URL / path |
|---------|------------|
| **Public map** | https://atlas.modelmarket.dev/ |
| Landing (Pages) | https://alexar76.github.io/atlas/ |
| Alien Monitor embed | `/embed` |
| Health | `/health` |
| Snapshot / viewport / station | `/api/v1/*` |
| Monitor payload | `/api/v1/monitor` |
| Analyst chat | `/api/ai/ask` |

## Quick start

```bash
pip install aimarket-atlas
export DEEPSEEK_API_KEY=sk-…   # optional Analyst
export ATLAS_GAIA_URL=https://iot.modelmarket.dev
atlas --host 127.0.0.1 --port 9330
open http://127.0.0.1:9330/
```

Docker:

```bash
docker compose -f docker-compose.local.yml up -d --build
open http://127.0.0.1:9330/
```

From a monorepo checkout (editable):

```bash
cd atlas
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
atlas --reload --host 127.0.0.1 --port 9330
```

## Production

```bash
# From monorepo root (factory host):
./scripts/deploy_atlas.sh --remote root@<host>
# Public UI (no password): https://atlas.modelmarket.dev/
```

## Load model

| Mechanism | Role |
|-----------|------|
| Cheap fleet poll | Pins only |
| Viewport readings | Sensors **in the visible bbox** |
| Click detail | Human-readable card + shared TTL cache |
| LIVE vs SIM | `source` present ⇒ LIVE; else SIM (GAIA rule) |
| Single-flight | One GAIA call per sensor under concurrency |
| SSE | Fleet snapshot fan-out |
| Analyst | Server snapshot + firewall + retries; language = question ∥ UI locale |

Buyers **cannot** pass lat/lon into GAIA invoke — anchors are operator env on GAIA.

## Tests

```bash
pip install -e ".[dev]"
# or: pip install -r backend/requirements.txt -r backend/requirements-dev.txt
pytest -q
```

Mocked GAIA — no network required. **51** tests.

## Alien Monitor

Node id `atlas` · env `ALIEN_ATLAS_URL` / `ALIEN_PUBLIC_ATLAS_URL` · panel: LIVE/SIM sensors + `/embed` iframe + full map CTA.

## License / attribution

MIT — see [LICENSE](LICENSE).

Map UI over GAIA relays. Open-Meteo CC BY 4.0; NWS/USGS/NOAA U.S. public domain; UK Carbon Intensity open data.
