{"id":17340838,"url":"https://github.com/kenfdev/eventemitter-poc","last_synced_at":"2025-10-27T15:30:34.529Z","repository":{"id":64706098,"uuid":"525586530","full_name":"kenfdev/eventemitter-poc","owner":"kenfdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T19:07:09.000Z","size":495,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T19:09:18.030Z","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/kenfdev.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-17T00:33:57.000Z","updated_at":"2024-10-29T19:05:52.000Z","dependencies_parsed_at":"2023-02-18T21:30:46.367Z","dependency_job_id":"ab77868a-442b-4359-b98c-f142d735bf52","html_url":"https://github.com/kenfdev/eventemitter-poc","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/kenfdev%2Feventemitter-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenfdev%2Feventemitter-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenfdev%2Feventemitter-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenfdev%2Feventemitter-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenfdev","download_url":"https://codeload.github.com/kenfdev/eventemitter-poc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238517391,"owners_count":19485553,"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-10-15T15:46:41.771Z","updated_at":"2025-10-27T15:30:29.185Z","avatar_url":"https://github.com/kenfdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# In-Memory Event Driven Architecture with EventEmitter \n\nThis app is a PoC to show how you can publish/subscribe to events using EventEmitter in Node.js. The example publishes a domain event from the use case layer (*) and the published event is handled by a different use case. \n\n*Note: Although it is generally said that domain events should be published from Aggregates(the domain layer), this example publishes domain events from the use case layer for simplicity\n\n## Architecture\n\n![](assets/images/architecture.png)\n\n\n## Try yourself\n\n```sh\nnpm install\nnpm test\nnpm run dev\n```\n\nThe server runs on http://localhost:3030. Create a POST request to `http://localhost:3030/users`.\n\n```json\n{\n\t\"username\": \"johndoe\",\n\t\"email\": \"johndoe@test.test\"\n}\n```\n\nYou should receive a response similar to the one below:\n\n```json\n{\n\t\"id\": \"7294d859-9beb-49c9-b96f-0f77338dcab5\",\n\t\"email\": \"johndoe@test.test\",\n\t\"username\": \"johndoe\"\n}\n```\n\nAlso, you should see a log that indicates a message was sent in the console output:\n\n```sh\nsend {\n  \"from\": \"noreply@test.test\",\n  \"to\": \"johndoe@test.test\",\n  \"subject\": \"Welcome!\",\n  \"text\": \"Welcome aboard!\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenfdev%2Feventemitter-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenfdev%2Feventemitter-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenfdev%2Feventemitter-poc/lists"}