How guirrasup/sistemanex works
SistemaNEX is a Brazilian ERP and electronic-fiscal-document platform. The main user journey runs from the React application through its API services and Express routes/controllers to fiscal business services and persistent storage, then returns results for display and document viewing. Distinct product areas include authentication, registrations, finance and inventory, fiscal document issuance, tax calculations, and CNPJ lookup. The README documents the overall flow and capabilities; several backend integrations and feature internals are represented at their supported directory level because their source was not sampled.
Main entry points: App.tsx Application shell · controllers Fiscal controllers · services Fiscal workflows · api.ts HTTP client
Components 28
User interface
- Application shell
src/App.tsx - Login
src/components/auth/LoginView.tsx - Fiscal issuers
src/components/fiscal - Fiscal archive
src/components/fiscal/DocumentosFiscaisList.tsx - Dashboard
src/components/dashboard/DashboardReal.tsx - Finance screens
src/components/financeiro/FinanceiroView.tsx - Customer records
src/components/cadastros/ClientesView.tsx - CNPJ lookup
src/components/tools/ConsultaCnpjView.tsx
API application
- HTTP client
src/services/api.ts - Fiscal API services
src/services - ERP API services
src/services - Express server
backend/src/server.ts - REST routes
backend/src/routes - Authentication
backend/src/services/auth.service.ts - Session middleware
backend/src/middlewares/auth.middleware.ts - Fiscal controllers
backend/src/controllers
Fiscal operations
- Fiscal workflows
backend/src/services - XML and signing
backend/src/utils - Tax calculation
backend/src/utils/tributosEngine.ts
ERP operations
- ERP workflows
backend/src/services
Data and integrations
- Repositories
backend/src/repositories - Relational database
backend/src/lib/prisma.ts - Browser storage
src/utils/storage.ts - Email service
backend/src/services/email.service.ts - Application logger
backend/src/lib/logger.ts
Other components
- Business user
- Tax authorities
- CNPJ providers
Connections 33
- Business user → Application shell: uses
README.md - Application shell → Login: presents
src/App.tsx - Application shell → Fiscal issuers: presents
src/App.tsx - Application shell → Fiscal archive: presents
src/App.tsx - Application shell → Dashboard: presents
src/App.tsx - Application shell → Finance screens: presents
src/App.tsx - Application shell → Customer records: presents
src/App.tsx - Application shell → CNPJ lookup: presents
src/App.tsx - Login → HTTP client: authenticates via
src/components/auth/LoginView.tsx - Fiscal issuers → Fiscal API services: requests documents
src/components/fiscal/CteEmissor.tsx - Fiscal archive → Fiscal API services: loads archive
- Finance screens → ERP API services: requests finance
src/components/financeiro/FinanceiroView.tsx - Customer records → ERP API services: requests records
src/components/cadastros/ClientesView.tsx - CNPJ lookup → CNPJ providers: looks up
- Fiscal API services → HTTP client: sends requests
src/services/cte.service.ts - ERP API services → HTTP client: sends requests
src/services/clientes.service.ts - HTTP client → Express server: calls REST API
README.md - Express server → REST routes: mounts routes
backend/src/server.ts - REST routes → Fiscal controllers: routes requests
backend/src/routes/nfe.routes.ts - REST routes → Session middleware: guards requests
backend/src/routes/nfe.routes.ts - Session middleware → Authentication: validates session
backend/src/middlewares/auth.middleware.ts - Fiscal controllers → Fiscal workflows: orchestrates
backend/src/controllers/nfe.controller.ts - Fiscal workflows → XML and signing: generates signed XML
- Fiscal workflows → Tax calculation: calculates taxes
- Fiscal workflows → Tax authorities: submits documents
README.md - Fiscal controllers → ERP workflows: uses ERP operations
backend/src/controllers/cte.controller.ts - Fiscal controllers → Email service: sends notices
backend/src/controllers/nfe.controller.ts - ERP workflows → Repositories: uses repositories
backend/src/services/auth.service.ts - Fiscal workflows → Repositories: uses repositories
backend/src/services/auth.service.ts - Repositories → Relational database: persists records
README.md - Application shell → Browser storage: loads cached state
src/App.tsx - Fiscal controllers → Application logger: logs activity
backend/src/controllers/nfe.controller.ts - Authentication → Email service: sends account email
backend/src/services/auth.service.ts