How marcelogcardozo/processa-ai works
Processa AI was a legal-practice SaaS combining office management, a client portal, billing, AI tools, legal chat, and calculators. The main workflow runs from a user-facing React app through the FastAPI backend; queued analysis and document work is handled by a separate worker, with results and records stored in PostgreSQL/Supabase. The README documents the product capabilities and service split; edges are limited to relationships supported by it or by the supplied source index and excerpts. Some feature internals were not sampled, so their connections are omitted.
Main entry points: src/main.py FastAPI service · src/main.py Job worker · App.tsx React application · job_store.py Job store
Components 24
User applications
- React application
apps/frontend/src/App.tsx - Authentication
apps/frontend/src/features/auth/services/auth-service.ts - Office management
apps/backend/src/features/office - Client portal
apps/backend/src/features/portal/service.py - Blog and materials
apps/backend/src/features/core/blog/service.py
Backend services
- FastAPI service
apps/backend/src/main.py - Profiles and dashboard
apps/backend/src/features/core/profiles/service.py - Billing and credits
apps/backend/src/features/billing/subscriptions/service.py - Job store
apps/backend/src/core/job_store.py - Database pool
apps/backend/src/core/db.py
AI and calculations
- AI analysis API
apps/backend/src/features/ai/router.py - Legal RAG chat
apps/backend/src/features/ai/chat - Legal calculators
apps/backend/src/features/calculators/router.py
Background processing
- Job worker
services/worker/src/main.py - Document analysis
services/worker/src/handlers/ai_service.py - Gemini pipeline
services/worker/src/handlers/pipeline.py - RAG ingestion
services/worker/src/handlers/rag_ingest.py - Pension engine
services/worker/src/handlers/previdencia/engine.py
Data and integrations
- Supabase services
apps/backend/src/core/supabase.py - Document storage
services/worker/src/core/storage.py - Stripe
- Google Gemini
Other components
- Office user
- Portal client
Connections 26
- Office user → React application: uses
README.md - Portal client → React application: uses portal
README.md - React application → FastAPI service: calls API
README.md - React application → Authentication: authenticates
README.md - FastAPI service → Office management: serves features
README.md - FastAPI service → Client portal: serves portal
apps/backend/src/main.py - FastAPI service → Blog and materials: serves features
apps/backend/src/main.py - FastAPI service → Profiles and dashboard: serves features
apps/backend/src/main.py - FastAPI service → Billing and credits: serves billing
README.md - FastAPI service → AI analysis API: routes requests
apps/backend/src/main.py - FastAPI service → Legal RAG chat: routes requests
- FastAPI service → Legal calculators: routes requests
apps/backend/src/main.py - AI analysis API → Job store: queues jobs
apps/backend/src/features/ai/router.py - Legal calculators → Job store: queues jobs
apps/backend/src/features/calculators/router.py - Job store → Database pool: reads and writes
apps/backend/src/core/job_store.py - Job worker → Job store: claims jobs
services/worker/src/main.py - Job worker → Document analysis: dispatches analysis
services/worker/src/main.py - Document analysis → Gemini pipeline: runs analysis
services/worker/src/handlers/ai_service.py - Gemini pipeline → Google Gemini: sends documents
services/worker/src/handlers/pipeline.py - Job worker → RAG ingestion: dispatches ingestion
services/worker/src/main.py - Job worker → Pension engine: calculates scenarios
services/worker/src/main.py - RAG ingestion → Supabase services: stores chunks
services/worker/src/handlers/rag_ingest.py - FastAPI service → Supabase services: uses services
- Job worker → Document storage: prepares documents
services/worker/src/main.py - Billing and credits → Stripe: processes payments
README.md - React application → Legal calculators: offers tools
README.md