@@ -27,26 +27,30 @@ go-gym-api/
2727│ ├── migrations # stored migration history
2828│ └── schema.prisma # Database tables schemas
2929├── src/
30+ │ ├── @types/ # Store globals interfaces on project
3031│ ├── env/
3132│ │ └── index.ts # Enviroment vars validation
3233│ ├── http/
3334│ │ ├── controllers/ # Handler of request response
34- │ │ └── routes.ts # application endpoints
35+ │ │ └── middlewares # Functions to interact between controllers and endpoints
3536│ ├── lib/
3637│ │ └── prisma.ts # Prisma client config
3738│ ├── repositories/ # Layer for database manipulation tools
3839│ │ ├── in-memory/
3940│ │ ├── prisma/
4041│ │ ├── check-ins-repository.ts # Check-ins Interface
42+ │ │ ├── gyms-repository.ts # Check-ins Interface
4143│ │ └── users-repository.ts # Users Interface
42- │ ├── use-cases/ # Use case layer for specific entities
43- │ │ ├── factories / # Use case factories for instances
44- │ │ └── errors / # Use case error messages
44+ │ ├── use-cases/ # Use cases layer for entities
45+ │ │ ├── errors / # Use case error messages
46+ │ │ └── factories / # Use case factories for instances
4547│ ├── utils/ # Application utility functions
48+ │ │ └── test/ # Utility functions for tests
4649│ ├── app.ts # Fastify app setup
4750│ └── server.ts # Server setup config
4851├── env.example # Enviroment variables example
4952├── .eslintrc.json # ESLint Config
53+ ├── .gitignore
5054├── .npmrc # NPM config libs control
5155├── docker-compose.yml
5256├── LICENSE
@@ -86,7 +90,8 @@ go-gym-api/
86905. ** Run tests** :
8791 ` ` ` bash
8892 docker compose up -d # Start the services
89- npm run test # Run the tests suit
93+ npm run test # Run the unit tests suits
94+ npm run test:e2e # Run the tests e2e suits
9095 npm run test:watch # Run the tests on watch mode
9196 npm run test:coverage # Verify the tests coverage (open index.html from dir coverage/)
9297 npm run test:ui # Execute the test client of vitest
@@ -96,6 +101,18 @@ go-gym-api/
96101# ## Users
97102- POST /users → Register new user.
98103- POST /sessions → Authenticate (login).
104+ - GET /me → Get logged user info.
105+
106+ # ## Gyms
107+ - POST /gyms → Create a new gym.
108+ - GET /gyms/search → Search gym by title.
109+ - GET /gyms/nearby → Search nearby user localization gyms.
110+
111+ # ## Check-ins
112+ - POST /gyms/:gymId/check-ins → Check-in.
113+ - PATCH /check-ins/:checkInId/validate → Gym validations check-in.
114+ - GET /check-ins/history → Get check-ins history.
115+ - GET /check-ins/metrics → Get check-ins count of logged user.
99116
100117# # 📄 License
101118This project is licensed under MIT [License](./LICENSE).
0 commit comments