{"id":25172935,"url":"https://github.com/sclable/nestjs-libs-example","last_synced_at":"2025-04-03T22:24:05.086Z","repository":{"id":36964184,"uuid":"375359599","full_name":"sclable/nestjs-libs-example","owner":"sclable","description":"Example project for the sclable/nestjs-libs packages.","archived":false,"fork":false,"pushed_at":"2023-03-06T08:02:34.000Z","size":2887,"stargazers_count":1,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T10:18:45.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sclable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-09T13:10:26.000Z","updated_at":"2023-07-26T00:25:13.000Z","dependencies_parsed_at":"2023-02-16T04:50:17.057Z","dependency_job_id":null,"html_url":"https://github.com/sclable/nestjs-libs-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclable%2Fnestjs-libs-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclable%2Fnestjs-libs-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclable%2Fnestjs-libs-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclable%2Fnestjs-libs-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sclable","download_url":"https://codeload.github.com/sclable/nestjs-libs-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247087304,"owners_count":20881363,"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":[],"created_at":"2025-02-09T10:18:47.777Z","updated_at":"2025-04-03T22:24:05.066Z","avatar_url":"https://github.com/sclable.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS Libs - Example Project\n## Description\nThe goal of this repository is to provide an example project for the libraries can be found in the `sclable/nestjs-libs` reposotory.\n\n### Implemented library examples:\n* `@sclable/nestjs-auth`\n  * Local/JWT Guard\n  * Keycloak Guard\n* `@sclable/nestjs-storage`\n  * Dummy Adapter\n  * Local Adapter\n  * Minio Adapter\n* `@sclable/nestjs-queue`\n  * Dummy Adapter\n  * RabbitMQ Adapter\n\n## Installation\n```bash\n$ npm install\n```\n\n## Running the app\nThe API is available on `http://localhost:3000` when it's started:\n```bash\n$ npm run start\n```\n\n## Usage\nSee: https://insomnia.rest  \nImport the `insomnia.yaml` file to get a list of API calls to interact with the application.  \n\nFor local tryout we suggest running docker compose for RabbitMQ, Minio and Keycloak server\n```bash\ndocker-compose up -d\n```\n\n## Authentication Library Implementation\nTo see the integration of the authentication library check the authentication module in `src/auth`. There is a local\nauthentication implementation, using the library-built-in controllers, but there is also commented out code for keycloak.\n\n## Storage Library Implementation\nTo see the integration of the storage library check the storage modul in `src/storage`.\n* StorageModule - initializes the library\n* StorageService - connects the app to the library\n* StorageController - implements usecases to be able to test the library\n\nTo try the different storage types you have to change the respective configuration entry in the `.env` file. \nThe implemented examples are: `dummy`, `local`, `minio`.\n```dotenv\n## STORAGE_DEFAULT_DRIVER=[dummy|local|minio|azure]\nSTORAGE_DEFAULT_DRIVER=local\n``` \nAfter changed the application must be restarted (to parse the new config). \n\n## Queue Library Implementation\nTo see the integration of the queue library check the storage modul in `src/queue`.\n* QueueModule - initializes the library\n* QueueService - connects the app to the library\n* QueueController - implements usecases to be able to test the library\n\nTo try the different queue types you have to change the respective configuration entry in the `.env` file. \nThe implemented examples are: `dummy` and `rabbitmq`.\n```dotenv\n## QUEUE_TYPE=[dummy|rabbitmq|azure-service-bus]\nQUEUE_TYPE=rabbitmq\n``` \nAfter changed the application must be restarted (to parse the new config). \n\nTo have an admin UI available on http://localhost:15672 run the following command:\n```bash\n$ docker exec \u003crabbitmq-container-name\u003e rabbitmq-plugins enable rabbitmq_management\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsclable%2Fnestjs-libs-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsclable%2Fnestjs-libs-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsclable%2Fnestjs-libs-example/lists"}