A modern, responsive courier tracking and booking website built with Next.js 15 and JavaScript.
- π₯ Video Hero Section - Stunning autoplay background video on homepage
- π¦ Real-Time Tracking - Track shipments from Delhivery and other couriers
- π° Price Calculator - Instant shipping cost and transit time estimates
- π§ Contact Form - Direct communication with support team
- π¨ Custom Theme - Professional blue and orange color scheme
- π± Fully Responsive - Mobile-first design that works on all devices
- β‘ Fast Performance - Optimized with Next.js 15 App Router
- Framework: Next.js 15 (App Router)
- Language: JavaScript
- Styling: Tailwind CSS
- Database: PostgreSQL with Prisma ORM
- Icons: Lucide React
- Notifications: React Hot Toast
- API Integration: Delhivery Tracking API
- Primary Blue:
#1E40AF - Accent Orange:
#F97316 - Light Blue:
#3B82F6 - Background:
#F9FAFB - Success Green:
#10B981 - Warning Orange:
#FBBF24 - Error Red:
#EF4444
- Node.js 18+ installed
- PostgreSQL database
- Delhivery API token (optional - mock data available)
-
Clone or navigate to the project directory
-
Install dependencies:
npm install- Set up environment variables:
Create a .env file in the root directory:
DATABASE_URL="postgresql://user:password@localhost:5432/infini_couriers?schema=public"
DELHIVERY_API_TOKEN="your_delhivery_api_token_here"
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Set up the database:
npx prisma generate
npx prisma db push- Add the hero video:
Place your hero-delivery.mp4 video file in:
public/videos/hero-delivery.mp4
Note: Create the
public/videos/directory if it doesn't exist. The video should be optimized for web (H.264 codec recommended).
- Run the development server:
npm run devOpen http://localhost:3000 in your browser.
InfiniCouriers/
βββ app/
β βββ api/
β β βββ track/route.js # Tracking API endpoint
β β βββ calculate/route.js # Price calculator API
β β βββ contact/route.js # Contact form API
β βββ track/page.jsx # Tracking page
β βββ calculate/page.jsx # Calculator page
β βββ contact/page.jsx # Contact page
β βββ layout.jsx # Root layout
β βββ page.jsx # Homepage
β βββ globals.css # Global styles
βββ lib/
β βββ prisma.js # Prisma client
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/
β βββ videos/
β βββ hero-delivery.mp4 # Hero video (you provide this)
βββ .env # Environment variables
βββ .env.example # Environment template
βββ next.config.js # Next.js configuration
βββ tailwind.config.js # Tailwind configuration
βββ postcss.config.mjs # PostCSS configuration
βββ package.json
- Stores tracking queries and API responses
- Caches results for 5 minutes
- Stores contact form submissions
- Includes name, email, phone, service type, and message
- Logs price calculations for analytics
- Stores origin, destination, weight, and calculated price
Track a shipment by tracking number.
Request Body:
{
"trackingNumber": "DH12345678",
"courier": "Delhivery"
}Calculate shipping cost and transit time.
Request Body:
{
"originPincode": "400001",
"destinationPincode": "110001",
"weight": "2.5",
"length": "30",
"width": "20",
"height": "15",
"serviceType": "Standard"
}Submit contact form.
Request Body:
{
"name": "John Doe",
"email": "john@example.com",
"phone": "+91 98765 43210",
"serviceType": "General Query",
"message": "Your message here"
}The hero video should be placed at:
- Path:
public/videos/hero-delivery.mp4 - Recommended specs:
- Format: MP4 (H.264 codec)
- Resolution: 1920x1080 or higher
- Duration: 10-30 seconds (loops automatically)
- Size: Optimized for web (under 10MB recommended)
Add your Delhivery API token in the .env file:
DELHIVERY_API_TOKEN="your_token_here"If no token is provided, the app will use mock data for development.
Update contact details in /app/contact/page.jsx:
- Email: Line 107
- Phone: Line 121
- Address: Lines 136-139
npm run build
npm start- Full-screen video hero with overlay
- Company branding and tagline
- Two feature cards (Track & Calculate)
- Sticky contact button (bottom-right)
- Input tracking number and select courier
- Real-time API integration with Delhivery
- Timeline view of shipment history
- Status badges with color coding
- Origin/destination display
- Pincode-based calculation
- Weight and dimension inputs
- Service type selection (Express/Standard/Economy)
- Volumetric weight calculation
- Transit time estimation
- Price breakdown (base rate + fuel + GST)
- Contact information cards
- Form with validation
- Service type dropdown
- Database storage of submissions
This project is private and proprietary.
For support or questions:
- Email: support@infinicouriers.com
- Phone: +91-1800-123-4567