An open API service indexing awesome lists of open source software.

https://github.com/nrbnayon/track-fleet-pro-web

A modern, full-featured fleet and parcel tracking management system built with Next.js 16, React 19, and TypeScript. Designed for logistics companies to manage drivers, track parcels in real-time, and handle seller operations with an intuitive dashboard interface.
https://github.com/nrbnayon/track-fleet-pro-web

nextjs16 pwa-apps saas-application typescript website

Last synced: about 1 month ago
JSON representation

A modern, full-featured fleet and parcel tracking management system built with Next.js 16, React 19, and TypeScript. Designed for logistics companies to manage drivers, track parcels in real-time, and handle seller operations with an intuitive dashboard interface.

Awesome Lists containing this project

README

          

# Track Fleet Pro - Web

A modern, full-featured fleet and parcel tracking management system built with Next.js 16, React 19, and TypeScript. Designed for logistics companies to manage drivers, track parcels in real-time, and handle seller operations with an intuitive dashboard interface.

## πŸš€ Features

### Core Features

- **Real-Time Parcel Tracking**: Live GPS tracking for parcels with interactive maps (Leaflet)
- **Multi-Role Dashboard**: Dedicated dashboards for Super Admins and Seller Admins
- **Driver Management**: Comprehensive driver profile management and assignment
- **Parcel Management**: Create, manage, and track parcel shipments
- **Seller Management**: Manage seller accounts and operations (Super Admin only)
- **Analytics & Reporting**: Detailed analytics with charts and export functionality (PDF/Excel)
- **User Authentication**: Secure login, registration, and OTP verification
- **Multi-Language Support**: Full internationalization (i18n) support
- **Progressive Web App (PWA)**: Offline capability with service worker support

### Advanced Features

- **Role-Based Access Control (RBAC)**: Granular permission management
- **Real-Time Notifications**: WebSocket-based notifications system
- **Export Capabilities**: Export data to PDF and Excel formats
- **Google Maps Integration**: Enhanced mapping and location features
- **Responsive Design**: Fully responsive UI with mobile-first approach
- **Dark/Light Theme Support**: Theme switching with persistence

## πŸ› οΈ Tech Stack

### Frontend

- **Framework**: Next.js 16.0.10
- **UI Library**: React 19.2.1
- **Language**: TypeScript
- **Styling**: Tailwind CSS 4
- **UI Components**: Radix UI
- **Icons**: Hugeicons, Tabler Icons, Lucide React
- **Forms**: React Hook Form with Zod validation

### State Management & Data

- **State Management**: Redux Toolkit with Redux hooks
- **Maps**: Leaflet & React Leaflet with Google Maps API integration
- **Charts**: Recharts

### Utilities & Libraries

- **Authentication**: jose (JWT handling)
- **Export**: ExcelJS, jsPDF with AutoTable
- **Notifications**: Sonner (Toast notifications)
- **Motion**: Framer Motion animations
- **Form Validation**: Zod with React Hook Form resolvers

### Development Tools

- **Linting**: ESLint
- **PWA Support**: next-pwa with Workbox
- **Node Version**: Requires Node.js with npm

## πŸ“‹ Prerequisites

- Node.js 18+ and npm 9+
- Modern web browser with JavaScript enabled
- Google Maps API key (for mapping features)

## πŸ”§ Installation

1. **Clone the repository**

```bash
git clone
cd track-fleet-pro-web
```

2. **Install dependencies**

```bash
npm install
```

3. **Configure environment variables**
Create a `.env.local` file in the root directory with required variables:

```env
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=
NEXT_PUBLIC_APP_URL=
```

4. **Run development server**

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) in your browser

## πŸ“¦ Available Scripts

- **`npm run dev`** - Start development server with Webpack
- **`npm run build`** - Build for production with optimization
- **`npm start`** - Start production server
- **`npm run lint`** - Run ESLint for code quality checks

## πŸ“ Project Structure

```
track-fleet-pro-web/
β”œβ”€β”€ app/ # Next.js app directory
β”‚ β”œβ”€β”€ (auth)/ # Authentication pages
β”‚ β”‚ β”œβ”€β”€ login/
β”‚ β”‚ β”œβ”€β”€ signup/
β”‚ β”‚ β”œβ”€β”€ forgot-password/
β”‚ β”‚ β”œβ”€β”€ reset-password/
β”‚ β”‚ β”œβ”€β”€ verify-otp/
β”‚ β”‚ └── reset-success/
β”‚ β”œβ”€β”€ (landing)/ # Landing pages
β”‚ β”‚ β”œβ”€β”€ track-parcel/
β”‚ β”‚ β”œβ”€β”€ about-us/
β”‚ β”‚ └── coverage/
β”‚ β”œβ”€β”€ (roles)/ # Role-based layouts
β”‚ β”‚ β”œβ”€β”€ seller-admin/ # Seller Admin dashboard
β”‚ β”‚ β”œβ”€β”€ super-admin/ # Super Admin dashboard
β”‚ β”‚ └── (shared)/ # Shared role components
β”‚ β”œβ”€β”€ api/ # API routes
β”‚ β”‚ └── translate/ # Translation API
β”‚ β”œβ”€β”€ layout.tsx # Root layout
β”‚ β”œβ”€β”€ page.tsx # Home page
β”‚ └── globals.css # Global styles
β”œβ”€β”€ components/ # Reusable React components
β”‚ β”œβ”€β”€ Auth/ # Authentication components
β”‚ β”œβ”€β”€ Common/ # Common components
β”‚ β”œβ”€β”€ Landing/ # Landing page components
β”‚ β”œβ”€β”€ Notifications/ # Notification components
β”‚ β”œβ”€β”€ SellerAdmin/ # Seller Admin specific components
β”‚ β”œβ”€β”€ SupperAdmin/ # Super Admin components
β”‚ β”œβ”€β”€ Sidebar/ # Navigation sidebar
β”‚ β”œβ”€β”€ Shared/ # Shared UI components
β”‚ └── ui/ # Base UI components (Radix UI wrapped)
β”œβ”€β”€ context/ # React Context providers
β”‚ └── LanguageContext.tsx # Language/i18n context
β”œβ”€β”€ hooks/ # Custom React hooks
β”‚ β”œβ”€β”€ usePermission.ts # Role-based permission checks
β”‚ β”œβ”€β”€ useTranslate.ts # Translation hook
β”‚ β”œβ”€β”€ useUser.ts # User data hook
β”‚ β”œβ”€β”€ useLogout.ts # Logout functionality
β”‚ └── use-mobile.ts # Mobile detection
β”œβ”€β”€ lib/ # Utility functions & helpers
β”‚ β”œβ”€β”€ utils.ts # Common utilities
β”‚ β”œβ”€β”€ formDataValidation.ts # Form validation logic
β”‚ β”œβ”€β”€ exportUtils.ts # Export to PDF/Excel utilities
β”‚ └── redux/ # Redux store configuration
β”œβ”€β”€ public/ # Static assets
β”‚ β”œβ”€β”€ icons/
β”‚ β”œβ”€β”€ images/
β”‚ β”œβ”€β”€ drivers/
β”‚ └── sw.js # Service worker
β”œβ”€β”€ types/ # TypeScript type definitions
β”‚ β”œβ”€β”€ driver.ts
β”‚ β”œβ”€β”€ parcel.ts
β”‚ β”œβ”€β”€ seller.ts
β”‚ β”œβ”€β”€ notification.ts
β”‚ └── users.ts
β”œβ”€β”€ data/ # Mock/sample data
β”‚ β”œβ”€β”€ allParcelsData.ts
β”‚ β”œβ”€β”€ allDriversData.ts
β”‚ β”œβ”€β”€ allSellersData.ts
β”‚ └── statsData.ts
β”œβ”€β”€ HowToLiveMapTrack/ # Live tracking implementation
β”‚ β”œβ”€β”€ _ParcelMapLiveTracking.tsx
β”‚ β”œβ”€β”€ _TrackParcelModal.tsx
β”‚ └── _serverwebsocket.js
β”œβ”€β”€ next.config.ts # Next.js configuration
β”œβ”€β”€ tsconfig.json # TypeScript configuration
β”œβ”€β”€ tailwind.config.ts # Tailwind CSS configuration
└── package.json # Dependencies & scripts
```

## πŸ” Authentication & Authorization

The application supports:

- **Authentication Methods**: Email/Password with OTP verification
- **Authorization**: Role-based access control (RBAC) with routes
- **Super Admin**: Full system access, manage all entities
- **Seller Admin**: Manage own seller operations, drivers, and parcels
- **Customer**: Track parcels and view coverage

## πŸ—ΊοΈ Real-Time Features

### Live Parcel Tracking

- WebSocket connection for real-time parcel position updates
- Interactive maps using Leaflet/Google Maps
- Route visualization and ETA calculations

### WebSocket Server

- Located in `HowToLiveMapTrack/_serverwebsocket.js`
- Handles live location streaming for tracked parcels

## 🌐 Internationalization (i18n)

Multi-language support with:

- Language context management (`LanguageContext.tsx`)
- `useTranslate` hook for easy text translation
- API endpoint for dynamic translations (`/api/translate`)
- Persistent language preference

## πŸ“Š Dashboard Features

### Super Admin Dashboard

- System-wide analytics and statistics
- Seller management and performance metrics
- Driver management and assignment
- Parcel tracking and statistics
- Revenue and operational insights

### Seller Admin Dashboard

- Company-specific analytics
- Driver management
- Parcel management and tracking
- Performance metrics
- Customer communications

## πŸ“ Data Export

Export capabilities for:

- **PDF Reports**: Using jsPDF with formatted tables
- **Excel Files**: Using ExcelJS for complex spreadsheets
- Includes drivers, parcels, sellers, and custom analytics

## 🎨 UI/UX

- **Component Library**: Custom Radix UI wrapper components
- **Animations**: Framer Motion for smooth interactions
- **Icons**: Multiple icon libraries (Hugeicons, Tabler, Lucide)
- **Responsive**: Mobile-first responsive design
- **Dark Mode**: Full dark/light theme support with next-themes

## πŸ“± PWA Support

The application includes Progressive Web App features:

- Service Worker for offline functionality
- App manifest for installability
- Next PWA configuration for caching strategies
- Workbox for advanced cache management

## πŸ” Code Quality

- **Linting**: ESLint configuration for code standards
- **TypeScript**: Full type safety throughout the application
- **Validation**: Zod schema validation for forms and API responses

## πŸš€ Deployment

### Build for Production

```bash
npm run build
npm start
```

### Environment Configuration

Ensure all required environment variables are set in production:

```env
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=
NEXT_PUBLIC_APP_URL=
```

### Supported Platforms

- Vercel (recommended for Next.js)
- Docker containers
- Traditional Node.js hosting
- Static hosting with API proxy

## 🀝 Contributing

1. Create a feature branch (`git checkout -b feature/AmazingFeature`)
2. Commit changes (`git commit -m 'Add AmazingFeature'`)
3. Push to branch (`git push origin feature/AmazingFeature`)
4. Open a Pull Request

## πŸ“„ License

This project is proprietary and confidential. Unauthorized copying or distribution is prohibited.

## πŸ“ž Support

For issues, questions, or support:

- Create an issue in the repository
- Contact the development team
- Check documentation in project files

## πŸ”— Related Resources

- [Next.js Documentation](https://nextjs.org/docs)
- [React Documentation](https://react.dev)
- [Tailwind CSS](https://tailwindcss.com)
- [Radix UI](https://www.radix-ui.com)
- [Redux Toolkit](https://redux-toolkit.js.org)

---

**Version**: 1.0.0
**Last Updated**: January 2026
**Maintained By**: Track Fleet Pro Team