How alasaihi001/cargo-express works
Cargo Express is a logistics and shipment-management portal with separate client, agent, assistant, and administrator experiences. Users authenticate, then manage orders and shipments, documents and invoices, payments, notifications, or support claims through role-specific dashboards and API routes. The sampled routes show token-based authorization and Prisma-backed operations; the broader domain branches are supported by the file tree, but their specific runtime calls were not sampled. Dashed links mark those unverified connections.
Main entry points: api Role-specific API routes · prisma.ts Prisma client · jwt-utils.ts Token verification · route.ts Claims and support
Components 19
Identity and access
- Sign-in and registration
app/auth/login/page.tsx - Authentication context
contexts/auth-context.tsx - Token verification
lib/jwt-utils.ts
Role-based portals
- Client portal
app/dashboard/client/page.tsx - Agent dashboard
app/dashboard/agent/page.tsx - Assistant portal
app/dashboard/assistant/page.tsx - Admin portal
app/dashboard/admin/page.tsx
Logistics and support
- Orders and shipments
app/api/commandes/route.ts - Documents and invoices
app/dashboard/agent/documents/page.tsx - Claims and support
app/api/reclamations/route.ts - Payments and billing
app/api/paiements/route.ts - Notifications
app/api/notifications/route.ts - Reports and analytics
app/api/admin/reports/route.ts
API and persistence
- Role-specific API routes
app/api - Prisma client
lib/prisma.ts - Application database
- Shared interface components
components/ui
Other components
- Client
- Operations staff
Connections 31
- Client → Sign-in and registration: signs in
- Operations staff → Sign-in and registration: signs in
- Sign-in and registration → Authentication context: uses
app/auth/login/page.tsx - Authentication context → Token verification: establishes session
- Client → Client portal: uses
- Operations staff → Agent dashboard: uses
- Operations staff → Assistant portal: uses
- Operations staff → Admin portal: uses
- Client portal → Role-specific API routes: requests data
- Agent dashboard → Role-specific API routes: requests data
- Assistant portal → Role-specific API routes: requests data
- Admin portal → Role-specific API routes: requests data
- Role-specific API routes → Orders and shipments: routes requests
- Role-specific API routes → Documents and invoices: routes requests
- Role-specific API routes → Claims and support: routes requests
- Role-specific API routes → Payments and billing: routes requests
- Role-specific API routes → Notifications: routes requests
- Role-specific API routes → Reports and analytics: routes requests
- Orders and shipments → Token verification: verifies token
app/api/commandes/route.ts - Orders and shipments → Prisma client: reads and writes
app/api/commandes/route.ts - Claims and support → Token verification: verifies token
app/api/reclamations/route.ts - Claims and support → Prisma client: reads and writes
app/api/reclamations/route.ts - Claims and support → Notifications: creates alerts
app/api/reclamations/route.ts - Reports and analytics → Token verification: verifies token
app/api/admin/reports/route.ts - Reports and analytics → Prisma client: queries data
app/api/admin/reports/route.ts - Payments and billing → Token verification: verifies token
app/api/paiements/route.ts - Payments and billing → Prisma client: reads and writes
app/api/paiements/route.ts - Notifications → Token verification: verifies token
app/api/notifications/route.ts - Notifications → Prisma client: reads and writes
app/api/notifications/route.ts - Prisma client → Application database: queries
- Sign-in and registration → Shared interface components: renders controls
app/auth/login/page.tsx