How renan-crs/printgest-erp works
PrintGest is a desktop ERP for print shops backed by a FastAPI service and PostgreSQL. The primary workflow runs from desktop sign-in and license checks into business screens, whose API client sends requests to the backend for domain operations and persistence. The graph preserves the README’s major business capabilities, plus licensing, fiscal integration, and multi-branch synchronization. Some domain modules were not sampled; their capabilities are documented, but uncertain implementation links are omitted. Based on the excerpts and SOURCE INDEX, not a full source review.
Main entry points: api API routes · api.py API client · tela_principal.py ERP workspace · main.py FastAPI service
Components 24
Desktop client
- Desktop startup
desktop/printgest/main.py - Activation UI
desktop/printgest/ui/ativacao.py - API client
desktop/printgest/core/api.py - ERP workspace
desktop/printgest/ui/tela_principal.py - OS and quotes
desktop/printgest/ui/modulos/os.py - Counter sales
desktop/printgest/ui/modulos/venda_balcao.py - Business modules
desktop/printgest/ui/modulos
API and domain
- FastAPI service
backend/app/main.py - API routes
backend/app/api - Authentication
backend/app/services/auth_service.py - Production orders
backend/app/services/os_service.py - Sales operations
backend/app/services/venda_service.py - Finance operations
backend/app/services/financeiro_service.py - Kanban projects
backend/app/services/projetos_service.py - Fiscal documents
backend/app/services/fiscal_service.py - License management
backend/app/services/licensa_service.py
Persistence and sync
- Database access
backend/app/db.py - ERP data models
backend/app/models - Tenant and branches
backend/app/services/tenants.py - Branch synchronization
backend/app/services/sync_service.py
External services
- Neon PostgreSQL
- RedGest licensing
- Fiscal gateway
backend/app/services/fiscal_gateway.py
Other components
- Print-shop user
Connections 32
- Print-shop user → Desktop startup: uses
desktop/printgest/main.py - Desktop startup → Activation UI: opens
desktop/printgest/main.py - Desktop startup → API client: creates
desktop/printgest/main.py - Desktop startup → ERP workspace: opens
desktop/printgest/main.py - Activation UI → API client: calls
desktop/printgest/ui/ativacao.py - ERP workspace → API client: requests
desktop/printgest/ui/tela_principal.py - ERP workspace → OS and quotes: navigates to
desktop/printgest/ui/tela_principal.py - ERP workspace → Counter sales: navigates to
README.md - ERP workspace → Business modules: navigates to
desktop/printgest/ui/tela_principal.py - OS and quotes → API client: requests
desktop/printgest/ui/modulos/os.py - Counter sales → API client: requests
- API client → FastAPI service: HTTP requests
desktop/printgest/core/api.py - FastAPI service → API routes: registers
backend/app/main.py - FastAPI service → License management: checks license
backend/app/main.py - FastAPI service → Finance operations: runs
backend/app/main.py - FastAPI service → Branch synchronization: starts sync
backend/app/main.py - API routes → Authentication: dispatches
backend/app/api/auth.py - API routes → Production orders: dispatches
- API routes → Sales operations: dispatches
- API routes → Kanban projects: dispatches
- API routes → Fiscal documents: dispatches
- Production orders → ERP data models: reads and writes
backend/app/services/os_service.py - Kanban projects → ERP data models: reads and writes
backend/app/services/projetos_service.py - Authentication → Database access: persists sessions
backend/app/services/auth_service.py - Authentication → Tenant and branches: resolves users
backend/app/services/auth_service.py - Fiscal documents → Fiscal gateway: calls
backend/app/services/fiscal_service.py - License management → RedGest licensing: validates license
backend/app/services/licensa_service.py - Finance operations → Database access: reads and writes
- Sales operations → Database access: reads and writes
- Database access → Neon PostgreSQL: connects
backend/app/db.py - Branch synchronization → Neon PostgreSQL: synchronizes
- Tenant and branches → ERP data models: uses tenant data
backend/app/services/tenants.py