{"id":18768542,"url":"https://github.com/pdevito3/domain-events-example","last_synced_at":"2025-04-13T06:32:44.132Z","repository":{"id":53817982,"uuid":"486793572","full_name":"pdevito3/domain-events-example","owner":"pdevito3","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-17T03:26:52.000Z","size":131,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T23:42:50.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/pdevito3.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-04-29T00:57:35.000Z","updated_at":"2024-07-26T11:44:35.000Z","dependencies_parsed_at":"2022-08-21T09:40:42.257Z","dependency_job_id":null,"html_url":"https://github.com/pdevito3/domain-events-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/pdevito3%2Fdomain-events-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevito3%2Fdomain-events-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevito3%2Fdomain-events-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdevito3%2Fdomain-events-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdevito3","download_url":"https://codeload.github.com/pdevito3/domain-events-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674677,"owners_count":21143760,"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":"2024-11-07T19:13:06.218Z","updated_at":"2025-04-13T06:32:42.294Z","avatar_url":"https://github.com/pdevito3.png","language":"C#","readme":"# domain-events-example\n\nThis project was created with [Craftsman](https://github.com/pdevito3/craftsman).\n\n## Getting Started\n### Set Up Your Database\nThis project is configured to reference a live database instead of an in-memory one for more robust development. \nBy default, the database will be configured to run in a docker container and already has the connection \nstring configured in your launch settings.\n\nTo set up your database(s):\n1. Run `docker-compose up --build` from your `sln` directory to spin up your database(s) (and RabbitMQ, if needed).\n\nAfter you have your database(s) running in docker, make sure you apply your migrations:\n1. Make sure you have a migrations in your boundary project (there should be a `Migrations` directory in the project directory). \nIf there isn't see [Running Migrations](#running-migrations) below.\n2. Confirm your environment (`ASPNETCORE_ENVIRONMENT`) is set to `Development` using \n`$Env:ASPNETCORE_ENVIRONMENT = \"Development\"` for powershell or `export ASPNETCORE_ENVIRONMENT=Development` for bash.\n3. `cd` to the boundary project root (e.g. `cd RecipeManagement/src/RecipeManagement`)\n4. Run `dotnet ef database update` to apply your migrations. \n\n\u003e You can also stay in the `sln` root and \nrun something like `dotnet ef database update --project RecipeManagement/src/RecipeManagement`\n\n### Running Your Project(s)\nOnce you have your database(s) running, you can run your API(s), BFF, and Auth Servers by using \nthe `dotnet run` command or running your project(s) from your IDE of choice.   \n\n## Running Integration Tests\nTo run integration tests:\n\n1. Ensure that you have docker installed.\n2. Go to your src directory for the bounded context that you want to test.\n3. Confirm that you have migrations in your infrastructure project. If you need to add them, see the [instructions below](#running-migrations).\n4. Run the tests\n\n\u003e ⏳ If you don't have the database image pulled down to your machine, they will take some time on the first run.\n\n### Troubleshooting\n-If you have trouble with your tests, try removing the container and volume marked for your integration tests.\n- If your entity has foreign keys, you'll likely need to adjust some of your tests after scaffolding to accomodate them.\n\n## Running Migrations\nTo create a new migration, make sure your environment is set to `Development`:\n\n### Powershell\n```powershell\n$Env:ASPNETCORE_ENVIRONMENT = \"Development\"\n```\n\n### Bash\n```bash\nexport ASPNETCORE_ENVIRONMENT=Development\n```\n\nThen run the following:\n\n```shell\ncd YourBoundedContextName/src/YourBoundedContextName\ndotnet ef migrations add \"MigrationDescription\"\n```\n\nTo apply your migrations to your local db, make sure your database is running in docker run the following:\n\n```bash\ncd YourBoundedContextName/src/YourBoundedContextName\ndotnet ef database update\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdevito3%2Fdomain-events-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdevito3%2Fdomain-events-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdevito3%2Fdomain-events-example/lists"}