A comprehensive parcel delivery management system built with NestJS (Backend) and Angular (Frontend). The system supports multiple user roles including Admin, User, and Courier with full tracking capabilities.
- JWT-based authentication
- Role-based access control (Admin, User, Courier)
- Google OAuth integration
- User registration and login
- Password management
- Create parcels with automatic tracking number generation
- Real-time parcel tracking (public access)
- Status updates and notifications
- Courier assignment system
- Parcel history and analytics
- Courier dashboard with assigned parcels
- Real-time status updates
- Delivery history with earnings calculation
- Profile management
- Location tracking (ready for implementation)
- System-wide statistics and analytics
- User management
- Courier management and assignment
- Parcel creation and management
- Activity logging
- Responsive design with Bootstrap
- Real-time updates
- Google Maps integration
- Public tracking page
- Role-specific dashboards
Send It parcels/
├── sendit-backend/ # NestJS Backend API
│ ├── src/
│ │ ├── auth/ # Authentication & JWT
│ │ ├── user/ # User management
│ │ ├── parcel/ # Parcel & tracking system
│ │ └── main.ts # Application entry
│ └── prisma/ # Database schema & migrations
├── sendit-platform/
│ └── sendit-frontend/ # Angular Frontend
│ ├── src/app/
│ │ ├── admin/ # Admin dashboard
│ │ ├── courier/ # Courier interface
│ │ ├── user/ # User dashboard
│ │ └── shared/ # Shared components
│ └── package.json
└── README.md
- Framework: NestJS 11.x
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT + Passport
- Email: Nodemailer
- SMS: Twilio
- Validation: Joi + class-validator
- Documentation: Swagger
- Framework: Angular 17.x
- UI: Bootstrap 5.x
- Maps: Google Maps API
- State Management: NgRx
- Icons: FontAwesome
- Node.js 18+
- PostgreSQL database
- Google OAuth credentials (optional)
cd sendit-backend
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your database and API keys
# Run database migrations
npx prisma migrate dev
# Start development server
npm run start:devcd sendit-platform/sendit-frontend
# Install dependencies
npm install
# Start development server
npm start- Frontend: http://localhost:4200
- Backend API: http://localhost:3000
- Public Tracking: http://localhost:4200/track
GET /parcel/track/:trackingId- Public parcel tracking
POST /auth/login- User loginPOST /auth/signup- User registrationPOST /auth/google- Google OAuth
POST /parcel- Create parcel (admin)GET /parcel- List parcelsGET /parcel/:id- Get parcel detailsPATCH /parcel/:id/status- Update statusPATCH /parcel/:id/assign-courier- Assign courier
GET /parcel/courier/my-parcels- Get assigned parcelsGET /parcel/courier/history- Delivery historyGET /parcel/courier/stats- Courier statistics
GET /parcel/admin/stats- System statisticsGET /user- List usersGET /user/couriers- List couriersGET /user/:id/details- User details with history
- Create and manage parcels
- Assign couriers to parcels
- View system statistics
- Manage users and couriers
- Monitor delivery performance
- View assigned parcels
- Update delivery status
- Track delivery history
- Manage profile
- View earnings and statistics
- Track personal parcels
- View delivery history
- Manage profile
- Dashboard with parcel activity
- Track parcels without login
- View delivery status
- Share tracking links
- Public tracking without authentication
- Real-time status updates
- Delivery timeline
- Estimated delivery times
- Shareable tracking links
- Automatic courier assignment
- Status update notifications
- Earnings calculation
- Performance analytics
- Real-time system statistics
- User and courier management
- Parcel creation and assignment
- Activity logging
- Email notifications for status updates
- Courier assignment notifications (sent to users with courier details)
- SMS notifications (Twilio integration)
- Real-time updates
cd sendit-backend
npm run test
npm run test:e2ecd sendit-platform/sendit-frontend
npm testcd sendit-backend
npm run build
npm run start:prodcd sendit-platform/sendit-frontend
npm run build
# Deploy dist/ folder to your hosting serviceDATABASE_URL="postgresql://user:password@localhost:5432/sendit"
JWT_SECRET="your-jwt-secret"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
TWILIO_ACCOUNT_SID="your-twilio-sid"
TWILIO_AUTH_TOKEN="your-twilio-token"export const environment = {
production: false,
apiUrl: 'http://localhost:3000',
googleMapsApiKey: 'your-google-maps-api-key'
};- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Check the documentation
- Review the API endpoints
- Test the tracking system at
/track
🎉 The SendIT parcel delivery system is now complete and ready for production use!