Price Pilot is a modern web application that helps users make informed decisions about their rides by comparing prices across multiple ride-hailing services in real-time. Built with React, TypeScript, and Google Maps integration, it provides a seamless experience for finding the best ride prices.
- Real-time Price Comparison: Compare prices across Uber, Ola, and Rapido
- Interactive Map Interface: Powered by Google Maps API
- Smart Location Input: Address autocomplete and current location detection
- Surge Price Detection: Real-time surge pricing information
- Route Visualization: View routes with distance and ETA
- One-Click Booking: Direct redirection to service providers
- Responsive Design: Works seamlessly across all devices
- Framework: React 18 with TypeScript
- Styling: Tailwind CSS with custom animations
- State Management: React Context API
- Maps: Google Maps JavaScript API & Places API
- Build Tool: Vite
- Maps & Geocoding: Google Maps Platform
- Ride Services:
- Uber Rides API
- Ola API
- Language: TypeScript 5.0+
- Linting: ESLint with TypeScript support
- Formatting: Prettier
- Testing: Jest & React Testing Library
- API Testing: Postman collections included
Before setting up Price Pilot, ensure you have:
- Node.js (v16.0.0 or higher)
- npm or yarn package manager
- Google Maps API key with following APIs enabled:
- Maps JavaScript API
- Places API
- Directions API
- Geocoding API
-
Clone the repository
git clone https://github.com/yourusername/price-pilot.git cd price-pilot -
Install dependencies
npm install # or yarn install -
Configure environment variables Create a
.envfile in the root directory:VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key VITE_UBER_CLIENT_ID=your_uber_client_id VITE_OLA_API_KEY=your_ola_api_key
-
Start development server
npm run dev # or yarn dev -
Build for production
npm run build # or yarn build
price-pilot/
├── src/
│ ├── components/ # React components
│ │ ├── Map/ # Map related components
│ │ ├── Search/ # Search & autocomplete
│ │ └── UI/ # Common UI components
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API integration services
│ ├── utils/ # Helper functions
│ ├── types/ # TypeScript definitions
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
├── public/ # Static assets
├── tests/ # Test files
└── docs/ # Additional documentation
- Create a project in Google Cloud Console
- Enable required APIs (Maps JavaScript, Places, Directions)
- Create API credentials
- Add restrictions to API key
- Update
.envfile with your key
Configure each ride service API in the .env file. Refer to their respective documentation:
Run tests using:
npm run test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report-
Build the project
npm run build
-
Deploy the
distfolder to your hosting service- Recommended: Vercel, Netlify, or GitHub Pages
- Enable environment variables in your hosting platform
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Maps Platform for mapping services
- All ride-hailing services for their APIs
- The open-source community for inspiration and tools
For support, email support@pricepilot.com or join our Discord community.
