- Introduction
- Features
- Technologies Used
- Getting Started
- Usage
- Project Structure
- Contributing
- License
This project is a web application designed to solve the common problem of fare exploitation in ride-sharing services like Uber and Ola. Often, drivers demand extra fare over the metered amount, claiming that they won't get a return fare from certain areas. This web application includes a unique feature for drivers: Order Density Calculation, which recommends drivers the nearest places where they are more likely to get rides. This helps drivers find passengers more efficiently and ensures fair pricing for customers.
- Customer Dashboard: Allows users to select their pickup and drop-off locations, calculate distances, and send location data.
- Driver Recommendations: Provides drivers with the best nearby areas to find passengers based on real-time order density calculations.
- Real-Time Updates: Ensures seamless communication and updates between customers and drivers through WebSockets.
- Fair Pricing: Helps to eliminate fare exploitation by ensuring that customers are charged a fair fare without any added charges.
Ensure you have the following installed on your machine:
-
Clone the repository:
git clone https://github.com/your-username/uber-like-taxi-service.git cd uber-like-taxi-service -
Install dependencies:
npm install
-
Set up environment variables by creating a
.envfile in the root directory:NEXT_PUBLIC_GOOGLE_API_KEY=your_google_api_key NEXTAUTH_URL=http://localhost:3000 DATABASE_URL=postgresql://user:password@localhost:5432/yourdatabase REDIS_URL=redis://localhost:6379
-
Start the PostgreSQL and Redis services using Docker:
docker-compose up -d
-
Migrate the database schema:
npx prisma migrate deploy
-
Start the development server:
npm run dev
- Navigate to
http://localhost:3000in your web browser. - Sign in using the login button on the home page.
- Use the customer dashboard to select your pickup and drop-off locations.
- The dashboard will show the nearest areas with high order density based on real-time data.
├── components
│ ├── CustomerDashboard.tsx
│ └── DriverDashboard.tsx
├── pages
│ ├── api
│ │ └── finddrivers.ts
│ ├── _app.tsx
│ ├── index.tsx
│ └── ...
├── public
│ └── ...
├── styles
│ └── globals.css
├── utils
│ └── ...
├── prisma
│ ├── schema.prisma
│ └── ...
├── docker-compose.yml
├── package.json
└── ...