How cadubra2/gestao-documentos-juridicos works
This is a Portuguese-language legal-document management app. Users upload PDFs through the web interface or place them in a watched inbox; either route extracts text, optionally classifies and summarizes it with Gemini, stores the file in the pending collection, and records metadata. The web workflow also lists, views, reclassifies, and completes documents. The graph shows those domain stages and the database layer. Source excerpts support the web and monitor flows; template internals and deployment wiring were not inspected.
Main entry points: server.py Web API · monitor.py Inbox monitor · router.py Document operations · config.py Incoming PDFs
Components 12
Document intake
- Inbox monitor
app/monitor.py - Incoming PDFs
app/config.py - PDF text extraction
app/pdf_processor.py - Document classification
app/ai_client.py
Web experience
- Web API
app/web/server.py - Web templates
app/web/templates
Document management
- Document operations
app/router.py
Persistence
- Pending documents
app/config.py - Completed documents
app/config.py - Document database
app/db.py
Other components
- Legal staff
- Gemini API
Connections 18
- Legal staff → Web API: uses
app/web/server.py - Web API → Web templates: renders
app/web/server.py - Web API → PDF text extraction: extracts text
app/web/server.py - Web API → Document classification: classifies
app/web/server.py - Web API → Incoming PDFs: stages upload
app/web/server.py - Web API → Pending documents: moves upload
app/web/server.py - Web API → Document database: records upload
app/web/server.py - Legal staff → Incoming PDFs: drops PDF
- Incoming PDFs → Inbox monitor: watches files
app/monitor.py - Inbox monitor → PDF text extraction: extracts text
app/monitor.py - Inbox monitor → Document classification: classifies
app/monitor.py - Inbox monitor → Pending documents: moves PDF
app/monitor.py - Inbox monitor → Document database: records document
app/monitor.py - Document classification → Gemini API: requests analysis
app/ai_client.py - Web API → Document operations: dispatches actions
app/web/server.py - Document operations → Document database: queries and updates
app/router.py - Document operations → Pending documents: moves or reclassifies
app/router.py - Document operations → Completed documents: completes documents
app/router.py