https://github.com/eduardofranca1/typescript-api
This project was created using TypeScript, SOLID principles, and Design Patterns
https://github.com/eduardofranca1/typescript-api
dependency-injection design-patterns express factory-method integration-test jest mongodb nodejs solid supertest typescript unit-test zod
Last synced: 4 months ago
JSON representation
This project was created using TypeScript, SOLID principles, and Design Patterns
- Host: GitHub
- URL: https://github.com/eduardofranca1/typescript-api
- Owner: eduardofranca1
- Created: 2025-02-06T12:43:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-22T12:34:43.000Z (8 months ago)
- Last Synced: 2025-06-26T23:58:39.782Z (6 months ago)
- Topics: dependency-injection, design-patterns, express, factory-method, integration-test, jest, mongodb, nodejs, solid, supertest, typescript, unit-test, zod
- Language: TypeScript
- Homepage:
- Size: 628 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TypeScript API
This project was created using TypeScript, SOLID principles, and Design Patterns.
**The focus of this project is to show how to implement the SOLID principles and Design Patterns (Dependency Injection and Factory Method).**
### Technologies:
- [NodeJS](https://nodejs.org/en/)
- [TypeScript](https://www.typescriptlang.org/)
- [Express](https://expressjs.com/pt-br/)
- [Jest](https://jestjs.io/)
- [MongoDB](https://www.mongodb.com/)
- [Zod](https://zod.dev/)
### Topics
- SOLID
### Design Patterns
- Dependecy Injection
- Factory Method
### Features
- CRUD User
- Data Validation using [Zod](https://zod.dev/)
- Tests
### How to run the project
- **npm install** (to install node modules)
- **npm run dev** (to start the server)
- **npm run build** (to build the project)
- **npm run test** (to run the tests)
# Routes
Here are the routes that have already been created:
### Users
| `/users` | | | |
| ---------- | ---------------------------- | --------------------- | --- |
| **Method** | **Route** | **Description** |
| POST | `/users` | create a new user |
| GET | `/users/:id` | get one user by id |
| GET | `/users` | get all users |
| PUT | `/users/:id` | update one user |
| PUT | `/users/update-password/:id` | update user password |
| DELETE | `/users/:id` | delete one user by id |