How meghnaroyal/fastcourier works
What this project is (from README + file tree)
FastCourier is a web-based courier management system covering the lifecycle from package registration → dispatch → delivery tracking, with user and administrator interfaces, plus:
• Realtime tracking
• Automated notifications
• Analytics/reports
From the repo layout, you clearly have:
• A database schema (database/courierdb1.sql)
• A Node-based web deployment pipeline (.github/workflows/azure-webapps-node.yml)
• A frontend directory (frontend/…) that includes an .env and even dumpfile.js (suggesting Node tooling/scripts)
• the backend exists but isn’t shown here,
• the backend is inside frontend/ (e.g., Next.js API routes, or an Express server co-located),
• or the system is currently frontend + DB only (unlikely given “realtime tracking” + “notifications”).
System Context (1 page, high-level)
Actors and external dependencies:
• End User (Customer): registers packages, views tracking
• Admin/Operations: manages couriers, dispatch, analytics
• FastCourier System: the product boundary
• Likely external services (based on features; include only if used/planned):
• Maps/Geocoding provider (for realtime location visualization)
• SMS/Email/Push provider (notifications)
• Possibly Identity Provider (if auth is external), otherwise “Auth in backend”
Web Client (Browser SPA or SSR Web App)
• Served from: Azure Web App (if combined) or static hosting (if separate)
• Reads configuration from frontend/.env (call out “build-time env” vs “runtime env”)
Backend API (Node.js)
• If present in repo: locate entrypoint (server.js, app.js, api/, routes/)
• Authentication/Authorization (user vs admin roles)
• Package Registration
• Dispatch/Assignment
• Tracking ingestion + querying
• Notification orchestration
• Analytics/report generation
Realtime Channel
• If implemented: WebSockets / Socket.IO / SSE
• part of Backend API (“Realtime Gateway inside API”), or
• separate service (“Realtime service”) if scaled independently
Database (SQL)
• From database/courierdb1.sql, label it explicitly:
• “CourierDB (SQL)”
• Main entity groupings (even if approximate):
• Users/Admins
• Packages/Shipments
• Tracking Events / Location updates
• Notifications log
• Reports/aggregations (or derived queries)
Notification Providers (External)
• Email/SMS gateways (e.g., SendGrid/Twilio) if used
Analytics/Reporting
• If it’s just SQL queries + backend endpoints: keep inside Backend API as a component
• If it’s heavy/batch: show a background worker or scheduled job
CI/CD + Hosting (Azure + GitHub Actions)
• A small “Deployment” area:
• GitHub Actions workflow (azure-webapps-node.yml) → Azure Web App
• Browser → Backend API: HTTPS/REST (label endpoints conceptually: /packages, /tracking, /admin/reports)
• Browser ↔ Realtime: WebSocket/SSE for live tracking updates
• Backend API → DB: SQL queries/transactions
• Backend API → Notification Provider: SMTP/HTTP API
• (Optional) Courier device/app → Backend API: tracking location updates (if couriers send GPS)
• API Layer
• Controllers/Routes (User, Admin, Tracking)
• Domain/Service Layer
• PackageService
• TrackingService
• NotificationService
• ReportingService
• AuthService
• Infrastructure Layer
• DB access/repositories
• Realtime adapter (Socket.IO)
• External notification adapters
• Background Jobs
• Notification retries
• Daily/weekly report generation
• Tracking cleanup/aggregation
Dependencies: Controllers → Services → Repositories/Adapters.
• database/courierdb1.sql
• frontend/
• “Azure Web App (Node) hosts both UI and API”
• If API is separate but missing here, keep API as its own container and annotate “backend repo/service not shown in this tree”.
• .github/workflows/azure-webapps-node.yml
• frontend/.env
• => indicate configuration for:
• API base URL
• keys (maps, notifications) *never drawn as raw secrets*, just “ENV config”
• frontend/dumpfile.js
Also, since frontend/node_modules is present (and should typically be gitignored), don’t model it; it’s not an architecture component.
Detail level guidance (don’t overthink, just decompose)
If a feature is called out in README, it should appear somewhere:
• “Realtime tracking” => realtime channel + tracking ingestion + tracking queries
• “Automated notifications” => notification service + provider(s) + templates/events
• “Analytics reports” => reporting module + DB queries/aggregations + admin UI pages
System Context
• Actors: User, Admin, (Courier if applicable)
• External: Maps, Notification provider
• System boundary: FastCourier
• Browser Web UI
• Node Backend API
• Realtime channel
• SQL DB
• Notification provider
• Azure Web App hosting
• GitHub Actions pipeline
• Routes/Controllers
• Services: Package, Tracking, Notification, Reporting, Auth
• Repos/DB layer
• Realtime adapter
• Job scheduler/worker (if used)