This project is an E-commerce REST API designed to handle various functionalities related to managing items, user authentication, and administrative tasks. The API provides endpoints for user actions, cart management, item operations, and more.
- User authentication (Signup, Login)
- User actions (Check email, Sign up, Login)
- Cart management (Add to cart, Remove from cart, View cart items)
- Item operations (Get all items, Search items)
- Admin functionalities (Add, Update, Remove items)
-
Clone the repository:
git clone <repository-url> cd ecommerce-rest-api
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file based on the provided.env.example
. - Configure your database connection details, JWT secret, and other necessary variables.
- Create a
-
Start the server:
npm start
The API endpoints can be accessed using tools like Swagger UI.
Ensure that you have obtained a bearer token by signing up or logging in before making authenticated requests.
API documentation is available using Swagger UI. Access the documentation at http://localhost:2020/docs when the server is running.
- Node.js
- Express
- MongoDB
- Swagger
- ...
Contributions are welcome! Please follow the contribution guidelines.
This project is licensed under the MIT License.