Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hebertzin/clean-ts-api
API in NodeJs using Typescript, TDD, Clean Architecture, Design Patterns and SOLID principles
https://github.com/hebertzin/clean-ts-api
crypto eslint express husky jwt mongodb nodejs prettier typescript zod
Last synced: 3 days ago
JSON representation
API in NodeJs using Typescript, TDD, Clean Architecture, Design Patterns and SOLID principles
- Host: GitHub
- URL: https://github.com/hebertzin/clean-ts-api
- Owner: hebertzin
- License: mit
- Created: 2023-08-25T22:26:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-07T14:45:10.000Z (about 1 month ago)
- Last Synced: 2024-10-12T05:07:26.535Z (about 1 month ago)
- Topics: crypto, eslint, express, husky, jwt, mongodb, nodejs, prettier, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 231 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Authentication service
Basic API with functionalities related to user authentication, token validation, and hash generation.
It's very simple, ideal for those just starting out in backend development.
you can check how the project is structured in `docs/structure.md`.## technologies used
- Node js
- Typescript
- Express
- Jwt
- Zod
- MongoDB
- Prettier
- Eslint
- Husky## Functionalities
- [x] Create a user.
- [x] Log the user in by generating an access token.
- [x] Validate if the token is valid
- [x] Check if the token is present in the request header
- [ ] It is possible log out## **Endpoints**
- **POST** `/api/v1/authentication/user/register`: Register a user
- **POST** `/api/v1/authentication/user/access-token` : Log in a user and generate a token access## How to run this project?
- First clone this repository `git clone https://github.com/hebertsanto/API-authentication.git`
- Navigate to the project and install dependencies with the `npm install` or `npm i` command
- Create a `.env` file and configure the environment variables correctly, you can check in `.env.exemple` which variables are necessary for the project.
- Everything configured? Now you can run the command `npm run start:dev` and that's it!## Deploy
The service is hosted on @render and will soon be integrated with a front end