How eloxbdeveloper/api-wars-project works
FactuLocal is a browser-based small-business sales and e-invoicing platform. The documented central workflow is invoice preparation, Factus Pay collection and payment confirmation, followed by Factus electronic issuance; sampled runtime code substantiates invoice CRUD and Factus issuance, but not the payment integration or automatic payment-detection mechanism. The graph therefore preserves those documented stages as unverified dashed links. It also shows customer/product management, credit notes, and sales analytics. Some backend routes and services are indexed but unsampled, so their connections are shown only where the README, excerpts, or source index support them.
Main entry points: router.js Page router · api.js HTTP API client · invoiceService.js Invoice service · creditNoteService.js Credit-note service
Components 30
Web interface
- Browser app
frontend/src/main.js - Page router
frontend/src/router.js - Invoice workflow
frontend/src/pages/invoices.js - Invoice detail
frontend/src/pages/invoiceDetail.js - Customer management
frontend/src/pages/customers.js - Product management
frontend/src/pages/products.js - Credit notes UI
frontend/src/pages/creditNotes.js - Sales dashboard
frontend/src/pages/dashboard.js - HTTP API client
frontend/src/services/api.js
Backend API
- Express API
backend/src/app.js - Invoice routes
backend/src/routes/invoiceRoutes.js - Invoice controller
backend/src/controllers/invoicesController.js - Credit-note routes
backend/src/routes/creditNotes.js - Credit-note controller
backend/src/controllers/creditNotesController.js
Business services
- Invoice service
backend/src/services/invoiceService.js - Customer service
backend/src/services/customerService.js - Product service
backend/src/services/productService.js - Credit-note service
backend/src/services/creditNoteService.js
External integrations
- Factus API client
backend/src/integrations/factus/client.js - Factus invoice adapter
backend/src/integrations/factus/invoices.js - Factus credit-note adapter
backend/src/integrations/factus/creditNotes.js - Factus
- Factus Pay
Persistence
- Customer records
backend/src/models/Customer.js - Invoice records
backend/src/models/Invoice.js - Product records
backend/src/models/product.js - Credit-note records
backend/src/models/CreditNote.js
Other components
- Business user
- Customer payment
- DIAN
Connections 37
- Business user → Browser app: uses
README.md - Browser app → Page router: starts
frontend/src/main.js - Page router → Invoice workflow: routes to
frontend/src/router.js - Page router → Invoice detail: routes to
frontend/src/router.js - Page router → Customer management: routes to
frontend/src/router.js - Page router → Product management: routes to
frontend/src/router.js - Page router → Credit notes UI: routes to
frontend/src/router.js - Page router → Sales dashboard: routes to
frontend/src/router.js - Invoice workflow → HTTP API client: requests
frontend/src/pages/invoices.js - Invoice detail → HTTP API client: requests
frontend/src/pages/invoiceDetail.js - Customer management → HTTP API client: requests
frontend/src/pages/customers.js - Product management → HTTP API client: requests
frontend/src/pages/products.js - Credit notes UI → HTTP API client: requests
frontend/src/pages/creditNotes.js - Sales dashboard → HTTP API client: requests
frontend/src/pages/dashboard.js - HTTP API client → Express API: HTTP requests
README.md - Express API → Invoice routes: mounts
backend/src/app.js - Express API → Credit-note routes: mounts
backend/src/app.js - Invoice routes → Invoice controller: dispatches
backend/src/routes/invoiceRoutes.js - Credit-note routes → Credit-note controller: dispatches
backend/src/routes/creditNotes.js - Invoice controller → Invoice service: calls
backend/src/controllers/invoicesController.js - Credit-note controller → Credit-note service: calls
backend/src/controllers/creditNotesController.js - Invoice service → Customer records: reads
backend/src/services/invoiceService.js - Invoice service → Product records: reads
backend/src/services/invoiceService.js - Invoice service → Invoice records: reads and writes
backend/src/services/invoiceService.js - Invoice service → Factus invoice adapter: transmits invoice
backend/src/services/invoiceService.js - Factus invoice adapter → Factus API client: uses
backend/src/integrations/factus/invoices.js - Factus API client → Factus: authenticated API calls
backend/src/integrations/factus/client.js - Credit-note service → Invoice records: reads
backend/src/services/creditNoteService.js - Credit-note service → Credit-note records: reads and writes
backend/src/services/creditNoteService.js - Credit-note service → Factus credit-note adapter: requests credit note
backend/src/services/creditNoteService.js - Factus credit-note adapter → Factus API client: uses
backend/src/integrations/factus/creditNotes.js - Customer service → Customer records: manages
backend/src/services/customerService.js - Product service → Product records: manages
backend/src/services/productService.js - Invoice workflow → Factus Pay: initiates collection
README.md - Factus Pay → Customer payment: collects
README.md - Customer payment → Invoice service: payment detection triggers issuance
README.md - Factus → DIAN: electronic invoicing
README.md