Bhaskar-Guthula-137/Fleetiva-Roadlines

Fleetiva Roadlines is a MERN-based transport and logistics platform for digital bilty (LR), load management, fleet operations, and freight workflows.

β˜… 0Forks 0GitHub β†—Compare

Project website β†—

README

🚚 Logistics & Transport Management System (SaaS)

πŸ“ Overview

In the traditional logistics sector, matching loads with available trucks is often a manual, fragmented process involving multiple middlemen. This Multi-Tenant SaaS platform digitizes the entire workflowβ€”from load posting and truck availability to smart matching, digital Bilty generation, and GST invoicing.

It provides a centralized ecosystem for Logistics Companies (Tenants) to manage their customers and drivers with complete data isolation.

🌟 Key Features

  • Multi-Tenant Architecture: Complete data isolation between different logistics companies (tenants).
  • Role-Based Access Control (RBAC): Dedicated dashboards for Admins, Drivers (Truck Owners), and Customers (Load Owners).
  • Smart Matching: Algorithm to match available trucks with loads based on capacity and vehicle type.
  • Secure Authentication: JWT-based auth with Access/Refresh token rotation and OTP verification via Twilio & Redis.
  • Password Recovery: OTP-based forgot password flow for secure account recovery.
  • Digital Documentation: Automated generation of 4-copy Bilty and GST Invoices in PDF format.
  • Real-time Status Tracking: Workflow management from 'Assigned' to 'In-Transit' and 'Delivered'.

πŸ› οΈ Tech Stack

Frontend:

  • React.js (Vite)
  • React Router (Routing)
  • Axios (API Calls with Interceptors)
  • CSS-in-JS (Modern, responsive UI)

Backend:

  • Node.js & Express.js
  • MongoDB & Mongoose (Database & Modeling)
  • Redis (OTP Storage & Rate Limiting)
  • Twilio (SMS Gateway)
  • PDFKit (Document Generation)

πŸš€ Getting Started

πŸš€ Quick Start (Beginner Friendly)

Follow these steps to run the project locally.

1. Clone the repository

git clone https://github.com/your-username/Fleetiva-Roadlines.git
cd Fleetiva-Roadlines

### Prerequisites

- Node.js (v18+)
- MongoDB (Local or Atlas)
- Redis Server (Running on port 6379)
- Twilio Account (for SMS features)

### Installation

1. **Clone the repository:**
   ```bash
   git clone https://github.com/your-username/logistics-transport-system.git
   cd logistics-transport-system

πŸ§ͺ Verifying the Setup

After starting both backend and frontend:

  • Open http://localhost:3000 in your browser
  • Ensure the frontend loads without errors
  • Check backend logs to confirm MongoDB is connected

If the application loads successfully, the setup is complete πŸŽ‰

  1. Backend Setup:

    cd backend
    npm install

    Create a .env file based on .env.example and fill in your credentials.

    Start the backend:

    npm run dev
  2. Frontend Setup:

    cd ../frontend
    npm install

    Start the frontend:

    npm run dev

πŸ—οΈ Project Structure

β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/ # Bug & Feature templates
β”‚   └── workflows/      # CI/CD Pipeline (GitHub Actions)
β”œβ”€β”€ CONTRIBUTING.md     # Open-source contribution guidelines
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/         # Service clients (Redis, Twilio)
β”‚   β”œβ”€β”€ middleware/     # Auth, Role, and Tenant scoping
β”‚   β”œβ”€β”€ models/         # Mongoose Schemas
β”‚   β”œβ”€β”€ routes/         # Modular API endpoints
β”‚   β”œβ”€β”€ utils/          # PDF Generation logic
β”‚   └── server.js       # Entry point
└── frontend/
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ api/        # Axios configuration
    β”‚   β”œβ”€β”€ components/ # Reusable UI components
    β”‚   β”œβ”€β”€ pages/      # Role-specific dashboards and forms
    β”‚   └── App.jsx     # Routing and Layout logic

πŸ“ API Documentation (Brief)

Method Endpoint Description
POST /api/auth/register Register new user/tenant & send OTP
POST /api/auth/verify-otp Verify OTP and create account
POST /api/auth/forgot-password Request password reset OTP
POST /api/auth/reset-password Reset password using OTP
GET /api/match/:loadId Find matching trucks for a load (Admin only)
GET /api/booking/:id/bilty Generate and download Bilty PDF

πŸ€– CI/CD

This project includes a GitHub Actions workflow for Continuous Integration. The pipeline automatically:

  • Performs security audits on backend dependencies.
  • Lints the codebase for consistency.
  • Verifies frontend builds.

Contributing

Contributions are welcome! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

πŸ“„ License

This project is licensed under the MIT License.

Contributors

sarojit049Aditya8369rajsingho3kishan-deshpande-24trahulprabhu38PrashantReddy456mdashad0snehasah1

Issues