REST API made with a Router-Controller-Service(Data Access) 3 layer architecture, which I personally am not completely following, but trying to... 😺😺😺
Credit to "REST API Design Best Practices Handbook", posted on freecodecamp, you may find the link below. https://www.freecodecamp.org/news/rest-api-design-best-practices-build-a-rest-api/
Since I couldn't find the author's github project link, I decided to create one, with:
- some unfinished code realised
- and swagger documentation code rewritten
- Database "clean", feel free to add your favorite database managment tools
- Filtering, Sorting, Pagination integrated (only for
Workout.js
) - Use data caching for performance improvements, with
apicache
,redis
is an alternative - API documentation with
Swagger
- Integrated API access logging middleware with
morgan
- Some other practices might be too specified, not included.
SwaggerUI documentation
for writting/v1/docs/
, quite time-consuming, I would even suggest you guys go try writting APIs withPython FastAPI
😓😓😓 https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md