ZapShift Client is a modern, responsive React-based frontend application for the ZapShift Parcel Management System. It provides a seamless user experience for booking parcels, tracking deliveries, and managing shipments with role-based access control for users, admins, and riders.
Live Demo: https://pht-first-go.web.app/
- Overview
- Tech Stack
- Project Structure
- Features
- Installation & Setup
- Running the Application
- Key Pages & Routes
- System Roles
- Project Architecture
- Dependencies
- Author
ZapShift is a comprehensive parcel management solution that streamlines the delivery process from booking to confirmation. The client application serves as the primary interface for all user interactions with the system, featuring:
- Intelligent Parcel Booking - Easy-to-use interface for creating shipments
- Real-time Tracking - Track parcels throughout their delivery lifecycle
- Dashboard Management - Personalized dashboards for users, admins, and riders
- Multi-role System - Role-based access control ensuring secure and appropriate access
- Nationwide Coverage - Support for delivery across 64 districts
| Technology | Purpose |
|---|---|
| React 19.2 | UI Library & Component Framework |
| Vite 7.3 | Lightning-fast build tool & dev server |
| React Router 7.13 | Client-side routing & navigation |
| React Hook Form 7.71 | Form state management & validation |
| TanStack React Query 5.96 | Server state management & data fetching |
| Tailwind CSS 4.2 | Utility-first CSS framework |
| DaisyUI 5.5 | Component library built on Tailwind |
| Axios 1.13 | HTTP client for API requests |
| Firebase 12.14 | Authentication & backend services |
| React Leaflet 5.0 | Interactive map integration |
| Recharts 3.8 | Data visualization & charts |
| Lucide React 0.577 | Modern icon library |
| SweetAlert2 11.26 | Beautiful alert dialogs |
| Swiper 12.1 | Touch slider carousel |
| ESLint 9.39 | Code quality & linting |
FirstGo_Client/
βββ public/
β βββ locations.json # District & location data
β
βββ src/
β βββ assets/ # Images, icons, and static resources
β β
β βββ components/ # Reusable UI components
β β βββ Arrow/ # Navigation arrow component
β β βββ Button/ # Custom button components
β β βββ Forbidden/ # Access denied component
β β βββ Logo/ # Brand logo component
β β
β βββ Context/ # React Context for state management
β β βββ AuthContext/
β β βββ AuthProvider.jsx # Authentication provider
β β βββ AuthContext.jsx # Auth context definition
β β
β βββ firebase/ # Firebase configuration
β β βββ firebase.init.js # Firebase initialization
β β
β βββ hooks/ # Custom React hooks
β β βββ useAuth.jsx # Auth context hook
β β βββ useAxiosSecure.jsx # Secure API requests hook
β β βββ useRole.jsx # User role detection hook
β β
β βββ layouts/ # Page layouts
β β βββ Root/ # Main application layout
β β βββ Auth/ # Authentication page layout
β β βββ Dashboard/ # Dashboard layout with sidebar
β β
β βββ pages/ # Application pages/views
β β βββ Home/ # Landing page
β β βββ Auth/
β β β βββ Login/ # User login page
β β β βββ Register/ # User registration page
β β βββ SendAPercel/ # Parcel booking interface
β β βββ TrackAParcel/ # Parcel tracking page
β β βββ BeARider/ # Rider registration/application
β β βββ Coverage/ # Service coverage map
β β βββ Dashboard/ # Dashboard pages
β β β βββ Index/ # Dashboard home
β β β βββ MyParcel/ # User's parcels
β β β βββ Payment/ # Payment processing
β β β βββ PaymentHistory/ # Payment records
β β β βββ ApproveRiders/ # Admin: Rider approval
β β β βββ UsersManagement/# Admin: User management
β β β βββ AssignRiders/ # Admin: Assign riders to parcels
β β β βββ AssignedTasks/ # Rider: Assigned deliveries
β β β βββ DeliveredTasks/ # Rider: Completed deliveries
β β βββ Error/ # 404/Error page
β β
β βββ routes/ # Route configuration
β β βββ router.jsx # Main router configuration
β β βββ PrivateRoute.jsx # Protected routes (authenticated users)
β β βββ AdminRoute.jsx # Admin-only routes
β β βββ RiderRoute.jsx # Rider-only routes
β β
β βββ utility/ # Helper functions and shared components
β β βββ Header/ # Navigation header
β β βββ Footer/ # Page footer
β β βββ Loader/ # Loading spinner
β β
β βββ App.jsx # Root app component
β βββ App.css # App-level styles
β βββ main.jsx # Application entry point
β βββ index.css # Global styles
β βββ styles/ # Additional stylesheets
β
βββ package.json # Project dependencies & scripts
βββ vite.config.js # Vite configuration
βββ eslint.config.js # ESLint configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ README.md # This file
- β User Authentication - Email/password and Google authentication via Firebase
- β Parcel Booking System - Intuitive form for creating new shipments
- β Real-time Tracking - Monitor parcel status and location throughout delivery
- β Payment Integration - Seamless payment processing for delivery charges
- β Role-Based Dashboard - Customized interfaces for different user types
- Create and manage parcel bookings
- Track parcel status in real-time
- View payment history
- Review delivery services
- Access personal dashboard
- Approve and manage rider applications
- User management and account control
- Assign riders to parcel deliveries
- Monitor system operations
- View parcel routing information
- View assigned delivery tasks
- Update delivery status
- Confirm deliveries with OTP verification
- Track completed deliveries
- Manage rider profile and availability
- π± Fully responsive design (mobile, tablet, desktop)
- β‘ Fast performance with Vite
- π¨ Beautiful UI with Tailwind CSS & DaisyUI
- πΊοΈ Interactive map for coverage visualization
- π Data visualization with Recharts
- πͺ Smooth animations & transitions with Swiper
- Node.js (v14.0.0 or higher)
- npm or yarn package manager
- Git
-
Clone the repository:
git clone https://github.com/parvejtalukder/FirstGo_Client.git cd FirstGo_Client -
Install dependencies:
npm install
-
Configure Firebase:
- Create a
.env.localfile in the root directory - Add your Firebase configuration:
VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id
- Create a
-
Install git hooks (Optional):
npm run prepare
npm run devThe application will start on http://localhost:5173
npm run buildGenerates optimized production build in the dist/ directory
npm run previewnpm run lintChecks code for style and quality issues
| Route | Component | Access | Purpose |
|---|---|---|---|
/ |
Home | Public | Landing page |
/login |
Login | Public | User authentication |
/register |
Register | Public | User registration |
/send-percel |
SendAPercel | Private | Create new parcel booking |
/track-percel/:trackingId |
TrackAParcel | Public | Track parcel status |
/be-rider |
BeARider | Private | Apply to become a rider |
/coverage |
Coverage | Public | View service coverage areas |
/dashboard |
Dashboard | Private | Main dashboard hub |
/dashboard/my-parcels |
MyParcels | Private | View user's parcels |
/dashboard/payment/:parcelId |
Payment | Private | Process payment |
/dashboard/payment-history |
PaymentHistory | Private | View payment records |
/dashboard/approve-riders |
ApproveRiders | Admin | Manage rider applications |
/dashboard/users-management |
UsersManagement | Admin | Manage users |
/dashboard/assign-riders |
AssignRiders | Admin | Assign riders to parcels |
/dashboard/assigned-tasks |
AssignedTasks | Rider | View assigned deliveries |
/dashboard/delivered-tasks |
DeliveredTasks | Rider | View completed deliveries |
- Book parcels for delivery
- Track shipment status in real-time
- Manage payment information
- View delivery history
- Rate and review services
- Approve new rider applications
- Manage user accounts and permissions
- Assign riders to parcel deliveries
- Monitor system performance
- Manage warehouse locations
- Control pricing and rates
- View assigned delivery tasks
- Update parcel status during delivery
- Confirm delivery via OTP verification
- Track earnings and commissions
- Manage delivery schedule
- View completed deliveries
- Firebase Auth - User authentication state
- React Context (AuthProvider) - Global authentication context
- React Query - Server state & API caching
- React Hook Form - Form state management
Root Layout
βββ Public Routes (Home, Coverage, TrackAParcel)
βββ Auth Routes (Login, Register)
βββ Private Routes (Protected by PrivateRoute)
β βββ User Routes (SendAPercel, BeARider)
β βββ Dashboard Routes
β β βββ Admin Routes (ApproveRiders, UsersManagement)
β β βββ Rider Routes (AssignedTasks, DeliveredTasks)
β β βββ Common Routes (MyParcels, Payment, PaymentHistory)
- User registers with email/password or Google
- Firebase handles authentication
- AuthProvider stores user state
- PrivateRoute components check authentication
- Role-specific routes validate user role
- Unauthorized access redirected to Forbidden page
{
"@tailwindcss/vite": "^4.2.1",
"@tanstack/react-query": "^5.96.1",
"axios": "^1.13.6",
"firebase": "^12.14.0",
"leaflet": "^1.9.4",
"lucide-react": "^0.577.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-hook-form": "^7.71.2",
"react-icons": "^5.6.0",
"react-leaflet": "^5.0.0-rc.2",
"react-responsive-carousel": "^3.2.23",
"react-router": "^7.13.1",
"recharts": "^3.8.1",
"sweetalert2": "^11.26.24",
"swiper": "^12.1.2",
"tailwindcss": "^4.2.1"
}{
"@eslint/js": "^9.39.1",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.1",
"daisyui": "^5.5.19",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.5.0",
"vite": "^7.3.1"
}- Vite - Fast module bundling and hot module replacement
- React Query - Efficient data fetching and caching
- Code Splitting - Route-based lazy loading
- Tailwind CSS - Optimized CSS with purging
- React 19 - Latest performance improvements and concurrent rendering
The application integrates with a backend API through:
- Axios with secure interceptors (
useAxiosSecurehook) - React Query for data caching and synchronization
- Firebase for authentication services
- β Protected routes with authentication checks
- β Role-based access control (RBAC)
- β Secure API calls with token-based auth
- β Firebase authentication security
- β OTP-based delivery confirmation
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Parvej Husen Talukder
- GitHub: @parvejtalukder
- Repository: FirstGo_Client
- Live Demo: https://the-first-go.vercel.app
For issues, bug reports, or feature requests, please open an issue on the GitHub repository.
- React & Vite communities for excellent tools
- Firebase for reliable authentication
- Tailwind CSS & DaisyUI for beautiful design components
- All contributors and users of this project
Last Updated: June 1, 2026