How alessandr0gabriel/vendly-commerce works
Vendly Commerce is a multi-tenant commerce-management SaaS for small establishments. Establishment staff sign in, manage products and stock, handle orders, and review sales and billing; administrators also manage establishments and subscriptions. The browser modules call the Express API, which applies business rules and persists data through Firebase/Firestore, while Socket.IO supports real-time order updates. The README documents payments, webhooks, and subscriptions; some detailed routes and their wiring were not sampled, so those links are shown only where documented or directly evidenced.
Main entry points: admin.js Admin interface · backend/api.js Business API · server.js HTTP and socket server · core/api.js Authenticated API client
Components 22
Browser application
- Admin interface
frontend/js/admin.js - Session verification
frontend/js/core/auth.js - Products and stock
frontend/js/modules/produtos.js - Order management
frontend/js/modules/pedidos.js - Sales dashboard
frontend/js/modules/dashboardFull.js - Billing reports
frontend/js/modules/faturamento.js - Establishment settings
frontend/js/modules/estabelecimento.js - Authenticated API client
frontend/js/core/api.js - Live order client
frontend/js/core/socket.js
API and business operations
- HTTP and socket server
backend/server.js - Business API
backend/api.js - Firebase sign-in
backend/utils/firebaseAuthRest.js - Subscription rules
backend/utils/assinatura.js - Subscription pricing
backend/utils/precosAssinatura.js - Stock reservation rules
backend/utils/reservaEstoque.js - Order history cleanup
backend/jobs/historicoArquivar.js - Expired PIX cleanup
backend/jobs/limparPixExpirados.js
Persistence and integrations
- Database initialization
backend/database/connection.js - Firebase services
backend/config/firebase.js - Firestore data
Other components
- Establishment staff
- Mercado Pago
Connections 26
- Establishment staff → Admin interface: uses
README.md - Admin interface → Session verification: checks session
frontend/js/admin.js - Admin interface → Products and stock: loads
frontend/js/admin.js - Admin interface → Order management: loads
frontend/js/admin.js - Admin interface → Billing reports: loads
frontend/js/admin.js - Admin interface → Establishment settings: loads
frontend/js/admin.js - Session verification → Authenticated API client: checks token
frontend/js/core/auth.js - Session verification → Live order client: starts socket
frontend/js/core/auth.js - Products and stock → Authenticated API client: requests data
frontend/js/modules/produtos.js - Order management → Authenticated API client: requests data
frontend/js/modules/pedidos.js - Sales dashboard → Authenticated API client: requests data
frontend/js/modules/dashboardFull.js - Billing reports → Authenticated API client: requests data
frontend/js/modules/faturamento.js - Authenticated API client → HTTP and socket server: sends requests
README.md - Live order client → HTTP and socket server: connects live
README.md - HTTP and socket server → Database initialization: awaits connection
backend/server.js - HTTP and socket server → Order history cleanup: starts cleanup
backend/server.js - HTTP and socket server → Expired PIX cleanup: starts cleanup
backend/server.js - HTTP and socket server → Business API: mounts routes
backend/server.js - Database initialization → Firebase services: loads services
backend/database/connection.js - Database initialization → Firestore data: seeds admin
backend/database/connection.js - Business API → Firestore data: reads and writes
backend/api.js - Business API → Stock reservation rules: uses rules
backend/api.js - Business API → Subscription rules: uses rules
backend/api.js - Subscription pricing → Subscription rules: uses calculations
backend/utils/precosAssinatura.js - Business API → Mercado Pago: processes payments
README.md - Business API → Firebase sign-in: signs in
backend/api.js