Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 18.x or higher (tested with v24.13.1)
npm or bun
npm comes with Node.js, or install bun for faster builds
Git
For cloning the repository
Supabase Account
Free account at supabase.com
Quick Start
Clone the Repository
Clone the project repository to your local machine:Replace
<YOUR_GIT_URL> with your actual repository URL.Install Dependencies
Install all required npm packages:
The project uses modern dependencies including React, TypeScript, Supabase, Tailwind CSS, shadcn-ui, and Tanstack React Query.
Configure Environment Variables
Set up your Supabase credentials. The project uses Supabase for:
- Authentication (email/password)
- Database (PostgreSQL)
- Row Level Security (RLS)
- Real-time subscriptions
Start Development Server
Launch the development server with hot module replacement:The application will start on:
- URL:
http://localhost:8080 - Host:
::(listens on all interfaces)
Verify Installation
Open your browser and navigate to
http://localhost:8080. You should see the login page.If this is a fresh Supabase project, you’ll need to apply database migrations. See Database Migrations.
Available Scripts
The project includes several npm scripts for development and deployment:Tech Stack
The Transport Logistics platform is built with modern web technologies:Vite
Lightning-fast build tool and dev server
React 18
UI library with hooks and concurrent features
TypeScript
Type-safe JavaScript for better DX
Supabase
Backend-as-a-Service with PostgreSQL
Tailwind CSS
Utility-first CSS framework
shadcn-ui
Beautiful, accessible UI components
Tanstack Query
Powerful data fetching and caching
React Router
Client-side routing
Zod
TypeScript-first schema validation
Development Workflow
Hot Module Replacement (HMR)
The development server uses Vite’s HMR for instant updates:- Component changes reflect immediately
- State is preserved across updates
- CSS changes apply without refresh
TypeScript Integration
The project uses TypeScript with strict mode:- Full type safety across the codebase
- Auto-generated types from Supabase schema
- Path aliases (
@/maps tosrc/)
Supabase Integration
Supabase provides the entire backend:- Authentication: Email/password with JWT tokens
- Database: PostgreSQL with Row Level Security
- Real-time: Live updates for shipments and vehicles
- Storage: For documents and attachments
Troubleshooting
Port 8080 already in use
Port 8080 already in use
If port 8080 is occupied, you can change it in
vite.config.ts:Module resolution errors
Module resolution errors
If you see import errors, ensure path aliases are configured correctly:
- Check
tsconfig.jsonincludes thepathsconfiguration - Verify
vite.config.tshas the@alias setup - Run
npm installto refresh dependencies
Supabase connection issues
Supabase connection issues
If you can’t connect to Supabase:
- Verify your Supabase project is active
- Check the URL and anon key in
src/integrations/supabase/client.ts - Ensure your IP isn’t blocked in Supabase dashboard
- Check that RLS policies are properly configured
Build errors
Build errors
Common build issues:
- TypeScript errors: Run
npm run lintto identify issues - Missing dependencies: Run
npm installagain - Cache issues: Delete
node_modulesanddist/, then reinstall
Next Steps
Environment Variables
Configure Supabase and other environment settings
Database Migrations
Learn how to manage database schema changes
Database Schema
Explore the database structure and types
Deployment Guide
Learn how to deploy the application