Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luc-ribeiro/gympass-solid-node
Aplicação para check-ins em academias. Aplicando conceitos de SOLID, Design Patterns, Docker, JWT e Refresh Token, RBAC e outros.
https://github.com/luc-ribeiro/gympass-solid-node
ci-cd docker fastify nodejs prisma typescript vitest zod
Last synced: about 1 month ago
JSON representation
Aplicação para check-ins em academias. Aplicando conceitos de SOLID, Design Patterns, Docker, JWT e Refresh Token, RBAC e outros.
- Host: GitHub
- URL: https://github.com/luc-ribeiro/gympass-solid-node
- Owner: luc-ribeiro
- Created: 2024-05-01T15:51:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-01T16:21:17.000Z (8 months ago)
- Last Synced: 2024-05-02T10:54:34.435Z (8 months ago)
- Topics: ci-cd, docker, fastify, nodejs, prisma, typescript, vitest, zod
- Language: TypeScript
- Homepage:
- Size: 114 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GymPass API SOLID Node.js
## 💻 Project
The project involves creating a REST API for gym check-ins, applying **SOLID and Design Patterns** concepts. It uses technologies like **Fastify, Prisma ORM, Vitest, and Docker**.
The goal is to practice creating APIs using these concepts and technologies, and also emphasize the importance of **building a well-structured and easily maintainable application**.## 🚀 Technologies
- **Node.js**
- **TypeScript**
- **Fastify**
- **Prisma ORM**
- **Docker**
- **Vitest**
- **CI/CD**
- **Zod**
- **PostgreSQL**## :pencil: Concepts
- **SOLID**
- **E2E and Unit Tests**
- **TDD**
- **Design Patterns**: Factory, Adapter, Repository
- **InMemoryTestDatabase**
- **RBAC**
- **Refresh Token**## :page_facing_up: How to Use
- Clone this repository:
```sh
$ git clone https://github.com/luc-ribeiro/gympass-solid-node.git
```- Install the dependencies:
```sh
# with npm
$ npm install# with yarn
$ yarn install
```- Create a ```.env``` file following the structure of ```.env.example```
- It's important that the Database URL is the same as in the ```docker-compose.yaml``` file, or vice versa
- Run Docker Compose to start the container with the Database:
```sh
$ docker compose up
```- Run the migrations:
```sh
# with npm
$ npx prisma db push# with yarn
$ yarn prisma db push
```- Run the project:
```sh
# with npm
$ npm run dev# with yarn
$ yarn dev
```- The project will run on `localhost:3333`
- To visualize the Database:
```sh
# with npm
$ npx prisma studio# with yarn
$ yarn prisma studio
```