{"id":17551131,"url":"https://github.com/brianlusina/udapeople","last_synced_at":"2026-04-12T15:46:13.676Z","repository":{"id":54251071,"uuid":"341223958","full_name":"BrianLusina/udapeople","owner":"BrianLusina","description":"Sample product for a HR system that can be auto deployed to AWS utilizing CloudFormation \u0026 configuration management with Ansible","archived":false,"fork":false,"pushed_at":"2021-03-17T04:56:07.000Z","size":3349,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T20:54:07.465Z","etag":null,"topics":["ansible","aws","cicd","circleci","cloudformation","javascript","nodejs","prometheus","reactjs","typescript"],"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/BrianLusina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-22T14:16:48.000Z","updated_at":"2021-03-17T04:56:09.000Z","dependencies_parsed_at":"2022-08-13T10:01:06.288Z","dependency_job_id":null,"html_url":"https://github.com/BrianLusina/udapeople","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/BrianLusina%2Fudapeople","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Fudapeople/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Fudapeople/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianLusina%2Fudapeople/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianLusina","download_url":"https://codeload.github.com/BrianLusina/udapeople/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246154199,"owners_count":20732158,"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":["ansible","aws","cicd","circleci","cloudformation","javascript","nodejs","prometheus","reactjs","typescript"],"created_at":"2024-10-21T04:44:57.113Z","updated_at":"2026-04-12T15:46:08.621Z","avatar_url":"https://github.com/BrianLusina.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UdaPeople\n\nHR Product for a revolutionary company :).\nThis is a sample mono repo project with a backend \u0026 frontend showcasing infrastructure as code, deployment strategy using Blue Green deployments \u0026 configuration management with Ansible. Below indicate steps \u0026 requirements to get you setup \u0026 started. You can modify them to suit your needs as you see fit.\n\n## Getting Started\n\nInstructions for how to get a copy of the project running on your local machine.\n\n### Dependencies\n\n* Git SCM\n* SSH client like OpenSSH (not necessary, but recommended to test configuration management of your servers)\n* NodeJs v10 or higher (if you plan on compiling locally)\n* AWS CLI \u0026 AWS account\n* CircleCI Account (or similar CI server if CircleCI is not for you, in that case, you will have to modify \u0026 adapt the config to suit your needs)\n* Docker \u0026 Docker compose \n\n### Compiling/Running Locally\n\nThe instructions and information that follows should help you build, test and deploy the web application either locally or in CI/CD.\n\nThis is a \"mono-repository\" which means multiple servers or layers exist in the same repository. You'll find the following main folders:\n\n- [`frontend`](./frontend)\n- [`backend`](./backend)\n\n#### 1. Install dependencies in both `frontend` and `backend` folders.\n\nFrom your root folder, use the commands:\n```bash\ncd frontend\nnpm i\ncd ..\ncd backend\nnpm i\n```\n\u003e will install dependendencies for both frontend \u0026 backend. Note that yarn can be used as well.\n\n#### 2. Create `.env` file for database connection info.\n\nAdd a `.env` file to your `backend` folder with the following contents:\n\n```bash\nNODE_ENV=local\nVERSION=1\nTYPEORM_CONNECTION=postgres\nTYPEORM_MIGRATIONS_DIR=./src/migrations\nTYPEORM_ENTITIES=./src/modules/domain/**/*.entity.ts\nTYPEORM_MIGRATIONS=./src/migrations/*.ts\n\n# Things you can change if you wish...\nTYPEORM_HOST=localhost\nTYPEORM_PORT=5532\nTYPEORM_USERNAME=postgres\nTYPEORM_PASSWORD=password\nTYPEORM_DATABASE=glee\n```\n\u003e This can also be achieved by running the command cp .env.sample \u003e .env if on a UNIX system\n\nYou can use your own Postgres server if you wish or you can use the Docker-Compose template provided in the directory root.\n\n## Running PostgreSQL in Docker-Compose (recommended)\n\nFor convenience, there is a provided template that you can use to easily run a Postgres database for local testing. To run this template, you'll need to install Docker and Docker-Compose.\n\nTo start the database, you will use the following commands from your root folder:\n\n```bash\ndocker-compose up\n```\n\n## Compiling the Code\n\nYou can compile the code from your root folder using the following:\n\n```bash\ncd frontend\nnpm run build\n```\n\n```bash\ncd backend\nnpm run build\n```\n\n## Testing, Migrating, Running\n\nMost of the tasks needed to build, test and deploy the application are simplified by \"npm scripts\" that are found in the `package.json` for either front-end or back-end. For any of these scripts, you will need to `cd` into the respective folder and then run the script using the command `npm run [script name]`. Here are the most relevant scripts:\n\n| Name | Purpose | Notes | \n| :-- | :-- | :-- |\n| migrations | Run migration which checks for any migration scripts that have not yet been applied to the db and runs them. |Make sure you have a Postgres database running and your `.env` file is configured correctly. If you get connection errors from the backend when you start it, then chances are your DB is not running or the `.env` doesn't have the correct DB connection information. |\n| migrations:revert | Revert last successfully executed migration. | The same connection configuration is needed here as with the `migrations` script above. |\n| test | Run all unit tests. | |\n| build | Compiles the code. | Drops the compiled code in the `./dist` folder. |\n| start | Starts up the application locally. | Make sure you have a Postgres database running and your `.env` file is configured correctly. If you get connection errors from the backend when you start it, then chances are your DB is not running or the `.env` doesn't have the correct DB connection information.|\n\n### Examples:\n\nThis should compile the code and then list the result in the `./dist` folder:\n\n```bash\ncd frontend\nnpm run build\ncd dist\nls\n```\n\n... or revert the last migration that ran:\n\n```bash\ncd backend\nnpm run migrations:revert\n```\n\n## Cloud Formation Templates\n\n[CloudFormation](https://aws.amazon.com/cloudformation/) templates can be found [here](./infra). These aid in setting up infrastructure for your running application. Ensure you have the right set of permissions for AWS CLI to use when automating this process. Preferrably, have a configured machine user or a bot that has administrative access to your AWS account. DO NOT share or commit these credentials to a VCS.\n\nEach cloud formation configuration is under a relevant folder.\n\n## CircleCI config\n\nThere is a `config.yml` available [here](./circleci/config.yml) to help with configuring CircleCI to fit your needs.\n\n## Deployment\n\nDeployment notes can be found [here](./docs/DEPLOYMENT.md)\n\n### Built With\n\n- [Circle CI](www.circleci.com) - Cloud-based CI/CD service\n- [Amazon AWS](https://aws.amazon.com/) - Cloud services\n- [AWS CLI](https://aws.amazon.com/cli/) - Command-line tool for AWS\n- [CloudFormation](https://aws.amazon.com/cloudformation/) - Infrastrcuture as code\n- [Ansible](https://www.ansible.com/) - Configuration management tool\n- [Prometheus](https://prometheus.io/) - Monitoring tool\n\n### License\n\n[License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlusina%2Fudapeople","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianlusina%2Fudapeople","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianlusina%2Fudapeople/lists"}