This is an E-commerce API built with TypeScript
, Express
, Mongoose
, and Zod
for data validation. The API allows for managing products and orders, including creating, retrieving, updating, and deleting products, as well as creating and retrieving orders.
-
Product Management
- Create a new product
- Retrieve all products
- Retrieve a product by ID
- Update product information
- Delete a product
- Search products by term
-
Order Management
- Create a new order (with inventory update)
- Retrieve all orders
- Retrieve orders by user email
- Node.js (v14 or later)
- MongoDB
- ExpressJS
git clone https://github.com/antudaa/sale_stream_backend.git
cd sale_stream_backend
npm install
Create a .env
file in the root directory and add the following variables:
MONGO_URI=mongodb+srv://<admin>:<password>@cluster0.txtczm4.mongodb.net/<project-name>?retryWrites=true&w=majority&appName=Cluster0
PORT=5000
npm run start:dev
If you would like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch (git checkout -b feature-branch)
- Make your changes
- Commit your changes (git commit -m 'Add some feature')
- Push to the branch (git push origin feature-branch)
- Open a pull request