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:
Yvv
2026-10-21 02:04:42 +02:00
co-authored by Claude Opus 5.5
parent 4b1732916d
commit 67ddee28b2
275 changed files with 8979 additions and 0 deletions
-44
View File
@@ -1,44 +0,0 @@
# syntax = docker/dockerfile:1
FROM python:3.11-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*
# ── Build ─────────────────────────────────────────────────────────────────────
FROM base AS build
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ .
# ── Production ────────────────────────────────────────────────────────────────
FROM base AS production
COPY --from=build /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=build /usr/local/bin/uvicorn /usr/local/bin/uvicorn
COPY --from=build /usr/local/bin/alembic /usr/local/bin/alembic
COPY --from=build /app /app
EXPOSE 8002
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8002/api/health || exit 1
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8002"]
# ── Development ───────────────────────────────────────────────────────────────
FROM base AS development
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
WORKDIR /app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002", "--reload"]
-73
View File
@@ -1,73 +0,0 @@
# Development stack -- standalone (no Traefik needed)
# Usage: docker compose -f docker/docker-compose.dev.yml up
# Ports: frontend 3002, backend 8002, postgres 5432, IPFS API 5001, IPFS GW 8080
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-libredecision}
POSTGRES_USER: ${POSTGRES_USER:-libredecision}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libredecision-dev}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-libredecision}"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
backend:
build:
context: ../
dockerfile: docker/backend.Dockerfile
target: development
depends_on:
postgres:
condition: service_healthy
volumes:
- ../backend:/app
ports:
- "8002:8002"
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-libredecision}:${POSTGRES_PASSWORD:-libredecision-dev}@postgres:5432/${POSTGRES_DB:-libredecision}
SECRET_KEY: dev-secret-key-not-for-production
DEBUG: "true"
ENVIRONMENT: development
CORS_ORIGINS: '["http://localhost:3002"]'
DUNITER_RPC_URL: ${DUNITER_RPC_URL:-wss://gdev.p2p.legal/ws}
IPFS_API_URL: http://ipfs:5001
IPFS_GATEWAY_URL: http://ipfs:8080
frontend:
build:
context: ../
dockerfile: docker/frontend.Dockerfile
target: development
depends_on:
- backend
volumes:
- ../frontend:/app
- frontend-node-modules:/app/node_modules
ports:
- "3002:3002"
environment:
NUXT_PUBLIC_API_BASE: http://localhost:8002/api/v1
ipfs:
image: ipfs/kubo:latest
restart: unless-stopped
ports:
- "5001:5001"
- "8080:8080"
volumes:
- ipfs-data:/data/ipfs
volumes:
postgres-data:
ipfs-data:
frontend-node-modules:
-84
View File
@@ -1,84 +0,0 @@
name: ${COMPOSE_PROJECT_NAME:-ehv-decision-main}
services:
postgres:
image: postgres:16-alpine
container_name: ${COMPOSE_PROJECT_NAME:-ehv-decision-main}-postgres
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB:-libredecision}
POSTGRES_USER: ${POSTGRES_USER:-libredecision}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-libredecision} -d ${POSTGRES_DB:-libredecision}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- libredecision
# Pas de label SERVICE_* : postgres non exposé publiquement
backend:
image: libredecision-backend:latest
container_name: ${COMPOSE_PROJECT_NAME:-ehv-decision-main}-backend
restart: always
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-libredecision}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-libredecision}
SECRET_KEY: ${SECRET_KEY}
ENVIRONMENT: production
DEBUG: "false"
DEMO_MODE: ${DEMO_MODE:-true}
CORS_ORIGINS: '["https://${APP_DOMAIN:-decision.librodrome.org}"]'
DUNITER_RPC_URL: ${DUNITER_RPC_URL:-wss://gdev.p2p.legal/ws}
IPFS_API_URL: http://ipfs:5001
IPFS_GATEWAY_URL: http://ipfs:8080
labels:
# Registrator enregistre dans Consul, Fabio route automatiquement
- SERVICE_8002_NAME=${COMPOSE_PROJECT_NAME:-ehv-decision-main}-backend-8002
- SERVICE_8002_TAGS=urlprefix-${APP_DOMAIN:-decision.librodrome.org}/api/*
# TCP : HTTP check échoue si le service redirige (301/302)
- SERVICE_8002_CHECK_TCP=true
networks:
- libredecision
- sonic
frontend:
image: libredecision-frontend:latest
container_name: ${COMPOSE_PROJECT_NAME:-ehv-decision-main}-frontend
restart: always
depends_on:
- backend
environment:
NUXT_PUBLIC_API_BASE: https://${APP_DOMAIN:-decision.librodrome.org}/api/v1
labels:
- SERVICE_3000_NAME=${COMPOSE_PROJECT_NAME:-ehv-decision-main}-frontend-3000
- SERVICE_3000_TAGS=urlprefix-${APP_DOMAIN:-decision.librodrome.org}/*
- SERVICE_3000_CHECK_TCP=true
networks:
- sonic
ipfs:
image: ipfs/kubo:latest
container_name: ${COMPOSE_PROJECT_NAME:-ehv-decision-main}-ipfs
restart: always
volumes:
- ipfs-data:/data/ipfs
networks:
- libredecision
# Pas de label SERVICE_* : ipfs non exposé publiquement
volumes:
postgres-data:
ipfs-data:
networks:
libredecision:
driver: bridge
sonic:
external: true
-51
View File
@@ -1,51 +0,0 @@
# syntax = docker/dockerfile:1
ARG NODE_VERSION=20-slim
FROM node:${NODE_VERSION} AS base
WORKDIR /src
RUN apt-get update && \
apt-get install -y --no-install-recommends curl git ca-certificates && \
rm -rf /var/lib/apt/lists/*
# ── Build ─────────────────────────────────────────────────────────────────────
FROM base AS build
ENV NODE_ENV=development
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# ── Production ────────────────────────────────────────────────────────────────
FROM base AS production
ENV PORT=3000 \
NODE_ENV=production
COPY --from=build /src/.output /src/.output
EXPOSE $PORT
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD curl -f http://localhost:${PORT}/ || exit 1
CMD ["node", ".output/server/index.mjs"]
# ── Development ───────────────────────────────────────────────────────────────
FROM base AS development
ENV NODE_ENV=development
WORKDIR /app
COPY frontend/package.json ./
RUN npm install
EXPOSE 3002
CMD ["npm", "run", "dev"]