How achraf-okpe/customs-management-system works
This is a customs-management ERP with a React PWA frontend and Express/Prisma API. Users navigate authenticated pages to manage customs records, partners and administration; dashboard, search, statistics, PDF and configurable Excel export provide adjacent capabilities. The export builder’s documented workflow is configuration in the frontend, then server-side preview or workbook generation. Several backend domain services are unsampled, so their internal links are omitted rather than inferred.
Main entry points: index.js API server · partnersRoutes.js Partner routes · adminRoutes.js Administration routes · queryEngine.js Report query engine
Components 28
Web application
- Application shell
frontend/src/App.tsx - Page routing
frontend/src/router.tsx - ERP pages
frontend/src/pages - API clients
frontend/src/api.ts - Export builder
frontend/src/components/shared/ExportEngineModal.tsx
API and access
- API server
backend/index.js - Authentication
backend/routes/authRoutes.js - Customs routes
backend/routes/customsRoutes.js - Partner routes
backend/routes/partnersRoutes.js - Administration routes
backend/routes/adminRoutes.js - Export routes
backend/routes/exportRoutes.js
Customs operations
- Customs services
backend/services - Partner service
backend/services/partnerService.js - Administration service
backend/services/adminService.js
Reporting and exports
- Dashboard service
backend/services/dashboardService.js - Statistics service
backend/services/statisticsService.js - Search service
backend/services/searchService.js - Export services
backend/services - Export catalog
backend/export/catalog.js - Report query engine
backend/export/engine/queryEngine.js - Dataset resolvers
backend/export/engine - Excel renderer
backend/export/excelRenderer.js
Shared services
- Application database
- Request validation
backend/lib/validation.js - Audit logging
backend/lib/audit.js - Customs query helpers
backend/lib/customsQueries.js - Customs calculations
backend/lib/customsSummary.js
Other components
- ERP user
Connections 30
- ERP user → Application shell: uses
- Application shell → Page routing: loads
frontend/src/App.tsx - Application shell → API clients: configures
frontend/src/App.tsx - Page routing → ERP pages: routes to
frontend/src/router.tsx - Page routing → API clients: uses
frontend/src/router.tsx - Export builder → API clients: requests
frontend/src/components/shared/ExportEngineModal.tsx - ERP user → Export builder: configures
- API clients → Export routes: calls HTTP
- API server → Authentication: registers
backend/index.js - API server → Customs routes: registers
backend/index.js - API server → Partner routes: registers
backend/index.js - API server → Administration routes: registers
backend/index.js - API server → Export routes: registers
backend/index.js - Customs routes → Customs services: dispatches
- Partner routes → Partner service: calls
backend/routes/partnersRoutes.js - Administration routes → Administration service: calls
backend/routes/adminRoutes.js - Export routes → Export services: calls
backend/routes/exportRoutes.js - Export routes → Application database: passes database client
backend/routes/exportRoutes.js - Partner routes → Request validation: validates with
backend/routes/partnersRoutes.js - Administration routes → Request validation: validates with
backend/routes/adminRoutes.js - Partner routes → Audit logging: records changes
backend/routes/partnersRoutes.js - Administration routes → Audit logging: records changes
backend/routes/adminRoutes.js - Dashboard service → Application database: reads
- Report query engine → Export catalog: gets dataset
backend/export/engine/queryEngine.js - Report query engine → Dataset resolvers: loads records
backend/export/engine/queryEngine.js - Report query engine → Customs calculations: calculates impact
backend/export/engine/queryEngine.js - Export catalog → Dataset resolvers: defines datasets
backend/export/catalog.js - Export services → Report query engine: invokes
- Export services → Excel renderer: renders workbook
- Customs query helpers → Application database: queries