{"id":15616353,"url":"https://github.com/zuck/tzatziki","last_synced_at":"2026-04-28T13:32:42.347Z","repository":{"id":52286291,"uuid":"290279267","full_name":"zuck/tzatziki","owner":"zuck","description":"A domain rules engine based on Gherkin syntax","archived":false,"fork":false,"pushed_at":"2021-05-11T04:43:47.000Z","size":179,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T07:12:22.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zuck.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}},"created_at":"2020-08-25T17:26:31.000Z","updated_at":"2025-03-20T16:28:22.000Z","dependencies_parsed_at":"2022-09-26T16:50:28.372Z","dependency_job_id":null,"html_url":"https://github.com/zuck/tzatziki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zuck/tzatziki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuck%2Ftzatziki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuck%2Ftzatziki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuck%2Ftzatziki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuck%2Ftzatziki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuck","download_url":"https://codeload.github.com/zuck/tzatziki/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuck%2Ftzatziki/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263052378,"owners_count":23406102,"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-03T07:07:02.211Z","updated_at":"2026-04-28T13:32:37.327Z","avatar_url":"https://github.com/zuck.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tzatziki\n\nA domain rules engine based on Gherkin syntax\n\n![Node.js CI](https://github.com/zuck/tzatziki/workflows/Node.js%20CI/badge.svg)\n\n**WARNING: this project is still highly experimental and its API may change in the future!**\n\n**NOTE: while experimental, feedback is encouraged and really welcome!**\n\n## Why?\n\nThe Gherkin syntax and the `cucumber` project have made writing\nand execuring acceptance tests a very easy and efficient activity.\n\nHowever, writing the real domain code could still be a very complex\nand risking challenge.\n\nIn a *LEAN* and *Agile* world, requirements may change a lot along\nthe development lifecycle. The impact of complex code refactoring\ncan be devastating for teams, companies and client's investment.\n\nThat's the idea: **why don't model the domain logic using the same\napproach used to write the acceptance tests?**\n\nThe main advantages of this approach are:\n\n  1. Complex code is implicitly broken in small and resusable step definitions.\n  2. The cost of requirement changes become less critical and the investment more valuable.\n  3. Throwing away big chunks of code when requirements change is less probable.\n  4. The domain code is highly decoupled from the rest of the system, making it more clean and visible.\n\n## Getting started\n\nFirst of all, let's install Tzatziki:\n\n```bash\n$ npm install --save tzatziki\n```\n\nWe can now create features and scenarios using the Tzatziki API:\n\n```js\nconst Tzatziki = require('tzatziki')\nconst tzatziki = new Tzatziki()\n\n// Create a feature for our business domain:\n\nconst feature = tzatziki.createFeature('User profile', 'As user, I request my profile details')\nconst scenario = feature.createScenario('A user requests her profile')\n\nscenario.Given('a user')\nscenario.When('she requests her profile')\nscenario.Then('her details are returned')\n\n// Then, populate the dictionary of definitions to provide the logic:\n\ntzatziki.dictionary.Given('a user', function () { ... })\ntzatziki.dictionary.When('she requests her profile', function () { ... })\ntzatziki.dictionary.Then('her details are returned', function () { ... })\n\nfeature\n  .exec(tzatziki.dictionary)\n  .catch(err =\u003e console.log(err))\n```\n\nAlternatively, we can also use features written in Gherkin syntax to model our domain logic:\n\n```js\nconst Tzatziki = require('tzatziki')\nconst tzatziki = new Tzatziki()\n\n// Cucumber-style methods can be used:\n\nconst { Given, When, Then } = tzatziki.cucumber()\n\nGiven('a user', function () { ... })\nWhen('she requests her profile', function () { ... })\nThen('her details are returned', function () { ... })\n\n// Parse an existing feature file:\n\ntzatziki\n  .parse('features/example.feature')\n  .then(feature =\u003e feature.exec(tzatziki.dictionary))\n```\n\n## Test\n\n```bash\n$ npm test\n```\n\n## Acknowledgements\n\nThis project is kindly sponsored by:\n\n[![heply](https://raw.githack.com/heply/brand/master/heply-logo.svg)](https://www.heply.it)\n\n## License\n\nLicensed under [MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuck%2Ftzatziki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuck%2Ftzatziki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuck%2Ftzatziki/lists"}