This project is an online order management system designed to facilitate ordering and payment processes for customers at a Bowling Park. It allows customers to choose, order, and pay for items from a catalog of products, with options for individual or group payments. The system also provides management capabilities for catalog/order managers (agents) to add, update, and remove products from the catalog.
- Product Catalog Management: Agents can manage the product catalog by adding, updating, and removing products.
- Order Placement: Customers can select products from the catalog, place orders, and choose payment options.
- QR Code Integration: Each bowling alley has a unique QR code, which customers can scan to initiate orders and sessions.
- Payment Options: Customers can choose between different payment options, including individual, group, or specific amount payments.
- Concurrency Management: The system handles concurrency between payment sessions to prevent conflicts.
- Payment Gateway Integration: Integration with an external payment gateway (Stripe) for processing payments securely.
- Order Notifications: Notifications are sent to update customers on remaining amounts and payment statuses.
- Scalability: The system is designed to handle orders during peak times efficiently.
- Receipts and Invoices: Receipts and invoices are generated and sent to customers via email upon successful payment.
To run the application on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/msaber69/order-sharing-system.git cd order-sharing-system -
Install Dependencies:
npm install
-
Set Environment Variables:
- Create a
.envfile in the root directory. - Define environment variables such as database connection details, Stripe API key, and other configurations.
- Create a
-
Run the Application:
cd backend/src ts-node server.ts -
Access the Application: Open a web browser and navigate to
http://localhost:3000.
To test the implemented services using Postman, follow these steps:
-
Download Postman: If you haven't already, download and install Postman from the official website.
-
Import Postman Collection: Import the provided Postman collection file (/order-sharing-system/postman Project/Order-Sharing-System Collection.postman_collection.json) containing pre-configured requests to call the implemented services.
-
Configure Environment Variables: Set up environment variables in Postman for base URLs and other configurations needed to make requests.
-
Execute Requests: Run the requests in the Postman collection to test the functionality of the implemented services.
Below are some of the endpoints available in the application:
- GET /products: Get a list of all products in the catalog.
- POST /orders: Place a new order.
- GET /orders/:orderId: Get details of a specific order by order ID.
- POST /payments: Initiate a payment process for an order.
- POST /notifications: Receive notifications about order updates and payment statuses.
Refer to the provided Postman collection for more details on available endpoints and request payloads.
