{"id":15040537,"url":"https://github.com/denrox/nestjs-microservices-example","last_synced_at":"2025-04-08T12:03:51.859Z","repository":{"id":41504787,"uuid":"213399136","full_name":"Denrox/nestjs-microservices-example","owner":"Denrox","description":"A working example of microservice architecture implementation using nestjs framework","archived":false,"fork":false,"pushed_at":"2024-04-23T01:01:51.000Z","size":71,"stargazers_count":934,"open_issues_count":9,"forks_count":264,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-04T13:45:51.250Z","etag":null,"topics":["docker","docker-compose","microservice-architecture","microservices","mongoose","nestjs"],"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/Denrox.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":"2019-10-07T14:02:53.000Z","updated_at":"2025-03-02T22:43:57.000Z","dependencies_parsed_at":"2024-09-20T18:07:01.816Z","dependency_job_id":"3b2ee53a-a1db-4413-aaa9-a04ab5681d17","html_url":"https://github.com/Denrox/nestjs-microservices-example","commit_stats":{"total_commits":12,"total_committers":5,"mean_commits":2.4,"dds":0.6666666666666667,"last_synced_commit":"429c06a62bd8050dd12f9e7e4cb429202d195157"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fnestjs-microservices-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fnestjs-microservices-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fnestjs-microservices-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fnestjs-microservices-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Denrox","download_url":"https://codeload.github.com/Denrox/nestjs-microservices-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838441,"owners_count":21004580,"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":["docker","docker-compose","microservice-architecture","microservices","mongoose","nestjs"],"created_at":"2024-09-24T20:44:42.869Z","updated_at":"2025-04-08T12:03:51.834Z","avatar_url":"https://github.com/Denrox.png","language":"TypeScript","readme":"# This repository shows how you can build API with microservice architecture using nestjs\n## Features of this example\nThis example is basically an API for some task manager application. It provides a possibility to perform sign up users, confirm user's emails, manage user's tasks.\n## Running the example with docker-compose\nExecute `docker network create infrastructure \u0026\u0026 cp .env.example .env \u0026\u0026 docker-compose up -d` from the root of the repository\n## Accessing the API itself and swagger docs for the API\n- Once you launch the API it will be accessible on port 8000.\n- Swagger docs for the API will be accessible locally via URI \"**http://localhost:8000/api**\"\n## Launch services for integration testing (using docker-compose)\n- Execute `sudo vim /etc/hosts` and add line `127.0.0.1 db` to it. This is a temporary step, it will not be required since new update.\n- Execute `cp .env.example .env \u0026\u0026 cp .env.test.example .env.test`\n- Execute `docker-compose -f ./docker-compose.test.yml up -d` from the root of the repository\n- Run `cd ./gateway \u0026\u0026 npm install \u0026\u0026 npm run test` from the root of this repo\n## Brief architecture overview\nThis API showcase consists of the following parts:\n- API gateway\n- Token service - responsible for creating, decoding, destroying JWT tokens for users\n- User service - responsible for CRUD operations on users\n- Mailer service - responsible for sending out emails (confirm sign up)\n- Permission service - responsible for verifying permissions for logged in users.\n- Tasks service - responsible for CRUD operations on users tasks records\n- The service interact via **TCP sockets**\n\nThis example uses a SINGLE database (MongoDB) instance for all microservices. **This is not a correct point, the correct way is to use a separate DB instance for every microservice.** I used one DB instance for all microservices to simplify this example.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenrox%2Fnestjs-microservices-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenrox%2Fnestjs-microservices-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenrox%2Fnestjs-microservices-example/lists"}