How denysrd/pedweb works
PeDWeb is a bakery-management ERP with a React frontend and FastAPI/PostgreSQL backend. Users work through operational areas—purchasing, inventory, recipes, production planning and execution, sales, and finance—alongside administration and reporting. The frontend entry point mounts routing and initializes authentication; the backend registers domain routers. Evidence is uneven: sampled source confirms application wiring, selected service dependencies, and the AI job dispatch, while many domain routes and screens are represented only by the tree or README, so their internal call paths are not inferred.
Main entry points: main.py FastAPI application · App.tsx React application · agent_routes.py AI endpoints · vendas Sales screens
Components 23
Web client
- React application
frontend/src/App.tsx - Sales screens
frontend/src/screens/vendas - Sales API client
frontend/src/api/vendas.js
Backend platform
- FastAPI application
backend/app/main.py - SQLAlchemy database
backend/app/core/database.py - Authentication and roles
backend/app/modules/auth
Operations
- Purchasing and NF-e
backend/app/modules/compras - Inventory
backend/app/modules/estoque - Recipes
backend/app/modules/receitas - Production planning
backend/app/modules/planejamento - Production orders
backend/app/modules/producao - Ingredients and costs
backend/app/modules/ingredientes
Business management
- Sales and orders
backend/app/modules/vendas - Finance
backend/app/modules/financeiro - Suppliers
backend/app/modules/fornecedores - Catalog and branding
backend/app/modules/catalogo - Configuration
backend/app/modules/configuracoes - Dashboard
backend/app/modules/dashboard
AI assistance
- AI endpoints
backend/app/modules/ai_agent/agent_routes.py - ARQ job queue
backend/app/core/arq_pool.py - AI worker
backend/app/workers/ai_worker.py - Recipe suggestions
backend/app/modules/ai_agent/agent_service.py
Other components
- Bakery staff
Connections 21
- Bakery staff → React application: uses
- React application → FastAPI application: calls API
- React application → Sales screens: routes to
frontend/src/App.tsx - Sales screens → Sales API client: requests data
frontend/src/screens/vendas/Clientes.tsx - FastAPI application → Authentication and roles: registers routes
backend/app/main.py - FastAPI application → Purchasing and NF-e: registers routes
backend/app/main.py - FastAPI application → Inventory: registers routes
backend/app/main.py - FastAPI application → Recipes: registers routes
backend/app/main.py - FastAPI application → Production orders: registers routes
backend/app/main.py - FastAPI application → Sales and orders: registers routes
backend/app/main.py - FastAPI application → Finance: registers routes
backend/app/main.py - FastAPI application → Suppliers: registers routes
backend/app/main.py - FastAPI application → Catalog and branding: registers routes
backend/app/main.py - FastAPI application → Ingredients and costs: registers routes
backend/app/main.py - FastAPI application → Production planning: registers routes
backend/app/main.py - FastAPI application → Dashboard: registers routes
backend/app/main.py - FastAPI application → Configuration: registers routes
backend/app/main.py - AI endpoints → ARQ job queue: enqueues job
backend/app/modules/ai_agent/agent_routes.py - ARQ job queue → AI worker: dispatches task
- AI worker → Recipe suggestions: runs suggestions
backend/app/workers/ai_worker.py - AI endpoints → Configuration: reads AI key
backend/app/modules/ai_agent/agent_routes.py