How landertz507/cuentaclara works
CuentaClara is a multi-tenant ERP mobile app for small businesses, with quick/simple and structured/advanced operating modes. Users authenticate, enter a mode-specific dashboard, and manage sales, inventory, cash, billing, and related operations through a React Native client and FastAPI business API backed by Supabase. Authentication combines Supabase sessions with API-loaded business profiles. The README also describes push notifications and WhatsApp integrations; those links are documented, but their implementation is not shown in the sampled source.
Main entry points: App.js App shell · main.py FastAPI gateway · useAuth.js Authentication flow · authService.js Auth service
Components 23
Mobile app
- App shell
App.js - Mode navigation
src/views/navigation - Authentication flow
src/modules/auth/hooks/useAuth.js - Auth service
src/modules/auth/services/authService.js - Session state
src/store/useAuthStore.js - API client
src/services/apiClient.js
Business operations
- Dashboard engine
src/modules/dashboard/engine/dashboardEngine.js - Inventory workflows
src/modules/inventory - Sales and cash
src/modules/sales - Billing and invoices
src/modules/Invoice - Strategic analytics
src/modules/analytics - Other ERP modules
src/modules
Backend API
- FastAPI gateway
backend/app/main.py - Auth routes
backend/app/routers/auth.py - Business routes
backend/app/routers - Auth logic
backend/app/services/auth_service.py - Inventory logic
backend/app/services/inventory_service.py - Recipe production
backend/app/services/recipes_service.py
Identity and data
- Supabase clients
backend/app/database.py
Other components
- Business user
- Supabase
- Firebase messaging
- WhatsApp API
Connections 28
- Business user → App shell: opens
README.md - App shell → Mode navigation: mounts
App.js - App shell → Authentication flow: provides auth
- Mode navigation → Authentication flow: routes
- Authentication flow → Auth service: calls
src/modules/auth/hooks/useAuth.js - Authentication flow → Session state: updates
src/modules/auth/hooks/useAuth.js - Auth service → Supabase: authenticates
src/modules/auth/services/authService.js - Auth service → API client: loads profile
src/modules/auth/services/authService.js - App shell → Supabase: initializes
App.js - App shell → Dashboard engine: enters operations
- Dashboard engine → Business user: presents summaries
- Business user → Inventory workflows: manages stock
README.md - Business user → Sales and cash: records sales
README.md - Business user → Billing and invoices: creates invoices
README.md - Business user → Strategic analytics: reviews reports
README.md - Business user → Other ERP modules: manages operations
- Inventory workflows → API client: requests data
src/modules/inventory/services/inventoryService.js - API client → FastAPI gateway: sends requests
README.md - FastAPI gateway → Auth routes: registers routes
backend/app/main.py - FastAPI gateway → Business routes: registers routes
backend/app/main.py - Auth routes → Auth logic: calls
backend/app/routers/auth.py - Auth logic → Supabase clients: uses clients
backend/app/services/auth_service.py - Supabase clients → Supabase: connects
backend/app/database.py - Inventory logic → Supabase clients: uses clients
backend/app/services/inventory_service.py - Recipe production → Inventory logic: uses inventory
backend/app/services/recipes_service.py - Inventory logic → Firebase messaging: dispatches alerts
- FastAPI gateway → Firebase messaging: supports push
README.md - FastAPI gateway → WhatsApp API: supports messaging
README.md