Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/judevector/e-commerce-api
This is an E-Commerce API built with nodejs, express and typescript with testing using supertest and metrics added into it
https://github.com/judevector/e-commerce-api
express jest mongodb nodejs rest-api supertest typescript zod
Last synced: 3 days ago
JSON representation
This is an E-Commerce API built with nodejs, express and typescript with testing using supertest and metrics added into it
- Host: GitHub
- URL: https://github.com/judevector/e-commerce-api
- Owner: judeVector
- Created: 2024-01-18T12:32:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-22T14:15:24.000Z (10 months ago)
- Last Synced: 2025-01-06T22:53:32.482Z (3 days ago)
- Topics: express, jest, mongodb, nodejs, rest-api, supertest, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 802 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# E-Commerce API
![E Commerce API](e-commerce-api.png)
## Overview
Welcome to **e-commerce-api**, a robust REST API developed with Node.js, TypeScript, Express, and MongoDB. This API empowers you to efficiently manage users, sessions, and products with ease.
## Features
- **User Management**
- Create a new user: `POST /api/users`
- Validate user input: `validate(createUserSchema)`
- **Session Management**
- Create a new session: `POST /api/sessions`
- Get user sessions: `GET /api/sessions` (requires user authentication)
- Delete a session: `DELETE /api/sessions` (requires user authentication)
- Validate session input: `validate(createSessionSchema)`
- **Product Management**
- Create a new product: `POST /api/products` (requires user authentication)
- Update a product: `PUT /api/products/:productId` (requires user authentication)
- Get a product by ID: `GET /api/products/:productId`
- Delete a product: `DELETE /api/products/:productId` (requires user authentication)
- Validate product input: `validate(createProductSchema)`, `validate(updateProductSchema)`, `validate(getProductSchema)`, `validate(deleteProductSchema)`## Getting Started
Follow these steps to get started with **E-Commerce API**:
1. Clone the repository: `git clone https://github.com/judevector/e-commerce-api.git`
2. Install dependencies: `yarn install`
3. Set up your MongoDB database and configure the connection in the project.
4. Run the API: `yarn dev`## Testing
Ensure the reliability of the API by running comprehensive tests:
1. Unit tests
2. Integration tests
3. End-to-end tests with Supertest