Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 3.09 KB

readme.en.md

File metadata and controls

112 lines (73 loc) · 3.09 KB

Gen Api 🪄🧶

License: MIT GitHub last commit pt_br

Tag this project with a star 🌟

Gen Api is a RestFul Api made using Node js, Express, Jest, Jwt, Swagger, Docker, and Prisma. The api aims to manage users and perform secure authentication.

🎉 Features

  • Automated tests with Jest
  • User registration
  • Documentation with Swagger
  • User authentication with JWT
  • User listing + Pagination
  • User update
  • User deletion
  • Data validation with Yup
  • Password encryption with Bcrypt
  • Postgres database with Prisma + Docker

💻 Technologies

  • Node Js (Runtime)
  • Express (Framework)
  • Prisma (ORM)
  • Swagger (Documentation)
  • Docker + Postgres (Database)
  • Jest (Testing)
  • JWT (Authentication)
  • Bcrypt (Encryption)
  • Yup (Data Validation)

📚 Project Structure

The project was structured following some architecture patterns for better organization and scalability.

src/
├── docs/
├── middlewares/
├── routes/
├── repositorys/
├── validations/
├── test/
├── utils/
├── index.js
.env
.docker-compose.yml
.jest.config.js
swagger.js
server.js

Screenshots

Automated tests with Jest

image

Documentation with Swagger

image

Data validation with Yup

image

User registration

image

User authentication with JWT

image

User listing + Pagination

image

☕ Installation

  • Clone the repository: git clone https://github.com/luiisp/gen-api

  • Navigate to the project directory: cd gen-api

  • Install dependencies: yarn install or npm install

  • Create a .env file and add the environment variables according to the .env.example file

  • Start the database with Docker: docker-compose up -d

  • Run the migrations: yarn prisma or npx prisma

  • Start the server: yarn dev or npm run dev

👁️‍🗨️ Tests

To run the tests, execute the command: yarn test or npm run test

📝 Documentation

To access the api documentation, access the endpoint: /docs

To generate documentation automatically with Swagger, execute the command: yarn docs or npm run docs

🧑‍💻 Author

Pedro Luis Dias (Luiisp) https://github.com/luiisp