Files
lifetrack/.env.example
T
MeeJayandClaude Opus 5 93f0689c1e Initial import: LifeTrack v1 (santé, vape, finances)
Tracker de vie auto-hébergé : suivi poids/calories/sport avec planning de
pesées, sevrage tabac (vape) avec modèle de coût DIY et économies, et
finances personnelles avec import de relevés bancaires.

Architecture : FastAPI + SQLAlchemy 2.0 + PostgreSQL 16, React 18 + TS +
Vite + Tailwind + ECharts, déploiement Docker Compose. Modules
auto-découverts des deux côtés (pkgutil / import.meta.glob) et framework
de connecteurs à deux voies (importeurs de fichiers + ingestion JSON)
pour brancher de nouvelles sources sans toucher au noyau.

Validé : 292 tests pytest, tsc + vite build, contrat API/web vérifié
contre le schéma OpenAPI, et déploiement Docker réel sur PostgreSQL 16
(28 tables, SPA servie par nginx, wizard de premier démarrage).

Documentation : README.md, docs/GUIDE.md, CONVENTIONS.md, et les
documents de conception et de recherche dans docs/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:48:57 +02:00

38 lines
1.7 KiB
Bash

# LifeTrack — copy to .env next to docker-compose.yml, then edit.
# cp .env.example .env
# .env is git-ignored (C7): it is the only place secrets live.
# --- PostgreSQL ---------------------------------------------------------
POSTGRES_USER=lifetrack
# Ends up inside LIFETRACK_DATABASE_URL: keep it URL-safe (letters/digits/-/_),
# a '@', ':' or '/' would break the connection string.
# openssl rand -hex 16
POSTGRES_PASSWORD=change-me
POSTGRES_DB=lifetrack
# --- API (every name is LIFETRACK_ + a field of app/core/config.py) ------
# MUST be overridden: it signs the JWTs. openssl rand -hex 32
LIFETRACK_JWT_SECRET=generate-a-long-random-string
# Default timezone of the daily aggregations (?tz= overrides it per request).
LIFETRACK_TIMEZONE=Europe/Paris
# Max size of an uploaded import file, in bytes (20 MiB). Keep it <= the
# client_max_body_size of docker/nginx.conf (25m).
# LIFETRACK_MAX_UPLOAD_BYTES=20971520
# Dev only (Vite dev server without the nginx proxy). JSON array, not a bare
# list: pydantic-settings parses complex fields as JSON.
# LIFETRACK_CORS_ORIGINS=["http://localhost:5173"]
# Dev/tests only: comma-separated whitelist of backend modules (empty = all).
# Read straight from the environment by app/core/module_loader.py.
# LIFETRACK_MODULES=auth,imports,health
# --- Published ports ----------------------------------------------------
# The SPA (nginx). This is the URL you open in a browser.
WEB_PORT=80
# The API, exposed for /api/docs and the device ingestion endpoints.
API_PORT=8000
# --- Build ---------------------------------------------------------------
# Empty by default. On a host with less than ~2 GB of RAM, cap the V8 heap so
# `vite build` cannot be OOM-killed:
# NODE_OPTIONS=--max-old-space-size=1024