Skip to content

anshul-maurya/FullStack_Cake_Order_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Cake Orders Management Backend

Welcome to the Cake Orders Management Backend repository! This backend code is designed to support a web application for managing cake orders. Below are the steps to run the project on your local machine and an overview of its functionalities.

Getting Started

To run this project on your local machine, follow these steps:

  1. Clone the repository to your local machine:

git clone https://github.com/your-username/cake-orders-management.git Navigate to the project directory:

bash Copy code cd cake-orders-management Install dependencies:

bash Copy code npm install Set up environment variables:

Create a .env file in the root directory.

Add the following variables:

plaintext Copy code PORT=3000 DB_URI=<your_database_uri> STRIPE_KEY=<your_stripe_key> CLIENT_URL=<your_client_url> Replace <your_database_uri> with the URI of your MongoDB database, <your_stripe_key> with your Stripe API key, and <your_client_url> with the URL of your client application.

Start the server:

bash Copy code npm start The server should now be running locally on port 3000.

Features Product Management: Create a New Product: Add a new product to the database. Retrieve All Products: Fetch all existing products from the database. Delete a Product: Remove a product from the database. Cart Management: Add a Product to the Cart: Add a product to the user's cart. Update Cart Item Quantity: Increase or decrease the quantity of a product in the cart. Retrieve All Cart Items: Get all items currently in the user's cart. Order Management: Create a Checkout Session: Generate a checkout session using Stripe for payment processing. Handle Checkout Session Completion: Handle the completion of a checkout session, updating order status and details. Retrieve All Orders: Fetch all orders placed by users. Update Order Status: Modify the status of an order, such as marking it as shipped or delivered. Note This backend code assumes the usage of Firebase Admin SDK for Firestore and Stripe for payment processing. Ensure that you have set up Firebase and Stripe accounts and configured them properly before running the project.

For any questions or issues, please contact the developer, Anshul Maurya.

Happy coding!