How carlosn225/inventia-app-escritorio works
Inventia is a desktop inventory application for small businesses. The intended workflow is to maintain a product catalog, register stock entries, exits and corrections, then review quantities and low-stock alerts. Electron starts the local Django server and serves the React interface; the backend’s movement service updates stock and records threshold alerts. The README describes offline-first use and WhatsApp notifications, but the shown implementation has no sync mechanism and explicitly leaves Twilio sending for later, so those capabilities are not depicted as implemented. Frontend-to-backend wiring beyond the authentication API is not established by the excerpts.
Main entry points: App.jsx App routes · usuarios/views.py User API · main.cjs Electron shell · inventario/views.py Inventory API
Components 27
Desktop runtime
- Electron shell
frontend/electron/main.cjs - UI static server
frontend/electron/server.cjs
Inventory interface
- App routes
frontend/src/App.jsx - Session guard
frontend/src/components/RutaProtegida.jsx - Login
frontend/src/pages/Login.jsx - Auth client
frontend/src/services/auth.js - Dashboard
frontend/src/pages/Dashboard.jsx - Product catalog
frontend/src/pages/Catalogo.jsx - Product editing
frontend/src/pages/ProductoForm.jsx - Movement history
frontend/src/pages/Movimientos.jsx - Stock operations
frontend/src/pages/RegistrarCompra.jsx - Sales entry
frontend/src/pages/RegistrarVenta.jsx - Waste entry
frontend/src/pages/RegistrarMerma.jsx - Stock correction
frontend/src/pages/CorreccionInventario.jsx - Alerts view
frontend/src/pages/Alertas.jsx - Configuration
frontend/src/pages/Configuracion.jsx - Profile and help
frontend/src/pages/MiPerfil.jsx
Backend domain
- Inventory API
backend/inventario/views.py - Movement service
backend/inventario/services.py - Inventory serializers
backend/inventario/serializers.py
User access
- User API
backend/usuarios/views.py - Access permissions
backend/usuarios/permissions.py - User routes
backend/usuarios/urls.py
State and alerts
- Inventory records
backend/inventario/models.py - User records
backend/usuarios/models.py
Other components
- Business user
- Twilio WhatsApp
Connections 31
- Business user → Electron shell: uses
- Electron shell → UI static server: starts
frontend/electron/main.cjs - Electron shell → App routes: loads UI
frontend/electron/main.cjs - Electron shell → Inventory API: starts server
frontend/electron/main.cjs - UI static server → App routes: serves UI
frontend/electron/server.cjs - App routes → Login: routes to
frontend/src/App.jsx - App routes → Session guard: protects routes
frontend/src/App.jsx - Session guard → Auth client: checks session
frontend/src/components/RutaProtegida.jsx - App routes → Dashboard: routes to
frontend/src/App.jsx - App routes → Product catalog: routes to
frontend/src/App.jsx - App routes → Product editing: routes to
frontend/src/App.jsx - App routes → Movement history: routes to
frontend/src/App.jsx - App routes → Stock operations: routes to
frontend/src/App.jsx - App routes → Sales entry: routes to
frontend/src/App.jsx - App routes → Waste entry: routes to
frontend/src/App.jsx - App routes → Stock correction: routes to
frontend/src/App.jsx - App routes → Alerts view: routes to
frontend/src/App.jsx - App routes → Configuration: routes to
frontend/src/App.jsx - App routes → Profile and help: routes to
frontend/src/App.jsx - Login → Auth client: authenticates via
frontend/src/services/auth.js - Auth client → User API: calls user API
- User routes → User API: routes requests
backend/usuarios/urls.py - User API → User records: reads and writes
backend/usuarios/views.py - User API → Access permissions: checks access
backend/usuarios/views.py - User API → Inventory serializers: serializes users
backend/usuarios/views.py - Inventory API → Movement service: delegates movement
backend/inventario/views.py - Inventory API → Inventory records: accesses records
backend/inventario/views.py - Inventory API → Inventory serializers: validates data
backend/inventario/views.py - Movement service → Inventory records: updates stock
backend/inventario/services.py - Movement service → Twilio WhatsApp: planned notification
backend/inventario/services.py - Business user → Twilio WhatsApp: receives low-stock alerts