https://github.com/letsdeepchat/codeoptim-assignment
https://github.com/letsdeepchat/codeoptim-assignment
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/letsdeepchat/codeoptim-assignment
- Owner: letsdeepchat
- Created: 2024-04-25T09:15:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T09:25:33.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T15:41:48.519Z (about 1 year ago)
- Language: JavaScript
- Size: 2.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeOptim Backend Assignment
Create an Application For E-commerce Platform.
Create an E-commerce Platform’s API Endpoints, which are mentioned below:
(MongoDB is preferable.)
• Register API for our customers. Store admin credentials using seeding or
migration.
• Login API for our customers.
• Create the crud APIs for the product.
• Create add-to-cart functionality with payment gateway integration(You can
create a Sandbox account for any service like Stripe or PayPal. Etc.,.
Requirements:
They can add products to the cart without login, but when they pay the
amount, they need to do login. (make this validation from the backend before payment.)
## Installation
1. Install dependencies:

## Usage
### Running the Server
To start the server, run the following command:
# npm start
### Running the Client
To run the client, use the following command:
# npm run dev
### Other Commands
To get node_modules
npm install
### Endpoints
#### User Signup
- **Method:** POST
- **URL:** http://localhost:4000/user/signup
- **Description:** Endpoint for user registration/signup.
#### User Login
- **Method:** GET
- **URL:** http://localhost:4000/user/login
- **Description:** Endpoint for user login.
#### Product and Category CRUD Operations
- **Method:** GET/POST/PUT/PATCH/DELETE
- **URL:** http://localhost:4000/user
- **Description:** Endpoint to perform CRUD operations for products or categories. Depending on the request type and parameters, you can create, retrieve, update, or delete products or categories.