CargoConnect is a modern, responsive web application built with React and TypeScript that revolutionizes cargo transportation across India. Our platform offers seamless booking experiences with real-time pricing, multiple vehicle options, and comprehensive logistics solutions.
- Multi-step Booking Flow - Intuitive booking process with location selection, vehicle choice, and payment
- Real-time Pricing - Dynamic fare calculation based on distance and vehicle type
- Vehicle Selection - Multiple vehicle categories (Mini Truck, Cargo Truck, Tempo) with detailed specifications
- Location Services - State and district-based location selection across India
- Payment Integration - Multiple payment methods (UPI, Net Banking, Cash on Delivery)
- PDF Receipt Generation - Download booking receipts after payment
- Automated Email System - Newsletter subscriptions and contact form emails
- 24/7 Email Notifications - Works automatically via Vercel Serverless Functions (no server needed!)
- Dark/Light Mode - Toggle between themes with persistent preference
- Responsive Design - Optimized for mobile, tablet, and desktop
- Smooth Animations - Polished micro-interactions and transitions
- Back to Top Button - Easy navigation on long pages
| Category | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite |
| Styling | Tailwind CSS |
| Routing | React Router v6 |
| Icons | Lucide React |
| jsPDF | |
| Nodemailer (via Vercel Serverless Functions) | |
| Deployment | Vercel |
- Node.js v16+ and npm
- Gmail account with App Password (for email features)
# Clone repository
git clone https://github.com/KGFCH2/CargoConnect.git
cd CargoConnect
# Install dependencies
npm installOption A: Frontend Only (No Email Features)
npm run dev
# Open http://localhost:5173Option B: Full Stack (With Email Features)
# Create .env file
cp .env.example .env
# Edit .env with your Gmail credentials
# Terminal 1: Start backend
npm run server
# Terminal 2: Start frontend
npm run devCargoConnect/
├── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Full page components
│ ├── context/ # React Context providers
│ ├── data/ # Static data (vehicles, states)
│ ├── types/ # TypeScript definitions
│ ├── App.tsx # Main app with routes
│ └── main.tsx # Entry point
│
├── api/ # Vercel Serverless Functions
│ ├── subscribe.js # Newsletter endpoint
│ ├── contact.js # Contact form endpoint
│ └── package.json # Dependencies for functions
│
├── server.js # Express server (local dev only)
├── vercel.json # Vercel configuration
└── .env.example # Environment template
-
Push to GitHub
git push origin main
-
Deploy on Vercel
- Go to vercel.com
- Import your GitHub repository
- Click "Deploy"
-
Add Environment Variables (in Vercel Dashboard > Settings > Environment Variables)
Variable Value EMAIL_USERyour-gmail@gmail.com EMAIL_PASSWORDyour-16-char-app-password -
Redeploy to apply environment variables
- Emails work 24/7 (no server to maintain)
- Auto-scales for traffic
- Free tier available
- Automatic HTTPS
- Enable 2-Step Verification at myaccount.google.com/security
- Go to "App passwords"
- Generate new password for "Mail"
- Copy the 16-character password (ignore spaces)
For Local Development (.env file):
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
PORT=3001
# Leave VITE_API_URL commented out for production builds
# VITE_API_URL=http://localhost:3001For Vercel (Dashboard > Settings > Environment Variables):
EMAIL_USER= your-email@gmail.comEMAIL_PASSWORD= your-app-password- Do NOT set
VITE_API_URL
| File | Description |
|---|---|
| INSTRUCTIONS.md | Complete development guide |
| VERCEL_QUICK_DEPLOY.md | 5-minute deploy guide |
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m "Add amazing feature" - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Babin Bid
- Email: babinbid05@gmail.com
- LinkedIn: Babin Bid
- GitHub: @KGFCH2
This project is open source and available under the MIT License.