This project is a full-stack web application that allows users to order food online from a variety of cuisines and restaurants. The application is built using Angular for the frontend and Node.js for the backend, and uses MongoDB as the database. The application also integrates with PayPal for payment processing.
Users can create an account and log in securely using their email and password. The application uses JSON Web Tokens (JWT) for authentication and bcrypt for password hashing.
- List Foods: Users can browse through a list of foods, view details, and add items to their cart.
- Search Functionality: The application provides a robust search feature, allowing users to find specific foods quickly.
- Tags Bar: Users can explore foods based on tags, enhancing the browsing experience.
- Cart Page: Users can review and manage items in their cart before proceeding to checkout.
- Add to Cart Button: Each food item has an "Add to Cart" button for easy inclusion in the user's shopping cart.
- Checkout Page: Users can finalize their order, provide delivery details, and choose a payment method.
- Map Integration: The checkout page features an interactive map to input delivery locations accurately.
Users can pay for their order using PayPal, which is integrated with the application using the PayPal SDK. Users can also choose to save their payment information for future orders, or use a different card or account.
- The application is designed to be responsive, ensuring a seamless experience across various devices.
- Profile Customization: Users can now personalize their profile by changing their name and address. Additionally, password update feature has been implemented for enhanced security and user control.
- Order History: Users can track and review details of their past orders, including order status, items purchased, and total cost. This feature enhances user engagement by offering a convenient way to keep track of their food orders over time.
- Food Management Admins can add new food items, edit existing details, and remove items as needed. This ensures an up-to-date and curated food selection, allowing administrators to maintain a dynamic and appealing menu for users.
- User Management: Admins now have the ability to manage users. This includes viewing a list of users, editing user details, and blocking/unblocking user accounts. This feature ensures administrators have the necessary tools to maintain an organized user base and handle user-related tasks efficiently.
To run the application locally, follow these steps:
-
Clone the Repository:
git clone [repository-url]
-
Frontend Setup:
- Navigate to the
frontend
folder. - Install dependencies:
npm install
- Run the application:
npm start
- Navigate to the
-
Backend Setup:
- Navigate to the
backend
folder. - Install dependencies:
npm install
- Start the server:
npm start
- Navigate to the
-
Connect to MongoDB:
- Create a MongoDB Atlas account and update the connection details in the
.env
file.
- Create a MongoDB Atlas account and update the connection details in the
Things To Learn
-
Observables and RxJS:
- Use of Observables and the RxJS library for handling asynchronous operations and events.
-
BehaviorSubject:
- Use BehaviorSubject to create observable data streams that retain the latest value.
-
Interceptors:
- HTTP interceptors to intercept and modify HTTP requests and responses globally.
-
JWT (JSON Web Tokens):
- Understand the concept of JWT and how it is used for secure user authentication in web applications.
-
AuthGuard:
- Implement an Angular route guard to control access to certain routes based on user authentication status.