Plateforme de decisions collectives pour Duniter/G1. Backend FastAPI async + PostgreSQL (14 tables, 8 routers, 6 services, moteur de vote avec formule d'inertie WoT/Smith/TechComm). Frontend Nuxt 4 + Nuxt UI v3 + Pinia (9 pages, 5 stores). Infrastructure Docker + Woodpecker CI + Traefik. Documentation technique et utilisateur (15 fichiers). Seed : Licence G1, Engagement Forgeron v2.0.0, 4 protocoles de vote. 30 tests unitaires (formules, mode params, vote nuance) -- tous verts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
871 B
Python
34 lines
871 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
APP_NAME: str = "Glibredecision"
|
|
DEBUG: bool = True
|
|
|
|
# Database
|
|
DATABASE_URL: str = "postgresql+asyncpg://glibredecision:change-me-in-production@localhost:5432/glibredecision"
|
|
|
|
# Auth
|
|
SECRET_KEY: str = "change-me-in-production-with-a-real-secret-key"
|
|
CHALLENGE_EXPIRE_SECONDS: int = 300
|
|
TOKEN_EXPIRE_HOURS: int = 24
|
|
|
|
# Duniter V2 RPC
|
|
DUNITER_RPC_URL: str = "wss://gdev.p2p.legal/ws"
|
|
|
|
# IPFS
|
|
IPFS_API_URL: str = "http://localhost:5001"
|
|
IPFS_GATEWAY_URL: str = "http://localhost:8080"
|
|
|
|
# CORS
|
|
CORS_ORIGINS: list[str] = ["http://localhost:3002"]
|
|
|
|
# Paths
|
|
BASE_DIR: Path = Path(__file__).resolve().parent.parent
|
|
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
|
|
|
|
|
settings = Settings()
|