How mularahul/fastship works
FastShip is a delivery-management application with a React frontend and FastAPI backend; the README identifies PostgreSQL, Redis, and Celery as runtime requirements. The main workflow is seller shipment creation, partner assignment, and shipment-event tracking; delivery partners can view and update assigned shipments, while sellers can manage shipments and review delivery. Authentication, verification, and notifications are supporting stages. The source excerpts show service and dependency wiring, but not the frontend’s API calls or the notification service implementation, so those links are left unverified or omitted.
Main entry points: dependencies.py Auth and service dependencies · models.py Domain records · shipment.py Shipment lifecycle · router.py API router
Components 25
Frontend
- App routes
frontend/app/routes.ts - Shipment dashboard
frontend/app/routes/dashboard.tsx - Shipment card
frontend/app/components/shipment-card.tsx - Shipment details
frontend/app/components/shipment-view.tsx - Create shipment form
frontend/app/components/submit-shipment-form.tsx - Update shipment form
frontend/app/components/update-shipment-form.tsx - Auth context
frontend/app/contexts/AuthContext.tsx - App shell
frontend/app/root.tsx
Backend API
- API router
backend/app/api/router.py - Shipment endpoints
backend/app/api/routers/shipment.py - Seller endpoints
backend/app/api/routers/seller.py - Partner endpoints
backend/app/api/routers/delivery_partner.py - Auth and service dependencies
backend/app/api/dependencies.py - Shipment schemas
backend/app/api/schemas/shipment.py
Delivery Services
- Shipment lifecycle
backend/app/services/shipment.py - Partner assignment
backend/app/services/delivery_partner.py - Seller accounts
backend/app/services/seller.py - User identity
backend/app/services/user.py - Shipment events
backend/app/services/shipment_event.py
State and Persistence
- Domain records
backend/app/database/models.py - PostgreSQL
- Redis state
backend/app/database/redis.py
Async Notifications
- Email and SMS tasks
backend/app/worker/tasks.py - Mail and SMS providers
Other components
- Seller or partner
Connections 29
- App shell → Auth context: provides context
frontend/app/root.tsx - Shipment card → Shipment details: renders
frontend/app/components/shipment-card.tsx - Update shipment form → Shipment card: updates shipment
- Seller or partner → App routes: uses
- App routes → API router: API requests
- API router → Shipment endpoints: registers
backend/app/api/router.py - API router → Seller endpoints: registers
backend/app/api/router.py - API router → Partner endpoints: registers
backend/app/api/router.py - Shipment endpoints → Auth and service dependencies: resolves dependencies
backend/app/api/routers/shipment.py - Seller endpoints → Auth and service dependencies: resolves dependencies
backend/app/api/routers/seller.py - Partner endpoints → Auth and service dependencies: resolves dependencies
backend/app/api/routers/delivery_partner.py - Auth and service dependencies → Shipment lifecycle: constructs
backend/app/api/dependencies.py - Auth and service dependencies → Seller accounts: constructs
backend/app/api/dependencies.py - Auth and service dependencies → Partner assignment: constructs
backend/app/api/dependencies.py - Shipment endpoints → Shipment schemas: validates with
backend/app/api/routers/shipment.py - Shipment lifecycle → Partner assignment: assigns partner
backend/app/services/shipment.py - Shipment lifecycle → Shipment events: records events
backend/app/services/shipment.py - Shipment lifecycle → Redis state: checks delivery code
backend/app/services/shipment.py - Partner endpoints → Redis state: blacklists token
backend/app/api/routers/delivery_partner.py - Auth and service dependencies → Redis state: checks blacklist
backend/app/api/dependencies.py - User identity → Email and SMS tasks: queues verification mail
backend/app/services/user.py - Email and SMS tasks → Mail and SMS providers: sends messages
backend/app/worker/tasks.py - Shipment lifecycle → Domain records: creates and updates
backend/app/services/shipment.py - Shipment events → Domain records: persists events
backend/app/services/shipment_event.py - User identity → Domain records: manages users
backend/app/services/user.py - Seller accounts → Domain records: manages sellers
backend/app/services/seller.py - Partner assignment → Domain records: manages partners
backend/app/services/delivery_partner.py - Domain records → PostgreSQL: stored in
- Redis state → PostgreSQL