{"id":18772893,"url":"https://github.com/jcalopes/workouts-service","last_synced_at":"2026-05-03T01:38:04.096Z","repository":{"id":256661272,"uuid":"856053369","full_name":"jcalopes/workouts-service","owner":"jcalopes","description":"Workout service provides an api to manage workout sessions built using Node js + Express js.","archived":false,"fork":false,"pushed_at":"2024-12-21T11:09:13.000Z","size":474,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-21T11:27:49.227Z","etag":null,"topics":["backend","expressjs","inversify","ioc-container","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcalopes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T22:54:28.000Z","updated_at":"2024-12-21T11:09:17.000Z","dependencies_parsed_at":"2024-10-20T05:02:49.320Z","dependency_job_id":"fd23534b-b4ef-4655-b092-e672a5aca987","html_url":"https://github.com/jcalopes/workouts-service","commit_stats":null,"previous_names":["jcalopes/workouts-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fworkouts-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fworkouts-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fworkouts-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcalopes%2Fworkouts-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcalopes","download_url":"https://codeload.github.com/jcalopes/workouts-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231714881,"owners_count":18415468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","expressjs","inversify","ioc-container","nodejs"],"created_at":"2024-11-07T19:31:32.704Z","updated_at":"2025-10-06T09:53:02.859Z","avatar_url":"https://github.com/jcalopes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workouts API\n\nThis service is responsible for managing workouts data.\n\n## Tech Stack\n\nThis API was built using Express JS web framework for Node JS written in Typescript. The persistence of data is assured by non-relational database Mongo.\n\n## How to run locally\n\nBefore running the server locally, you should go under dev-setup folder and run:\n\n```shell\ndocker compose up\n```\n\nThis will run a container with a mongoDB instance to be used by the api.\n\nOnce the database is up and running, if it's the first time running the project, you should install all npm dependencies:\n\n```shell\nnpm i\n```\n\nFinally, it's time to run the server:\n\n```shell\nnpm run start\n```\n\n## Concepts and principles applied:\n\n### Data Access Object (DAO) Design Pattern:\n\nDAO is a design pattern to abstract the way the business logic interacts with the database.\nSince the business logic is not tightly coupled with the database we are free to change the way the data is persisted (SQL, NoSQL) without any refactor\non the business logic.\n\nWorkoutDao defines the CRUD operations and WorkoutDaoImpl will define how its implemented. In turn. WorkoutService depends only on WorkoutDao abstract class.\n\n### Inversion of control (IoC) using dependency injection:\n\nWe have different ways to manage our dependencies across our application. Inversion of control is a pattern where a framework manage the dependencies reducing the boilerplate code and decreasing the coupling between classes.\nAlso, makes the application easier to test and maintain overall.\n\n### SOLID\n\nSOLID is an acronym standing for the following key aspects that all software should aim for.\n\n- **Single Responsibility Principle (SRP)**: We have defined classes that take care of one thing only.\n- **Open/Closed Principle (OCP)**: Since we are relying on abstractions, we don’t have to make changes on our calling code, if we wish to change an implementation.\n- **Liskov Substitution Principle (LSP)**: We can replace any of our objects by another one as long as they implement the same interface.\n- **Interface Segregation Principle**: We created a WorkoutService that implements WorkoutServiceInterface, and we’re using that one to bind our implementation.\n- **Dependency Inversion Principle**: We’re relying on interfaces everywhere. The only place where we’re making use of our classes is on the inversify.config.ts file, where we are defining our bindings.\n\n### Continuous Integration\n\nContinuous Integration is a DevOps practice to automate new code integrations assuring some quality parameters are fullfiled. Leveraging GitHub Workflows, every commit triggers a static code analysis and unit testing.\n\n### Continuous Deployment\n\nOnce any integration reaches main branch, a new version is built and published on DockerHub registry.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcalopes%2Fworkouts-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcalopes%2Fworkouts-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcalopes%2Fworkouts-service/lists"}