A scalable, production-ready price comparison platform built with Next.js and Express. Compare prices across multiple platforms for cabs, food delivery, hotels, and travel tickets.
- Cab Price Comparison: Compare prices from Ola, Uber, and Rapido
- Food Delivery Comparison: Compare prices from Zomato and Swiggy
- Hotel Price Comparison: Compare prices across multiple booking platforms
- Travel Ticket Comparison: Compare bus and flight prices from various providers
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Language: TypeScript
- HTTP Client: Axios
- Framework: Express.js
- Language: Node.js
- Architecture: RESTful API
Super/
βββ backend/ # Express backend (Node.js)
β βββ package.json # Backend-only scripts and deps
β βββ controllers/
β βββ routes/
β βββ services/
β βββ server.js
β
βββ frontend/ # Next.js 14 (App Router) frontend
β βββ package.json # Frontend-only scripts and deps
β βββ next.config.js
β βββ tailwind.config.js
β βββ postcss.config.js
β βββ tsconfig.json
β βββ src/
β βββ app/
β β βββ compare/
β β β βββ cab/
β β β βββ food/
β β β βββ hotel/
β β β βββ travel/
β β βββ layout.tsx
β β βββ page.tsx
β β βββ globals.css
β βββ components/
β β βββ home/
β β βββ layout/
β βββ lib/
β βββ api/
β βββ utils/
β
βββ package.json # Root npm workspaces
βββ README.md
βββ QUICKSTART.md
- Node.js 18+ installed
- npm or yarn package manager
-
Clone the repository (or navigate to the project directory):
cd "c:\Users\risha\Desktop\Super"
-
Install workspace dependencies:
npm install
-
Set up environment variables:
Copy-Item .env.example .env
Edit
.envand configure your settings.
-
Backend API
npm run dev:backend
Runs on http://localhost:5000
-
Frontend Web
npm run dev:frontend
Runs on http://localhost:3000
-
Build frontend
npm run build
-
Start backend
npm run server
-
Start frontend (production)
npm run start
POST /api/cab/compare- Compare cab pricesGET /api/cab/providers- Get available cab providers
POST /api/food/compare- Compare food delivery pricesGET /api/food/providers- Get available food delivery providers
POST /api/hotel/compare- Compare hotel pricesGET /api/hotel/providers- Get available hotel booking providers
POST /api/travel/compare/bus- Compare bus ticket pricesPOST /api/travel/compare/flight- Compare flight ticket pricesGET /api/travel/providers- Get available travel booking providers
Currently, the application uses mock data. To integrate real APIs:
-
Add API keys to
.env:OLA_API_KEY=your_key_here UBER_API_KEY=your_key_here # ... etc
-
Update controllers in
backend/controllers/:- Replace mock data with actual API calls
- Use the
comparisonServiceto analyze real data - Handle API errors appropriately
-
Example integration:
// In cabController.js const olaData = await fetch(`${OLA_API_URL}/estimate`, { headers: { Authorization: `Bearer ${process.env.OLA_API_KEY}` }, });
- Modify
tailwind.config.jsfor theme customization - Update colors in the
theme.extend.colorssection - Edit
src/app/globals.cssfor global styles
- Create new controller in
backend/controllers/ - Create new route in
backend/routes/ - Add route to
backend/server.js - Create API service in
src/lib/api/ - Create UI page in
src/app/compare/ - Add card to
src/components/home/ComparisonCards.tsx
- API keys should never be exposed to the frontend
- All API calls should be proxied through the backend
- Implement rate limiting on API endpoints
- Add authentication for user-specific features
- Sanitize all user inputs
- Use HTTPS in production
- Push code to GitHub
- Connect repository to Vercel
- Configure environment variables
- Deploy
- Choose a hosting provider
- Configure environment variables
- Set start command:
node backend/server.js - Deploy
- User authentication and saved searches
- Price history tracking
- Email/SMS price alerts
- Affiliate program integration
- Mobile app (React Native)
- Advanced filters and sorting
- Cashback and rewards integration
- Multi-language support
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.
Built with β€οΈ by Super Comparison Team
For support, email support@supercomparison.com or open an issue on GitHub.
Note: This project currently uses mock data for demonstration purposes. Integrate real APIs from service providers to enable actual price comparison functionality.