How cadubra2/central-de-andamentos works
Central de Andamentos is a legal-process monitoring dashboard. Incoming court notices and CNJ data are collected, parsed into normalized events, persisted and classified; lawyers review pending items and use the dashboard’s divergence, deadline, source-health and urgency-rule views. The graph reflects the README and shown imports/calls; some collectors and UI internals were not sampled, so their links rely on documented behavior or are omitted.
Main entry points: ingestao.ts Ingestion and deduplication · consultas.ts Dashboard queries · schema.ts Postgres event store · datajud.ts DataJud collection
Components 27
Collection and ingestion
- Notice receive API
app/api/receber/route.ts - IMAP collection API
app/api/coleta/route.ts - DJEN receive API
app/api/receber/djen/route.ts - DataJud receive API
app/api/receber/datajud/route.ts - IMAP collector
lib/coleta/imap.ts - DJEN collection
lib/coleta/djen.ts - DataJud collection
lib/coleta/datajud.ts
Event processing
- Ingestion and deduplication
lib/ingestao.ts - Notice parsers
lib/parsers - Urgency classification
lib/classificacao.ts - Duplicate publication matching
lib/mesma-publicacao.ts - Push versus diary
lib/cruzamento.ts - Forensic deadline calendar
lib/calendario-forense.ts
Persistence
- Postgres event store
db/schema.ts - Dashboard queries
lib/consultas.ts
Lawyer dashboard
- Pending items panel
app/(painel)/(caixa)/page.tsx - Divergence view
app/(painel)/divergencias/page.tsx - Deadlines view
app/(painel)/prazos/page.tsx - Source health view
app/(painel)/fontes/page.tsx - Urgency rules view
app/(painel)/regras/page.tsx - Event actions
lib/acoes.ts
Access control
- Session authorization
lib/sessao.ts - Login page
app/login/page.tsx
Other components
- Lawyer
- Gmail mailbox
- CNJ DJEN
- CNJ DataJud
Connections 34
- Gmail mailbox → Notice receive API: sends notices
README.md - Gmail mailbox → IMAP collection API: alternative collection
README.md - CNJ DJEN → DJEN receive API: supplies communications
README.md - CNJ DataJud → DataJud receive API: supplies movements
README.md - IMAP collection API → IMAP collector: delegates collection
app/api/coleta/route.ts - Notice receive API → Ingestion and deduplication: ingests notices
README.md - IMAP collector → Ingestion and deduplication: ingests messages
README.md - DJEN receive API → DJEN collection: receives batch
app/api/receber/djen/route.ts - DJEN collection → Ingestion and deduplication: ingests communications
lib/coleta/djen.ts - DataJud receive API → DataJud collection: receives batch
app/api/receber/datajud/route.ts - DataJud collection → Ingestion and deduplication: ingests movements
lib/coleta/datajud.ts - Ingestion and deduplication → Notice parsers: parses messages
lib/ingestao.ts - Ingestion and deduplication → Urgency classification: classifies events
lib/ingestao.ts - Ingestion and deduplication → Duplicate publication matching: matches duplicates
lib/ingestao.ts - Ingestion and deduplication → Postgres event store: writes events
lib/ingestao.ts - DataJud collection → Postgres event store: updates process status
lib/coleta/datajud.ts - Dashboard queries → Postgres event store: reads records
lib/consultas.ts - Dashboard queries → Push versus diary: computes divergences
lib/consultas.ts - Pending items panel → Dashboard queries: loads pending items
app/(painel)/(caixa)/page.tsx - Divergence view → Dashboard queries: loads comparisons
app/(painel)/divergencias/page.tsx - Deadlines view → Dashboard queries: loads deadline items
app/(painel)/prazos/page.tsx - Source health view → Dashboard queries: loads source status
app/(painel)/fontes/page.tsx - Urgency rules view → Dashboard queries: loads rule data
app/(painel)/regras/page.tsx - Urgency rules view → Event actions: updates rules
app/(painel)/regras/page.tsx - Event actions → Postgres event store: updates event state
lib/acoes.ts - Pending items panel → Event actions: handles event actions
- Deadlines view → Forensic deadline calendar: uses deadline calculations
README.md - Lawyer → Pending items panel: reviews matters
README.md - Lawyer → Divergence view: reviews mismatches
README.md - Lawyer → Deadlines view: checks deadlines
README.md - Lawyer → Source health view: checks source health
README.md - Lawyer → Urgency rules view: edits urgency rules
README.md - Lawyer → Login page: signs in
README.md - Login page → Session authorization: starts session