{"id":37870172,"url":"https://github.com/ismailbayram/bigpicture","last_synced_at":"2026-01-16T16:40:15.727Z","repository":{"id":184660972,"uuid":"639915388","full_name":"ismailbayram/bigpicture","owner":"ismailbayram","description":"Validate the architecture of project.  ","archived":false,"fork":false,"pushed_at":"2024-12-06T08:10:52.000Z","size":452,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-06T08:27:36.427Z","etag":null,"topics":["architecture","architecture-visualization","fitness-function","structure"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ismailbayram.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":"2023-05-12T14:12:46.000Z","updated_at":"2024-12-06T08:10:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"9adfe534-4b66-417e-bf4d-c3cc49459c0d","html_url":"https://github.com/ismailbayram/bigpicture","commit_stats":null,"previous_names":["ismailbayram/bigpicture"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ismailbayram/bigpicture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailbayram%2Fbigpicture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailbayram%2Fbigpicture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailbayram%2Fbigpicture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailbayram%2Fbigpicture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismailbayram","download_url":"https://codeload.github.com/ismailbayram/bigpicture/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailbayram%2Fbigpicture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["architecture","architecture-visualization","fitness-function","structure"],"created_at":"2026-01-16T16:40:15.631Z","updated_at":"2026-01-16T16:40:15.714Z","avatar_url":"https://github.com/ismailbayram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BigPicture: Validate Architecture\n**Do not tell the rules, define them.**\n\nBigPicture is a tool to validate the architecture of project. \nIt can be used in Continuous Integration (CI) pipelines to validate the architecture of the project\nlike in the `.github/workflows/codequality.yml`.\n\n# Why do we need this tool?\nThere are many rules to define the architecture of a project and it is hard to keep them in mind.\nFor instance, \n- In a layered architecture, a package can not import a package from the upper layer.\n- In a hexagonal architecture, a package can not import a package from the outer layer.\n- A package can not have a file which has more than 100 lines.\n- A package can not have a function which has more than 20 lines.\n\nBigPicture allows you to define these rules in a `.bigpicture.json` file and validate the architecture of the project.\n\n\n# Supported Languages\n- Go\n- Python\n- Java\n- C# (Under Development)\n- JS (Under Development)\n--------------------\n- [Installation](#installation)\n    - [Install with Go](#install-with-go)\n    - [Install on Linux](#install-on-linux)\n    - [Install on Macos](#install-on-macos)\n- [Usage](#usage)\n    - [Server](#server)\n    - [Validate](#validate)\n    - [.bigpicture.json File](#bigpicturejson-file)\n- [Validators](#validators)\n    - [NoImportValidator](#noimportvalidator)\n    - [LineCountValidator](#linecountvalidator)\n    - [FunctionValidator](#functionvalidator)\n    - [InstabilityValidator](#instabilityvalidator)\n    - [FileNameValidator](#filenamevalidator)\n    - [SizeValidator](#sizevalidator)\n- [Contribution](#contribution)\n\n# Installation\n## Install with Go\n```bash\ngo install github.com/ismailbayram/bigpicture@1.2.3\n```\n## Install on Linux\n```bash\ncurl -L https://github.com/ismailbayram/bigpicture/releases/download/1.2.3/bigpicture-amd64-linux -o /usr/local/bin/bigpicture\nchmod +x /usr/local/bin/bigpicture\n```\n## Install on Macos\n```bash\ncurl -L https://github.com/ismailbayram/bigpicture/releases/download/1.2.3/bigpicture-amd64-darwin -o /usr/local/bin/bigpicture\nchmod +x /usr/local/bin/bigpicture\n```\n\n# Usage\n## Server\nRuns a server on port 44525. Architecture of the project can be seen on the browser.\n```bash\nbigpicture server\n```\n![Source Graph](./source_graph.png)\n\n## Validate\nValidates the architecture of the project according to the rules defined in the `.bigpicture.json` file.\n```bash\nbigpicture validate\n```\n\n## .bigpicture.json File\n`.bigpicture.json` file is used to define the rules. It should be in the root directory of the project.\n```json\n{\n    \"lang\": \"go\",\n    \"port\": 44525,\n    \"ignore\": [\n        \"web\"\n    ],\n    \"validators\": [\n        ...\n    ]\n}\n```\n**root_dir**: Let's say that you have java project and its structure is like this:\n```\nsrc\n├── main\n├──├── java\n```\nBut imports are like this:\n```\nimport com.example.project\n```\nIn this case, you should define the root directory of the project as `/src/main/java/` \nin order to bigpicture build import maps correctly. Do not forget `/` both at the beginning and the end of the path.\n\n*Note: Supported for Java and Python.*\n\n**lang**: BigPicture sometimes fails on detecting language of the project. You can define the language of the project.\n\n**port**: Port number of the server. Default value is 44525.\n\n**ignore**: Directories to ignore. Default value is empty. For instance in this project `web` directory includes\nnon-go files, thus it should be ignored.\n\n**validators**: List of validators. Default value is empty. See [Validators](#validators) section for more information.\n\n## Validators\n### NoImportValidator\nChecks if the package imports the given package. **It can be used in layered architectures.**\n\n**Example 1**:\nFor instance, in this project, `/internal/config` package can not import any other package. \n```json\n{\n    \"type\": \"no_import\",\n    \"args\": {\n        \"from\": \"/internal/config\",\n        \"to\": \"*\"\n    }\n}\n```\n**Example 2**:\nFor instance, in this project, `/internal/validator` package can not import any package in the `/internal/browser` package. \n```json\n{\n    \"type\": \"no_import\",\n    \"args\": {\n        \"from\": \"/internal/validator\",\n        \"to\": \"/internal/browser\"\n    }\n}\n```\n\n### LineCountValidator\nChecks if the package has files which have more than the given number of lines.\n\n**Example**:\nFor instance, in this project, `/internal/browser` package can not have files which have more than 100 lines. \n```json\n{\n    \"type\": \"line_count\",\n    \"args\": {\n        \"module\": \"/internal/browser\",\n        \"max\": 100,\n        \"ignore\": [\"*_test.go\", \"test/*.go\"]\n    }\n}\n```\n\n### FunctionValidator\nChecks if the package has functions which have more than the given number of lines.\n\n**Example**:\nFor instance, in this project, `/internal/browser` package can not have functions which have more than 10 lines. \n```json\n{\n    \"type\": \"function\",\n    \"args\": {\n        \"module\": \"/internal\",\n        \"max_line_count\": 50,\n        \"ignore\": [\"*_test.go\", \"test/*.go\"]\n    }\n}\n```\n\n### InstabilityValidator\nChecks if the instability metric of a package according to its directory is more than the given number.\n\n**Instability Calculation**:\n\nPackage A is imported by 3 packages and it imports 2 packages. Instability metric of the package A is\n`2 / (2 + 3) = 0.4`.\n\n**Example**:\nFor instance, in this project, `/internal/graph` package can not have instability metric more than 0.5. \n```json\n{\n    \"type\": \"instability\",\n    \"args\": {\n        \"module\": \"/internal/graph\",\n        \"max\": 0.5\n    }\n}\n```\n\n### FileNameValidator\nChecks if the package has files which do not match the given regular expression.\n\n```json\n{\n    \"type\": \"file_name\",\n    \"args\": {\n        \"module\": \"/internal\",\n        \"max_length\": 12,\n        \"regexp\": \"^[a-z]+$\",\n        \"ignore\": [\n            \"*_test.go\"\n        ]\n    }\n}\n```\n\n### SizeValidator\nChecks the percentage size of the packages under the given directory according to the lines of code. \n\n```json\n{\n    \"type\": \"size\",\n    \"args\": {\n        \"module\": \"/internal\",\n        \"max\": 25\n    }\n}\n```\n\n\n# Contribution\nThere are many ways in which you can participate in this project, for example:\n\n- Implement a new validator in `/internal/validator` directory.\n- Implement a new language support in `/internal/browser` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismailbayram%2Fbigpicture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismailbayram%2Fbigpicture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismailbayram%2Fbigpicture/lists"}