# Stack versions — Source de vérité

> **Fichier de référence unique** pour toutes les versions de la stack Digistat.
> À mettre à jour à chaque bump de version.
> Toutes les docs (manuel technique, guide client) doivent pointer ici.

## Comment lire ce fichier

| Symbole | Signification |
|---|---|
| ✅ | Vérifié dans le code (pyproject.toml / uv.lock / .python-version) |
| 🔍 | Vérifié sur alwaysdata via SSH |
| ❓ | À vérifier / non confirmé |

## Backend (Python)

| Composant | Version | Source | État |
|---|---|---|---|
| Python (local dev) | >= 3.14 | `pyproject.toml` → `requires-python` | ✅ |
| Python (alwaysdata prod) | 3.14.5 | `project-alwaysdata-deploy.md` | 🔍 |
| Python (`.python-version`) | 3.14 | `.python-version` | ✅ |

## Framework

| Composant | Version | Source | État |
|---|---|---|---|
| **Django** | **6.0.5** | `uv.lock` | ✅ |
| django-ninja | 1.6.2 | `uv.lock` | ✅ |
| django-ninja-extra | 0.31.4 | `uv.lock` | ✅ |
| django-ninja-jwt | 5.4.4 | `uv.lock` | ✅ |
| django-ratelimit | 4.1.0 | `uv.lock` | ✅ |
| pydantic | 2.13.4 | `uv.lock` | ✅ |
| pydantic-core | 2.46.4 | `uv.lock` | ✅ |
| pydantic-settings | 2.14.1 | `uv.lock` | ✅ |
| pyjwt | 2.13.0 | `uv.lock` | ✅ |
| pillow | 12.2.0 | `uv.lock` | ✅ |
| psycopg2-binary | 2.9.12 | `uv.lock` | ✅ |
| cryptography | 49.0.0 | `uv.lock` | ✅ |
| sqids | 0.5.2 | `uv.lock` | ✅ |
| asgiref | 3.11.1 | `uv.lock` | ✅ |

## Base de données

| Composant | Version | Source | État |
|---|---|---|---|
| PostgreSQL (client psql sur alwaysdata) | 18.4 | `psql --version` | 🔍 |
| PostgreSQL (serveur distant) | ❓ | `postgresql-edorh.alwaysdata.net` | ❓ |

> **Note** : la version du client psql (18.4) n'est pas nécessairement celle du
> serveur PostgreSQL distant. À vérifier avec un `SELECT version();` SQL.

## Frontend

| Composant | Version | Source | État |
|---|---|---|---|
| Tabler.io | dernière | CDN /static/tabler/ | 🔍 |
| Bootstrap (via Tabler) | 5.x | Tabler | ✅ |
| Tailwind (via Tabler) | dernière | Tabler | 🔍 |
| tabler.min.js | dernière | local | 🔍 |

## PWA

| Composant | Version | Source | État |
|---|---|---|---|
| Service Worker | `static/sw.js` | CACHE_NAME versioning | ✅ |
| Manifest | `static/manifest.json` | — | 🔍 |

## Infrastructure

| Composant | Version | Source | État |
|---|---|---|---|
| Serveur web | Passenger | alwaysdata | 🔍 |
| OS serveur | Debian | `pg_config` output | 🔍 |

## Commandes de vérification rapide

```bash
# Versions Python locales
cd /home/edorh/django/station
.venv/bin/python -c "import django; print('Django', django.get_version())"
.venv/bin/python -c "import ninja; print('django-ninja', ninja.__version__)"

# Versions uv.lock (toutes les deps Python)
grep -A1 "name = \"" uv.lock | grep -E "^(name|version)" | paste - -

# Version Django via SSH prod
ssha 'cd ~/projetstation/station && .venv/bin/python -c "import django; print(django.get_version())"'

# Version PostgreSQL
ssha 'psql --version'

# Version SW déployée
curl -s https://station.edorh.com/static/sw.js | grep "VERSION ="
```

## Comment mettre à jour

1. Modifier `pyproject.toml` (ajuster `>=X.Y` ou changer version)
2. Lancer `uv sync` (met à jour `uv.lock`)
3. Lancer `uv lock --upgrade-package <paquet>` (bumper ciblé)
4. Commit + push
5. **Mettre à jour ce fichier** dans le même commit
6. **Mettre à jour** les guides qui mentionnent la version bumpée

## Liens

- [[manuel-technique/index.html]]
- [[guide-client/index.html]]
- [[project-alwaysdata-deploy]]
