{"id":24221717,"url":"https://github.com/abdullahalshawafi/clean-architecture","last_synced_at":"2025-09-22T14:30:55.943Z","repository":{"id":45863229,"uuid":"514775318","full_name":"abdullahalshawafi/Clean-Architecture","owner":"abdullahalshawafi","description":"Simple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob.","archived":false,"fork":false,"pushed_at":"2022-07-20T15:13:12.000Z","size":512,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-06T22:57:36.774Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdullahalshawafi.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}},"created_at":"2022-07-17T07:25:28.000Z","updated_at":"2023-02-28T18:51:03.000Z","dependencies_parsed_at":"2022-09-23T00:42:59.144Z","dependency_job_id":null,"html_url":"https://github.com/abdullahalshawafi/Clean-Architecture","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahalshawafi%2FClean-Architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahalshawafi%2FClean-Architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahalshawafi%2FClean-Architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahalshawafi%2FClean-Architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahalshawafi","download_url":"https://codeload.github.com/abdullahalshawafi/Clean-Architecture/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233854343,"owners_count":18740640,"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-01-14T06:33:41.281Z","updated_at":"2025-09-22T14:30:55.890Z","avatar_url":"https://github.com/abdullahalshawafi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clean-Architecture\n\nSimple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob.\n\n## About\n\nThis REST API application implements the Clean Architecture in such a way that you can easily migrate between two RDBMS (PostgreSQL and MySQL) smoothly using a single environment variable **`DB_TYPE`** which can be toggled between **`pg`** and **`mysql`** in either `.env` file or `docker-compose.yml` depending on how are you running the application.\n\n## Installation\n\n**1. Clone the repo:**\n\n```shell\ngit clone https://github.com/abdullahalshawafi/Clean-Architecture.git\n```\n\n**2. Move the project's directory:**\n\n```shell\ncd Clean-Architecture/\n```\n\n**3. Copy `.env.example` file into `.env` file and fill it with your environment variables:**\n\n```shell\ncp .env.example .env\n```\n\n### Using npm\n\n**_Make sure you have Node.js, PostgreSQL, and MySQL installed_**\n\n```shell\nnode -v\nnpm -v\npsql -V\nmysql -V\n```\n\n**4. Install the needed npm packages:**\n\n```shell\nnpm install\n```\n\n**5. Build the application:**\n\n```shell\nnpm run build\n```\n\n**6. Start the application:**\n\n```shell\nnpm start\n```\n\n### Using Docker and Docker Compose\n\n**_Make sure you have docker and docker-compose installed on your UNIX based machine:_**\n\n```shell\ndocker -v\ndocker-compose -v\n```\n\n**4. Build the API's docker image:**\n\n```shell\ndocker build . -t employees\n```\n\n**5. Run the application:**\n\n```shell\ndocker-compose up\n```\n\n**6. Don't forget the stop the containers after you close the application:**\n\n```shell\ndocker-compose down\n```\n\nIn either ways, the application should start and be running on http://localhost:8080\n\n## API Documentation\n\nTo generate the documentation use `npm run docs`. Then go to http://localhost:8080/api/v1 to view the generated documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahalshawafi%2Fclean-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahalshawafi%2Fclean-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahalshawafi%2Fclean-architecture/lists"}