{"id":22550959,"url":"https://github.com/ayakovlenko/fences","last_synced_at":"2025-04-09T18:08:44.891Z","repository":{"id":268989032,"uuid":"905012145","full_name":"ayakovlenko/fences","owner":"ayakovlenko","description":"enforce module boundaries for Deno projects","archived":false,"fork":false,"pushed_at":"2024-12-21T12:53:36.000Z","size":22,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:04:33.285Z","etag":null,"topics":["deno","denofirst","devtools","linter"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ayakovlenko.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-18T01:37:51.000Z","updated_at":"2025-02-23T17:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"424733a9-cd44-47df-a74a-c9e403a179ca","html_url":"https://github.com/ayakovlenko/fences","commit_stats":null,"previous_names":["ayakovlenko/fences"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayakovlenko%2Ffences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayakovlenko%2Ffences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayakovlenko%2Ffences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayakovlenko%2Ffences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayakovlenko","download_url":"https://codeload.github.com/ayakovlenko/fences/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248084351,"owners_count":21045125,"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":["deno","denofirst","devtools","linter"],"created_at":"2024-12-07T17:09:09.543Z","updated_at":"2025-04-09T18:08:44.878Z","avatar_url":"https://github.com/ayakovlenko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fences\n\nFences helps you enforce inter-module boundaries within your Deno projects.\n\nFences is dog-fooded. See [`.fences.yaml`](./.fences.yaml) for an example of a\nreal configuration that is used by this repo.\n\n## installation\n\n```sh\ngit clone git@github.com:ayakovlenko/fences.git\n\ndeno task install\n```\n\nVerify installation:\n\n```sh\n$ fences version\n\n0.1.0\n```\n\n## getting started\n\nCreate `.fences.yaml` in your project root directory and define your modules.\n\nRun `fences check` to check the boundaries.\n\n### check inter-module dependencies\n\n```yaml\nmodules:\n  - name: foo\n    dependsOn:\n      - bar\n  - name: bar\n    exposes:\n      - mod.ts\n```\n\nIn this example, module `foo` is allowed to import only from `bar` module from\n`mod.ts`.\n\n### check libraries\n\n```yaml\nmodules:\n  - name: foo\n    libraries:\n      - \"@std/fs/\"\n```\n\nIn this example, module `foo` is allowed to import only from the `@std/fs`\nlibrary.\n\n## architecture\n\n_The following module graph is generated using `fences graph` command:_\n\n```mermaid\nflowchart TD\n    config[\"config\"]\n    config_validation[\"config-validation\"]\n    structure_validation[\"structure-validation\"]\n    parser[\"parser\"]\n    cli[\"cli\"]\n    feature[\"feature\"]\n    core_fs[\"core/fs\"]\n\n    config_validation --\u003e config\n    structure_validation --\u003e config\n    structure_validation --\u003e parser\n    structure_validation --\u003e core_fs\n    cli --\u003e config\n    cli --\u003e feature\n    feature --\u003e config\n    feature --\u003e config_validation\n    feature --\u003e structure_validation\n    feature --\u003e parser\n    feature --\u003e core_fs\n    core_fs --\u003e config\n```\n\n## motivation\n\nI started this project to help me develop and evolve medium to large size\nprojects alone. Establishing strict module dependencies early helps to make sure\nthat a project will remain maintainable and structured even after months of\ndevelopment.\n\n## contributing\n\nIf you feel you can contribute to this project, or you've found a bug, create an\nissue or pull request.\n\nThis project is soley mantained, so it is prone to bugs and anti-patterns,\nplease call them out.\n\nAll contributions are highly appreciated!\n\n[![](https://api.star-history.com/svg?repos=ayakovlenko/fences\u0026type=Date)](https://star-history.com/#ayakovlenko/fences\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayakovlenko%2Ffences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayakovlenko%2Ffences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayakovlenko%2Ffences/lists"}