factcircuit
FactCircuit: an auditable claim-and-evidence verification loop with immutable provenance, staged checks, bounded retrieval, and reproducible evaluation.
El portal de referencia sobre la actividad política y económica del Estado español: diputados, votaciones, contratos públicos, subvenciones, puertas giratorias y las personas que los conectan.
Translation pending
DataTypeScript · PythonGitHub @ArzuparretaOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Todos los datos públicos del gobierno de España, recopilados y cruzados en tiempo real 🕵️♂️🇪🇸🏛️
Translation pending
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Portal de datos públicos sobre la política española. Diputados, votaciones, contratos, subvenciones, puertas giratorias y cadenas de responsabilidad — con trazabilidad hasta la fuente. España Transparente reúne en un mismo sitio los datos que ya son públicos pero viven dispersos entre el Congreso, el INE, la Plataforma de Contratación, la BDNS y otros registros oficiales. Los normaliza, los enlaza por persona y los presenta como una cadena verificable: gasto → déficit → deuda → quién paga. Cada cifra apunta a su fuente original.Read the full README ↗
España Transparente reúne en un mismo sitio los datos que ya son públicos pero viven dispersos entre el Congreso, el INE, la Plataforma de Contratación, la BDNS y otros registros oficiales. Los normaliza, los enlaza por persona y los presenta como una cadena verificable: gasto → déficit → deuda → quién paga. Cada cifra apunta a su fuente original.
El producto tiene tesis explícita, pero las afirmaciones tienen que ser desmontables solo atacando la fuente oficial. Las reglas editoriales viven en
AGENTS.mdy la hoja de ruta activa enNEXT.md.
infosubvenciones.es).Fuentes públicas → etl/src/<source>/ → Supabase (Postgres) → web/src/lib/data/ → Next.js (App Router)
| Capa | Tecnología | Carpeta |
|---|---|---|
| Frontend | Next.js 15 · App Router · Tailwind · shadcn/ui | web/ |
| ETL | Python 3.12 · psycopg2 · httpx | etl/ |
| Base de datos | Supabase (PostgreSQL) · 15+ tablas, vistas y RPCs | supabase/migrations/ |
| Datos curados | YAML revisado vía PR (liderazgos, responsables) | etl/data/ |
| CI/CD | GitHub Actions · cron diario y semanal · deploy SSH a VPS | .github/workflows/ |
cd web
npm install
npm run dev # http://localhost:3000
npm run build # build de producción
npm run lint # eslint (flat config)
npm run ui:audit # primitives de layout y reglas responsive
npm run content:audit # reglas editoriales (ver AGENTS.md)
Variables requeridas: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY (producción sirve la clave publishable sb_publishable_…; la instancia self-hosted también acepta la anon JWT legacy, que es la que usa CI).
cd etl
pip install -r requirements.txt
# Todos los pipelines se ejecutan como módulos desde src/
PYTHONPATH=src python -m src.congreso.diputados
PYTHONPATH=src python -m src.ine.indicadores
PYTHONPATH=src python -m src.contratacion.contratos
PYTHONPATH=src python -m pytest tests/
Las escrituras requieren DATABASE_URL (URI directo de Postgres desde Supabase → Settings → Database). Todas las escrituras pasan por common.db.get_pg_conn() — el SDK de Supabase solo se usa para lecturas.
# 1. Ingesta de candidatos (CSV o descubrimiento BORME)
PYTHONPATH=src python -m src.puertas_giratorias.ingest --csv puertas.csv --dry-run
# 2. Revisión humana
PYTHONPATH=src python -m src.puertas_giratorias.review list
PYTHONPATH=src python -m src.puertas_giratorias.review reject <id>
# 3. Publicación (exige ≥1 fuente "primary")
PYTHONPATH=src python -m src.puertas_giratorias.review publish <id> --reviewed-by <nombre>
Nada se publica automáticamente. El frontend público lee exclusivamente de revolving_door y v_revolving_door_public; los candidatos no son accesibles por anon.
cd etl
python apply_migration.py ../supabase/migrations/<archivo>.sql
# o, alternativamente:
npx supabase db push
| Fuente | Uso |
|---|---|
| Congreso Open Data | Diputados, votaciones, iniciativas |
| INE API | IPC, PIB, EPA y salarios |
| Eurostat | Deuda pública Maastricht |
| PCSP | Contratos públicos (ATOM/XML) |
| BDNS · infosubvenciones.es | Subvenciones (organizaciones) |
| datos.gob.es | Catálogo abierto de la AGE |
| Civio | Parsers de presupuestos (EUPL) |
| Wikidata | Fallback de fotos para diputados |
El portal del Congreso aplica rate-limit agresivo (403 tras pocos requests). Los scrapers usan
curlvíasubprocessconREQUEST_DELAY = 1.5s. No bajar el delay ni paralelizar peticiones al Congreso.
npm run content:audit) — cobertura de explicaciones para cada indicador y bloqueo de términos de riesgo legal aplicados a personas sin condena firme.npm run ui:audit) — grid-cols-N requiere variante responsive; flex items-center justify-between requiere min-w-0; los colores de voto/partido se importan de lib/domain-style.ts; los tabs viven en components/domain/SectionTabs.tsx.Detalles completos en CLAUDE.md, DESIGN.md y NEXT.md.
AGENTS.md — es obligatorio antes de tocar código o copy.lint + build + auditorías).etl/data/ y deja el last_verified actualizado.MIT · El código es libre. Los datos provienen de fuentes públicas; cada vista enlaza a su origen.