A modern, full-featured SaaS platform designed to streamline fleet management, financial tracking, and logistics operations for trucking companies and owner-operators.
TruckFlow is a comprehensive trucking management platform that combines fleet management, dispatch operations, financial tracking, document management, and AI-powered recommendations into a single, unified solution. Built with modern web technologies, it provides real-time insights and automation tools to help trucking businesses improve efficiency, reduce costs, and make data-driven decisions.
- Role-based access control (Admin, Fleet Manager, Dispatcher, Driver)
- Secure authentication system
- User profile management
- Permission-based feature access
- Real-time business metrics and KPIs
- Interactive charts and data visualization
- Revenue, expense, and profit tracking
- Fleet performance analytics
- Custom reporting tools
- Comprehensive truck inventory management
- Driver assignment and tracking
- Maintenance scheduling and compliance
- Vehicle status monitoring (Active, Idle, In Repair)
- Fuel efficiency tracking
- Intelligent load assignment system
- Route optimization with AI recommendations
- Real-time shipment tracking
- ELD (Electronic Logging Device) compliance
- Driver communication tools
- Load profitability analysis
- Invoice generation and tracking
- Expense categorization and approval
- Tax reporting and compliance
- Profit/Loss analysis by load, truck, or driver
- Cash flow management
- Bank integration simulation
- Digital document storage and organization
- OCR processing for BOL and invoices
- Document approval workflows
- Searchable document library
- Automated document categorization
- Load optimization suggestions
- Route planning with efficiency scoring
- Driver performance analytics
- Predictive maintenance alerts
- Financial forecasting
- Fuel cost optimization
- Frontend: Next.js 14, React 18, TypeScript
- Styling: Tailwind CSS v4, shadcn/ui components
- Charts: Recharts for data visualization
- State Management: React hooks and context
- Authentication: Custom role-based auth system
- Icons: Lucide React
- Development: ESLint, TypeScript strict mode
- Node.js 18+
- npm or yarn package manager
-
Clone the repository ```bash git clone https://github.com/nrbnayon/truckflow.git cd truckflow ```
-
Install dependencies ```bash npm install
yarn install ```
-
Start the development server ```bash npm run dev
yarn dev ```
-
Open your browser Navigate to
http://localhost:3000
Use these demo accounts to explore different user roles:
| Role | Password | |
|---|---|---|
| Admin | admin@truckflow.com | admin123 |
| Fleet Manager | fleet@truckflow.com | fleet123 |
| Dispatcher | dispatch@truckflow.com | dispatch123 |
| Driver | driver@truckflow.com | driver123 |
- Full System Access: Complete control over all platform features
- User Management: Create, edit, and manage user accounts
- Fleet Management: Oversee entire fleet operations
- Financial Control: Access all financial data and reports
- System Settings: Configure platform settings and integrations
- Analytics: View comprehensive business analytics
- Fleet Oversight: Monitor truck status and maintenance
- Driver Management: Assign drivers and track performance
- Maintenance: Schedule and track vehicle maintenance
- Analytics: Access fleet performance reports
- Limited Financial: View fleet-related financial data
- Load Management: Create, assign, and track loads
- Route Planning: Optimize routes and manage schedules
- Driver Communication: Coordinate with drivers
- ELD Compliance: Monitor hours of service compliance
- Real-time Tracking: Track shipment status and locations
- Load Information: View assigned loads and routes
- Document Upload: Submit delivery receipts and BOLs
- Route Following: Access optimized route recommendations
- Profile Management: Update personal information and preferences
- Status Updates: Update load and delivery status
- Add/edit truck information
- Driver assignment and scheduling
- Maintenance tracking and alerts
- Vehicle performance monitoring
- Fuel efficiency analysis
- Load creation and assignment
- Route optimization
- Real-time tracking
- ELD compliance monitoring
- Driver communication
- Invoice management
- Expense tracking and categorization
- Tax reporting
- Profit/loss analysis
- Cash flow monitoring
- Document upload and storage
- OCR text extraction
- Approval workflows
- Search and filtering
- Document categorization
- Load profitability scoring
- Route optimization suggestions
- Driver performance insights
- Predictive maintenance
- Financial forecasting
Create a .env.local file in the root directory:
```env
DATABASE_URL=your_database_url
NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000
OPENAI_API_KEY=your_openai_key
AWS_ACCESS_KEY_ID=your_aws_key AWS_SECRET_ACCESS_KEY=your_aws_secret AWS_REGION=your_aws_region ```
| Feature | Admin | Fleet Manager | Dispatcher | Driver |
|---|---|---|---|---|
| Dashboard Overview | β | β | β | β |
| Fleet Management | β | β | β | β |
| User Management | β | β | β | β |
| Financial Tracking | β | π | β | β |
| Dispatch Management | β | β | β | β |
| Load Management | β | β | β | π± |
| Document Management | β | β | β | π± |
| AI Recommendations | β | β | β | π± |
| Analytics & Reports | β | β | π | β |
| Settings | β | β | β | β |
Legend: β Full Access | π Limited Access | π± Mobile/Basic Access | β No Access
-
Connect to Vercel ```bash npm i -g vercel vercel ```
-
Configure Environment Variables Add your environment variables in the Vercel dashboard
-
Deploy ```bash vercel --prod ```
-
Build the image ```bash docker build -t truckflow . ```
-
Run the container ```bash docker run -p 3000:3000 truckflow ```
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
```typescript POST /api/auth/login POST /api/auth/logout GET /api/auth/user ```
```typescript GET /api/fleet/trucks POST /api/fleet/trucks PUT /api/fleet/trucks/:id DELETE /api/fleet/trucks/:id ```
```typescript GET /api/loads POST /api/loads PUT /api/loads/:id DELETE /api/loads/:id ```
- Role-based access control (RBAC)
- Secure authentication system
- Data encryption in transit
- Input validation and sanitization
- CSRF protection
- Rate limiting
- Server-side rendering with Next.js
- Optimized bundle size
- Lazy loading of components
- Image optimization
- Caching strategies
Login Issues
- Verify demo account credentials
- Check browser console for errors
- Clear browser cache and cookies
Performance Issues
- Ensure Node.js 18+ is installed
- Check network connectivity
- Monitor browser developer tools
Display Issues
- Verify Tailwind CSS is loading
- Check for JavaScript errors
- Test in different browsers
For support and questions:
- π§ Email: support@truckflow.com
- π Documentation: docs.truckflow.com
- π Issues: GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
TruckFlow - Streamlining trucking operations with modern technology πβ¨