How wallacef3lip/sistema_pdv works
Sistema PDV is a retail point-of-sale application: staff authenticate, manage products and stock, record and settle sales, operate the cash register, and review reports. Angular pages call API services; FastAPI routers expose domain operations backed by SQLAlchemy models and PostgreSQL. The graph preserves documented customer, delivery, access-control, and reporting capabilities. Some subsystem paths and links use directory-level evidence because their individual files were not excerpted; those links are omitted where the caller relationship could not be verified.
Main entry points: app.routes.ts Page routing · routers Business API routes · sale_service.py Sale lifecycle · main.py API application
Components 23
Angular client
- Page routing
pdv_View/src/app/app.routes.ts - Login
pdv_View/src/app/pages/login/login.component.ts - Sales and orders
pdv_View/src/app/pages - Products and stock
pdv_View/src/app/pages - Cash register
pdv_View/src/app/pages/cash-register/cash-register.component.ts - Customers and zones
pdv_View/src/app/pages - Reports
pdv_View/src/app/pages/reports/reports.component.ts - HTTP services
pdv_View/src/app/core/services - Receipt printing
pdv_View/src/app/core/services/print.service.ts
FastAPI domain
- API application
pdv_API/main.py - Business API routes
pdv_API/app/routers - Sale lifecycle
pdv_API/app/services/sale_service.py - Cash operations
pdv_API/app/services/cash_register_service.py - Stock movements
pdv_API/app/services/stock_service.py - Customer and zone services
pdv_API/app/services - Report generation
pdv_API/app/services/report_service.py - Request and response schemas
pdv_API/app/schemas/schemas.py
Persistence
- Domain records
pdv_API/app/models - Database sessions
pdv_API/app/core/database.py - PostgreSQL
Identity and access
- Authentication routes
pdv_API/app/routers/auth.py - Token and role checks
pdv_API/app/core/security.py
Other components
- Retail staff
Connections 29
- Retail staff → Login: signs in
README.md - Retail staff → Sales and orders: records sales
README.md - Page routing → Login: routes to
pdv_View/src/app/app.routes.ts - Page routing → Sales and orders: routes to
pdv_View/src/app/app.routes.ts - Page routing → Products and stock: routes to
pdv_View/src/app/app.routes.ts - Page routing → Cash register: routes to
pdv_View/src/app/app.routes.ts - Page routing → Customers and zones: routes to
pdv_View/src/app/app.routes.ts - Page routing → Reports: routes to
pdv_View/src/app/app.routes.ts - Login → HTTP services: uses auth
- Sales and orders → HTTP services: calls sales
pdv_View/src/app/pages/orders/orders.component.ts - Reports → HTTP services: calls reports
pdv_View/src/app/pages/reports/reports.component.ts - HTTP services → API application: HTTP requests
pdv_View/src/app/core/services/sale.service.ts - API application → Authentication routes: registers
pdv_API/main.py - API application → Business API routes: registers
pdv_API/main.py - Authentication routes → Token and role checks: uses security
pdv_API/app/routers/auth.py - Business API routes → Sale lifecycle: delegates sales
pdv_API/app/routers/sales.py - Business API routes → Cash operations: delegates cash
pdv_API/app/routers/cash_registers.py - Sale lifecycle → Cash operations: registers payments
pdv_API/app/services/sale_service.py - Sale lifecycle → Stock movements: checks stock
pdv_API/app/services/sale_service.py - Sale lifecycle → Customer and zone services: validates delivery
pdv_API/app/services/sale_service.py - Business API routes → Report generation: serves reports
- Business API routes → Request and response schemas: validates payloads
pdv_API/app/routers/sales.py - Sale lifecycle → Domain records: queries records
pdv_API/app/services/sale_service.py - Cash operations → Domain records: queries records
pdv_API/app/services/cash_register_service.py - Report generation → Domain records: queries records
pdv_API/app/services/report_service.py - Domain records → Database sessions: uses ORM base
pdv_API/app/models/sale.py - API application → Database sessions: creates tables
pdv_API/main.py - Database sessions → PostgreSQL: opens connections
pdv_API/app/core/database.py - Receipt printing → Sales and orders: prints receipts
pdv_View/src/app/pages/orders/orders.component.ts