How afri-trade-exchange/sentra works
Sentra supports traders creating consignments and uploading trade documents, then using generated QR codes and status views to support border clearance by customs officers. The README documents these product capabilities; sampled code confirms route protection, Firebase authentication and role lookup, and a simulated public tracking lookup. Consignment and document persistence wiring was not sampled, so those connections are shown only where documented and no backend service is inferred.
Main entry points: App.tsx Routes and shell · CustomsDashboard.tsx Customs dashboard · LandingPage.tsx Landing and tracking · Dashboard.tsx Trader dashboard
Components 25
Public and access
- Routes and shell
src/App.tsx - Landing and tracking
src/Components/Landing/LandingPage.tsx
Identity and roles
- Trader signup
src/Components/TraderSignup.tsx - Sign-in
src/Components/LoginPage.tsx - Auth context
src/Components/AuthContext.tsx - Role-protected routes
src/Components/ProtectedRoute.tsx - Auth and user roles
src/firebase/authService.ts
Trader workflow
- Trader dashboard
src/Components/Dashboard.tsx - Consignment creation
src/Components/Dashboard/ConsignmentCreationModal.tsx - Document upload
src/Components/UploadModal.tsx - Dashboard data types
src/types/dashboard.ts - Invoice details and export
src/Components/InvoiceDetailModal.tsx - Account settings
src/Components/Settings.tsx
Customs clearance
- Customs dashboard
src/Components/CustomsDashboard.tsx - QR scanner
src/Components/CustomsDashboard/QrScannerModal.tsx - Consignment queue
src/Components/CustomsDashboard/SearchInput.tsx - Status and timeline
src/Components/CustomsDashboard/StatusDropdown.tsx - Bulk actions
src/Components/CustomsDashboard/BulkActions.tsx - Analytics and activity
src/Components/CustomsDashboard/AnalyticsOverview.tsx - Officer onboarding
src/Components/CustomsDashboard/GuidedTour.tsx
External services
- Firebase Authentication
- Firestore
Other components
- Visitor
- Trader
- Customs officer
Connections 34
- Visitor → Routes and shell: opens
- Trader → Routes and shell: opens
- Customs officer → Routes and shell: opens
- Routes and shell → Landing and tracking: routes to
- Landing and tracking → Trader signup: navigates to
- Landing and tracking → Sign-in: navigates to
- Landing and tracking → Landing and tracking: looks up order
- Routes and shell → Trader signup: routes to
- Routes and shell → Sign-in: routes to
- Trader signup → Auth and user roles: registers user
- Sign-in → Auth and user roles: authenticates
- Auth and user roles → Firebase Authentication: creates or signs in
- Auth and user roles → Firestore: reads and writes roles
- Auth context → Firebase Authentication: observes session
- Auth context → Firestore: reads user role
- Routes and shell → Auth context: provides auth
- Routes and shell → Role-protected routes: wraps private routes
- Role-protected routes → Auth context: checks role
- Routes and shell → Trader dashboard: routes to
- Routes and shell → Customs dashboard: routes to
- Trader dashboard → Consignment creation: opens creation
- Consignment creation → Document upload: collects documents
- Consignment creation → Dashboard data types: uses data types
- Trader dashboard → Invoice details and export: opens invoice
- Trader → Trader dashboard: manages consignments
- Customs officer → Customs dashboard: reviews consignments
- Customs dashboard → QR scanner: opens scanner
- Customs dashboard → Consignment queue: searches queue
- Customs dashboard → Status and timeline: updates status
- Customs dashboard → Bulk actions: dispatches bulk actions
- Customs dashboard → Analytics and activity: shows insights
- Customs dashboard → Officer onboarding: offers onboarding
- Trader dashboard → Firestore: consignment data
- Customs dashboard → Firestore: consignment data