This project is a basic implementation of a RESTful API using Node.js and TypeScript, following the SOLID principles, as taught in the SOLID Principles in a REST API with Node.js and TypeScript | Code/Drops #44 video by Rocketseat.
This API was developed to demonstrate the application of SOLID principles in the development of a REST API. The goal is to create more modular, maintainable, and extensible code, respecting good software architecture practices.
- User registration
- Node.js: A platform for running JavaScript on the server-side.
- TypeScript: A superset of JavaScript that adds static typing.
- Express: A minimalist web framework for Node.js.
- SOLID Principles: A set of principles for creating robust and maintainable software.
Below is a summary of the folder structure used in the project, organized to reflect SOLID principles:
.
βββ biome.json
βββ package.json
βββ src
β βββ app.ts
β βββ entities
β β βββ User.ts
β βββ providers
β β βββ IEmailProvider.ts
β β βββ implementations
β β βββ MailTrapMailProvider.ts
β βββ repositories
β β βββ implementations
β β β βββ PostgresUserRepository.ts
β β βββ IUserRepository.ts
β βββ routers.ts
β βββ server.ts
β βββ useCases
β βββ CreateUser
β βββ CreateUserController.ts
β βββ CreateUserUseCase.spec.ts
β βββ CreateUserUseCase.ts
β βββ ICreateUserDTO.ts
β βββ index.ts
βββ tsconfig.json
βββ yarn.lock