- rider.seeRidesRequest
- rider.acceptRide
- rider.declineRide
- rider.completeRide and send alert to RO and customer
- rider.viewMyCompleteRides
- ro.addRestaurant
- ro.addMeal
- ro.seeMyOrders
- RO.requestRide
- ro.viewPayments
- customer.viewMeals
- customer.makeOrder
- record meals in meal-order table (meal_id, order_id)
- record the price
- ride_id
- customer_id
- customer.makePayment
- customer.cancelOrder
- customer can cancel an order
- Status 'cancelled`
- customer.reviewOrder
- customer.reviewRider
- customer.viewpreviousOrders
- customer.depositWallet
The project aims to create a full-stack application for a food delivery service similar to Uber Eats. The frontend is developed using React.js, providing features for customers to browse meals, place orders, and view order history. The backend is built with Flask, SQLAlchemy, and Flask-Restful, handling user authentication, order processing, and restaurant management.
- Clone the repository to your local machine:
git clone <repository-url>
- Navigate to the project directory:
cd <project-directory>
- Install frontend dependencies:
npm install
- Install backend dependencies:
pip install -r requirements.txt
To run the application locally, follow these steps:
- Start the Flask backend server:
python app.py
- Start the React frontend server:
npm start
- Open your web browser and navigate to
http://localhost:3000
to access the application.
-
POST /api/auth/register
- Description: Register a new user.
- Request: JSON object containing user data (name, email, password)
- Response: Newly created user object
-
POST /api/auth/login
- Description: Authenticate user login.
- Request: JSON object containing user credentials (email, password)
- Response: JSON Web Token (JWT) for authenticated user
-
POST /api/restaurants
- Description: Add a new restaurant.
- Request: JSON object containing restaurant data (name, location)
- Response: Newly created restaurant object
-
GET /api/restaurants
- Description: Retrieve a list of all restaurants.
- Request: None
- Response: Array of restaurant objects
-
POST /api/meals
- Description: Add a new meal to a restaurant's menu.
- Request: JSON object containing meal data (name, price, description, image)
- Response: Newly created meal object
-
GET /api/meals
- Description: Retrieve a list of all available meals.
- Request: None
- Response: Array of meal objects
-
POST /api/orders
- Description: Place a new order.
- Request: JSON object containing order details (customer_id, meal_ids)
- Response: Newly created order object
-
GET /api/orders
- Description: Retrieve a list of all orders.
- Request: None
- Response: Array of order objects
As a rider, I can:
-
See Ride Requests
- Access a list of ride requests available for acceptance.
-
Accept Ride
- Accept a ride request from a customer.
-
Decline Ride
- Decline a ride request if unable to fulfill.
-
Complete Ride
- Mark a ride as completed and send an alert to the restaurant owner and customer.
-
View My Completed Rides
- Access a list of all completed rides I've conducted.
As a restaurant owner, I can:
-
Add Restaurant
- Create a new restaurant listing on the platform.
-
Add Meal
- Add new meal options to my restaurant's menu.
-
View My Orders
- Access a list of orders placed from my restaurant.
-
Request Ride
- Request a ride for meal delivery.
-
View Payments
- Review payment history for orders delivered from my restaurant.
As a customer, I can:
-
View Available Meals
- Browse through a list of meals available for order.
-
Make Order
- Place an order for selected meals, recording details such as meal selection, price, and delivery preferences.
-
Make Payment
- Complete payment for an order placed.
-
Cancel Order
- Cancel an order if necessary, updating the status accordingly.
-
Review Order
- Provide feedback and rating for an order received.
-
Review Rider
- Rate and provide feedback for the rider's service.
-
View Previous Orders
- Access a history of past orders placed.
-
Deposit to Wallet
- Add funds to the customer's wallet for easier and quicker payment processing.
Entities:
- User
- Rider
- Owner
- Customer
- Meal
- Restaurant
- Review
- Payment
- Order
Relationships:
- A User can be associated with one Rider, Owner, or Customer.
- A Rider, Owner, or Customer can have multiple Reviews.
- A Customer can place multiple Orders and make multiple Payments.
- An Order can consist of multiple Meals.
- A Restaurant can have multiple Meals and Reviews.
- A Review is associated with one Rider, Restaurant, and Customer.
- React.js
- React Router
- Axios
- HTML/CSS/JavaScript
If you'd like to contribute to the project, follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement
) - Make your changes
- Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/improvement
) - Create a new Pull Request
This project is licensed under the MIT License.