{"id":19811023,"url":"https://github.com/accenture/mercury-nodejs","last_synced_at":"2025-05-01T08:32:20.901Z","repository":{"id":37017636,"uuid":"179631706","full_name":"Accenture/mercury-nodejs","owner":"Accenture","description":"Reference engine for composable applications","archived":false,"fork":false,"pushed_at":"2025-04-24T22:03:11.000Z","size":6461,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-24T23:20:38.784Z","etag":null,"topics":["axios","composable-architecture","distributed-tracing","event-driven","event-over-http","express","input-process-output","microservices","object-streaming","reactive","rest-automation","test-driven-development","typescript"],"latest_commit_sha":null,"homepage":"https://accenture.github.io/mercury-nodejs/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2019-04-05T06:43:27.000Z","updated_at":"2025-04-24T22:03:15.000Z","dependencies_parsed_at":"2022-06-29T08:53:23.972Z","dependency_job_id":"79a79a0e-8fb2-42ea-9453-faa813faa632","html_url":"https://github.com/Accenture/mercury-nodejs","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/Accenture%2Fmercury-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fmercury-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fmercury-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fmercury-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/mercury-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251847828,"owners_count":21653582,"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":["axios","composable-architecture","distributed-tracing","event-driven","event-over-http","express","input-process-output","microservices","object-streaming","reactive","rest-automation","test-driven-development","typescript"],"created_at":"2024-11-12T09:24:24.959Z","updated_at":"2025-05-01T08:32:20.894Z","avatar_url":"https://github.com/Accenture.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mercury Composable for Node.js\n\nGood news! We have merged our enterprise extension (\"Event Script\") into the Mercury event-driven\nprogramming foundation codebase from version 4.2 onwards. It is a comprehensive toolkit to write\ncomposable applications including microservices and serverless.\n\nThe specification for this technology is documented under US Patent application 18/459,307. \nThe source code is provided as is under the Apache 2.0 license.\n\nThe project is available in both Java and Node.js languages.\n\nFor Java, please visit [Mercury Composable for Java](https://github.com/Accenture/mercury-composable)\n\nFor Node.js, please browse [Mercury Composable for Node](https://github.com/Accenture/mercury-nodejs)\n\nJanuary 2025\n\n# Getting Started\n\nA composable application is designed in 3 steps:\n\n1. Describe your use case as an event flow diagram\n2. Create a configuration file to represent the event flow\n3. Write a user story for each user function\n\nTo get started, please visit [Chapter 1, Developer Guide](https://accenture.github.io/mercury-nodejs/guides/CHAPTER-1/)\nand [Methodology](https://accenture.github.io/mercury-nodejs/guides/METHODOLOGY/).\n\nWe will illustrate the methodology with a composable application example.\n\n# Conquer Complexity: Embrace Composable Design\n\n## Introduction\n\nSoftware development is an ongoing battle against complexity. Over time, codebases can become tangled and unwieldy,\nhindering innovation and maintenance. This article introduces composable design patterns, a powerful approach to\nbuild applications that are modular, maintainable, and scalable.\n\n## The Perils of Spaghetti Code\n\nWe have all encountered it: code that resembles a plate of spaghetti – tangled dependencies, hidden logic,\nand a general sense of dread when approaching modifications. These codebases are difficult to test, debug, \nand update. Composable design patterns offer a solution.\n\n## Evolution of Design Patterns\n\nSoftware development methodologies have evolved alongside hardware advancements. In the early days, developers \nprized efficiency, writing code from scratch due to limited libraries. The rise of frameworks brought structure\nand boilerplate code, but also introduced potential rigidity.\n\n## Functional Programming and Event-Driven Architecture\n\nFunctional programming, with its emphasis on pure functions and immutable data, paved the way for composable design.\nThis approach encourages building applications as chains of well-defined functions, each with a clear input and output.\n\nEvent-driven architecture complements this approach by using events to trigger functions. This loose coupling\npromotes modularity and scalability.\n\n## The Power of Composable Design\n\nAt its core, composable design emphasizes two principles:\n\n1.\t*Self-Contained Functions*: Each function is a well-defined unit, handling its own logic and transformations\n    with minimal dependencies.\n2.\t*Event Choreography*: Functions communicate through events, allowing for loose coupling and independent\n    execution.\n\n## Benefits of Composable Design\n\n- *Enhanced Maintainability*: Isolated functions are easier to understand, test, and modify.\n- *Improved Reusability*: Self-contained functions can be easily reused across different parts of your application.\n- *Superior Performance*: Loose coupling reduces bottlenecks and encourages asynchronous execution.\n- *Streamlined Testing*: Well-defined functions facilitate unit testing and isolate potential issues.\n- *Simplified Debugging*: Independent functions make it easier to pinpoint the source of errors.\n- *Technology Agnostic*: You may use your preferred frameworks and tools to write composable code, \n  allowing for easier future adaptations.\n\n## Implementing Composable Design\n\nWhile seemingly simple, implementing composable design can involve some initial complexity.\n\nHere's a breakdown of the approach:\n\n- *Function Design*: Each function serves a specific purpose, with clearly defined inputs and outputs.\n- *Event Communication*: Functions communicate through well-defined events, avoiding direct dependencies.\n- *Choreography*: An event manager, with a state machine and event flow configuration, sequences and triggers functions\n  based on events.\n\n## Conclusion\n\nComposable design patterns offer a powerful paradigm for building maintainable, scalable, and future-proof applications.\nBy embracing the principles of self-contained functions and event-driven communication, you can conquer complexity and\nwrite code that is a joy to work with.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fmercury-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fmercury-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fmercury-nodejs/lists"}