A full-stack application for truck drivers to plan trips, track Hours of Service (HOS), and generate compliant Electronic Logging Device (ELD) logbook sheets. The system calculates optimal routes with required rest stops and automatically generates daily log sheets according to FMCSA regulations.
Demo is available at https://driver-x.vercel.app/ API Documentation is available at https://driver-x.onrender.com/api/docs
Driver Tracker helps property-carrying drivers comply with Hours of Service regulations by:
- Calculating optimal routes with required rest and fuel stops
- Tracking driver activities in a linear timeline
- Auto-generating compliant daily log sheets
- Visualizing routes on an interactive map
- Backend: Django REST Framework (Python)
- Frontend: Next.js 16 (React 19)
- Package Managers:
- Backend:
uv(Python) - Frontend:
pnpm(Node.js)
- Backend:
- Trip Planning: Input trip details (current location, pickup, dropoff, cycle hours used)
- Route Calculation: Automatic calculation of routes with waypoints and required stops
- HOS Compliance: Enforces 70-hour/8-day cycle limits with automatic break calculations
- Activity Timeline: Linear time-based activity tracking (off-duty, sleeper berth, driving, on-duty not driving)
- Logbook Generation: Auto-generates FMCSA-compliant daily log sheets with proper formatting
- Route Visualization: Interactive map showing route, stops, and activity markers
- Python 3.13+
- Node.js 18+
- uv package manager (for Python)
- pnpm or npm (for Node.js)
Run the setup script to install all dependencies:
chmod +x setup.sh
./setup.shOr manually:
# Install root dependencies
npm install
# Setup server
cd server
uv sync
uv run python manage.py migrate
# Setup client
cd ../client
pnpm installStart both server and client concurrently:
npm run devThis starts:
- API Server: http://127.0.0.1:8000/
- Frontend: http://localhost:3000
# Run server only
npm run dev:server
# Run client only
npm run dev:client
# Build for production
npm run build
# Run migrations
npm run migrate
# Create migrations
npm run makemigrationsdriver-tracker/
├── client/ # Next.js frontend application
│ ├── src/
│ │ ├── app/ # Next.js app router pages
│ │ ├── components/ # React components
│ │ ├── features/ # Feature modules (auth, trips)
│ │ └── lib/ # Utilities and API client
│ └── package.json
├── server/ # Django backend application
│ ├── api/ # Main API app
│ │ ├── models.py # Data models
│ │ ├── views/ # API views
│ │ └── services/ # Business logic (HOS validation, route calculation)
│ ├── server/ # Django project settings
│ └── pyproject.toml
├── docs/ # Project documentation
│ ├── software-specs/ # Technical specifications
│ └── resources/ # Reference materials
└── package.json # Root package with concurrent scripts
- 70-hour/8-day cycle limit
- 11-hour driving limit per shift
- 14-hour on-duty window
- 30-minute break required after 8 hours of driving
- Fueling at least once every 1,000 miles
- 1 hour for pickup and drop-off activities
- No adverse driving conditions
GET /api/health/- Health checkGET /api/hello/- API status
POST /api/auth/register/- User registrationPOST /api/auth/login/- User loginPOST /api/auth/refresh/- Refresh access token
GET /api/trips/- List tripsPOST /api/trips/- Create new tripGET /api/trips/:id/- Get trip detailsGET /api/trips/:id/logs/- Get daily logs for trip
See server/README.md for detailed API documentation.
cd server
# Run development server
uv run python manage.py runserver
# or
uv run dev
# Create migrations
uv run python manage.py makemigrations
# or
uv run makemigrations
# Apply migrations
uv run python manage.py migrate
# or
uv run migrate
# Create superuser
uv run python manage.py createsuperuser
# or
uv run python tasks.py superusercd client
# Run development server
pnpm dev
# Build for production
pnpm build
# Run production server
pnpm start
# Lint
pnpm lint- We are using Render for the server and Vercel for the client.
- We are using Docker Compose for the deployment ( used on Render).
- Client
- API Documentation
- Software Specifications
- Data Models
- HOS Rules
- Logbook Generation
- Map Integration
- Timeline Input Flow
Private project