v3 : socle Rust (moteur pur, accès trustinWallet, serveur) ; maquette Nuxt rangée dans maquette/
- crates/ld-engine : formule inertielle (parité avec la maquette, garde C), coquille / changement de fond, assistant d'édition à règles, composition d'un document sous vote permanent (adoptions, aperçus, rivales). - crates/trustin-access : qui voit, qui ouvre, qui gère les accès. - crates/ld-server : API axum + SQLite, connexion Ğ1 (client OAuth2 de connect.monnaie-libre.fr), invitations, entrée en vigueur automatique, signalements de contradiction, traductions éditoriales, publication git, taille de la toile lue sur la chaîne. - seeds/acte-engagement-certification.json : 33 articles, fr + en + es ; en vigueur : préambule, E1, E2 (seed a minima). - maquette/ : frontend, backend et docker v2 déplacés tels quels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
APP_NAME: str = "libreDecision"
|
||||
DEBUG: bool = True
|
||||
|
||||
# Environment
|
||||
ENVIRONMENT: str = "development" # development, staging, production
|
||||
DEMO_MODE: bool = False # Enable demo profiles (quick login) regardless of ENVIRONMENT
|
||||
LOG_LEVEL: str = "INFO"
|
||||
|
||||
# Database — SQLite by default for local dev, PostgreSQL for Docker/prod
|
||||
DATABASE_URL: str = "sqlite+aiosqlite:///./libredecision.db"
|
||||
DATABASE_POOL_SIZE: int = 20
|
||||
DATABASE_MAX_OVERFLOW: int = 10
|
||||
|
||||
# Auth
|
||||
SECRET_KEY: str = "change-me-in-production-with-a-real-secret-key"
|
||||
CHALLENGE_EXPIRE_SECONDS: int = 300
|
||||
TOKEN_EXPIRE_HOURS: int = 24
|
||||
SESSION_TTL_HOURS: int = 24
|
||||
|
||||
# Duniter V2 RPC
|
||||
DUNITER_RPC_URL: str = "wss://gdev.p2p.legal/ws"
|
||||
DUNITER_RPC_TIMEOUT_SECONDS: int = 10
|
||||
|
||||
# IPFS
|
||||
IPFS_API_URL: str = "http://localhost:5001"
|
||||
IPFS_GATEWAY_URL: str = "http://localhost:8080"
|
||||
IPFS_TIMEOUT_SECONDS: int = 30
|
||||
|
||||
# CORS
|
||||
CORS_ORIGINS: list[str] = ["http://localhost:3002"]
|
||||
|
||||
# Rate limiting (requests per minute)
|
||||
RATE_LIMIT_DEFAULT: int = 60
|
||||
RATE_LIMIT_AUTH: int = 10
|
||||
RATE_LIMIT_VOTE: int = 30
|
||||
|
||||
# AI — Qwen3.6 (MacStudio) endpoint, branché plus tard
|
||||
QWEN_API_URL: str = ""
|
||||
|
||||
# Blockchain cache
|
||||
BLOCKCHAIN_CACHE_TTL_SECONDS: int = 3600
|
||||
|
||||
# Paths
|
||||
BASE_DIR: Path = Path(__file__).resolve().parent.parent
|
||||
|
||||
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user