{"id":13764545,"url":"https://github.com/pvarentsov/typescript-clean-architecture","last_synced_at":"2025-05-16T02:09:17.957Z","repository":{"id":37492651,"uuid":"277879045","full_name":"pvarentsov/typescript-clean-architecture","owner":"pvarentsov","description":"It is my attempt to create Clean Architecture based application in TypeScript.","archived":false,"fork":false,"pushed_at":"2023-09-17T19:30:04.000Z","size":5499,"stargazers_count":1446,"open_issues_count":2,"forks_count":183,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-08T12:12:19.184Z","etag":null,"topics":["back-end","clean-architecture","clean-code","e2e-testing","nestjs","nodejs","typeorm","typescript","unit-testing"],"latest_commit_sha":null,"homepage":"","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/pvarentsov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-07T17:19:36.000Z","updated_at":"2025-03-20T16:09:02.000Z","dependencies_parsed_at":"2024-01-07T18:06:51.364Z","dependency_job_id":"f8b366d6-9f96-421f-9f9e-ab915de7b0c1","html_url":"https://github.com/pvarentsov/typescript-clean-architecture","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/pvarentsov%2Ftypescript-clean-architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Ftypescript-clean-architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Ftypescript-clean-architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Ftypescript-clean-architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvarentsov","download_url":"https://codeload.github.com/pvarentsov/typescript-clean-architecture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453667,"owners_count":22073618,"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":["back-end","clean-architecture","clean-code","e2e-testing","nestjs","nodejs","typeorm","typescript","unit-testing"],"created_at":"2024-08-03T16:00:22.535Z","updated_at":"2025-05-16T02:09:17.938Z","avatar_url":"https://github.com/pvarentsov.png","language":"TypeScript","readme":"# Typescript Clean Architecture\n\nIt is my attempt to create Clean Architecture based application in Typescript.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](./LICENSE)\n![Build](https://github.com/pvarentsov/typescript-clean-architecture/workflows/Build/badge.svg)\n\n\u003cp align=\"center\"\u003e \n    \u003cimg src=\"./asset/IPosterStructure.png\"\u003e\n\u003c/p\u003e\n\n## IPoster\n\nIPoster is a simple fictional application that allows users to publish posts.\n\n#### Main Entities\n1. User\n2. Post\n3. Media\n\n#### Use Cases\n\n* User -\u003e IPoster\n  1. `User` can create `Guest` account in `IPoster`\n  2. `User` can create `Author` account in `IPoster`\n\n* User -\u003e Media\n  1. `Author` can create own `Media`\n  2. `Author` can edit own `Media`\n  3. `Author` can get own `Media`\n  4. `Author` can get own `Media` list\n  5. `Author` can remove own `Media`\n\n* User -\u003e Post\n  1. `Author` can create own draft `Post`\n  2. `Author` can edit own `Post`\n  3. `Author` can attach an image `Media` to own `Post`\n  4. `Author` can publish own `Post`\n  5. `Author` can get own `Post`\n  6. `Author` can get own `Post` list\n  7. `Author` can remove own `Post`\n  8. `Author` and `Guest` can get published `Post`\n  9. `Author` and `Guest` can get list with published `Posts`\n  \n## Local Development\n\n* **Docker**\n\n    All necessary external services are described in the [./docker-compose.local.yml](./docker-compose.local.yaml):\n    * Run `docker-compose -f docker-compose.local.yaml up -d`\n    * Stop `docker-compose -f docker-compose.local.yaml stop`\n    \n    Services:\n    1. PostgreSQL - [Credentials](./env/local.pg.env).\n    2. Minio - [Credentials](./env/local.minio.env).\n    \n* **Building**\n\n    1. Install libraries - `npm install`\n    2. Build application - `npm run build`\n    \n* **Configuring**\n  \n    Configuring is based on the environment variables. All environment variables must be exposed before starting the application.\n    See [all environment variables](./env/local.app.env).\n    \n* **Running**\n\n    * Start application - `npm run start`\n    * Expose [./env/local.app.env](./env/local.app.env) and start application - `npm run start:local`\n    \n      \u003cdetails\u003e\n        \u003csummary\u003e\n          API documentation will be available on the endpoint \u003ci\u003eGET \u003ca href=\"http://localhost:3005/documentation/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003ehttp://localhost:3005/documentation\u003c/a\u003e\u003c/i\u003e\n        \u003c/summary\u003e\n        \u003cbr\u003e\n        \n        \u003cp align=\"center\"\u003e \n            \u003cimg src=\"./asset/ApiDocumentation.png\"\u003e\n        \u003c/p\u003e\n      \u003c/details\u003e\n    \n* **Linting**\n\n    * `npm run lint`\n    \n* **Testing**\n\n    * Prepare environment - `docker-compose -f docker-compose.test.yaml up -d`\n    * Run tests - `npm run test`\n    * Run tests with coverage - `npm run test:cov`\n     \n* **Libraries checking**    \n   \n    * Show new libraries' versions - `npm run lib:check`\n    * Upgrade libraries' versions - `npm run lib:upgrade`\n    \n* **IDE**\n\n    * IntelliJ IDEA:\n      1. [Launch Configuration](./asset/IdeaRunConfiguration.png)\n      2. [Test Configuration](./asset/IdeaTestConfiguration.png)\n      \n    * Visual Studio Code:\n      1. [Launch Configuration](./.vscode/launch.json)\n      2. [Test Configuration](./.vscode/settings.json)\n","funding_links":[],"categories":["Resources","TypeScript","clean-architecture"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Ftypescript-clean-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvarentsov%2Ftypescript-clean-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Ftypescript-clean-architecture/lists"}