{"id":22940520,"url":"https://github.com/danilosampaio/integraph","last_synced_at":"2026-04-20T13:35:48.583Z","repository":{"id":267812490,"uuid":"896125906","full_name":"danilosampaio/integraph","owner":"danilosampaio","description":"Create Architecture diagrams from your code.","archived":false,"fork":false,"pushed_at":"2024-12-13T21:17:30.000Z","size":3152,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T15:32:48.201Z","etag":null,"topics":["architecture","diagram","mermaid","parser","yaml"],"latest_commit_sha":null,"homepage":"","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/danilosampaio.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"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":"2024-11-29T15:44:49.000Z","updated_at":"2024-12-13T21:17:02.000Z","dependencies_parsed_at":"2024-12-12T16:21:43.513Z","dependency_job_id":"3c090c67-776e-448e-9ced-f732831dced2","html_url":"https://github.com/danilosampaio/integraph","commit_stats":null,"previous_names":["danilosampaio/integraph"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/danilosampaio/integraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Fintegraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Fintegraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Fintegraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Fintegraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danilosampaio","download_url":"https://codeload.github.com/danilosampaio/integraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilosampaio%2Fintegraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32049069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","diagram","mermaid","parser","yaml"],"created_at":"2024-12-14T13:22:51.666Z","updated_at":"2026-04-20T13:35:48.567Z","avatar_url":"https://github.com/danilosampaio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integraph [![codecov](https://codecov.io/github/danilosampaio/integraph/graph/badge.svg?token=15VHDPF06H)](https://codecov.io/github/danilosampaio/integraph)\n\u003e Create Architecture diagrams from your code.\n\n## Architecture\n\n![Architecture](src/assets/images/arch.png)\n\n## Install\n\n```\nnpm install -g integraph\n```\n\n## Usage\n\nMap integrations adding `@integraph` comments in your source code:\n\n```js\nclass ECommerce {\n    /**\n     * @integraph\n     * service: e-commerce\n     * integrations:\n     *   - service: Payment gateway\n     *     edgeDirection: RL\n     *     group: External APIs\n     */\n    processsPayment() {\n        // ...\n    }\n}\n\n```\n\nUnder your project root directory/repository, run the following command:\n\n```\nintegraph\n```\n\nThe generated diagram:\n\n![Example 01](src/assets/images/example_01.png)\n\nIt will search for files containing `@integraph` comments and mapping all integrations, and as results it generates the following files under the directory `.integraph`:\n\n- `diagram.js`\n    - it contains the function `getDiagram` which returns the `mermaid` [architeture diagram](https://mermaid.js.org/syntax/architecture.html).\n    ```\n    architecture-beta\n        group externalapis[External APIs]\n\n        service ecommerce(server)[e_commerce]\n        service paymentgateway(server)[Payment gateway] in externalapis\n\n        ecommerce:R -[ecommerce__paymentgateway]- L:paymentgateway\n    ```\n- `integrations.js`\n    - it contains the funciton `getIntegrations` which returns a json with all mappend integrations.\n    ```json\n    [\n        {\n            \"startPosition\":{\n                \"row\":1,\n                \"column\":4\n            },\n            \"endPosition\":{\n                \"row\":8,\n                \"column\":7\n            },\n            \"yaml\":{\n                \"service\":\"e-commerce\",\n                \"integrations\":[\n                    {\n                        \"service\":\"Payment gateway\",\n                        \"edgeDirection\":\"RL\",\n                        \"group\":\"External APIs\"\n                    }\n                ]\n            },\n            \"path\":\"diagrams/__tests__/fixtures/example_01.ts\",\n            \"repo\":\"https://github.com/danilosampaio/integraph/blob/main\",\n            \"sourceCode\":\"class ECommerce { ...\"\n        }\n    ]\n    ```\n- `arch.html`\n    - a html page containing the diagram and a few actions such as `refresh`, `show diagram source`, and `show integrations json`. Addtionally, it makes all edges clickable, adding the ability to open the souce file where the integration is defined.\n\n    ![Example 01](src/assets/images/example_01.gif)\n- `main.css`\n    - this is the css styles for the page `arch.html`\n- `main.js`\n    - this is the main `js` file which initialize mermaid library, render the diagram, etc.\n\n\n## Service and Integration Attributes\n\n```js\n/**\n * @integraph\n * service: \u003cstring\u003e Service name. e.g Market Place, Payment API\n * icon: \u003cstring\u003e Icon name. e.g. server, database, logos:google-cloud, vscode-icons:file-type-mermaid\n * group: \u003cstring\u003e Group name. e.g. External APIs, Auth Services\n * integrations: \u003cobject[]\u003e list of integrations\n *   - service: \u003cstring\u003e Service name. e.g Market Place, Payment API\n *     edgeDirection: \u003cstring\u003e direction of the edge. e.g. RL, LR, TB, BT (see https://mermaid.js.org/syntax/architecture.html#edge-direction)\n *     group: \u003cstring\u003e Group name. e.g. External APIs, Auth Services\n *     groupEdge: true (see https://mermaid.js.org/syntax/architecture.html#edges-out-of-groups)\n *     arrowedEdge: true (see https://mermaid.js.org/syntax/architecture.html#edges)\n */\n\n```\n\n## Supported languages\n\n### Typescript/javascript\n\n```js\nclass ECommerce {\n    /**\n     * @integraph\n     * service: e-commerce\n     * integrations:\n     *   - service: Payment gateway\n     *     edgeDirection: RL\n     */\n    processsPayment() {\n        // ...\n    }\n}\n```\n\n### Java\n\n```java\npublic class PaymentGateway {\n    /**\n     * @integraph\n     * service: Payment gateway\n     * group: External APIs\n     * integrations:\n     *   - service: Bank API\n     *     edgeDirection: RL\n     *   - service: Fraud Detection\n     */\n    public boolean postTransaction() {\n        // ...\n    }\n}\n```\n\n### Python\n\n```python\n\"\"\"\n@integraph\nservice: Fraud Detection\ngroup: AI Agents\nintegrations:\n  - service: Load AI Models\n    group: AI Agents\n\"\"\"\ndef detectFraud():\n    print(\"all good!\")\n\n```\n\n### Rust\n\n```rust\n// @integraph\n// service: Load AI Models\n// group: AI Agents\n// integrations:\n//   - service: chatgpt\n//\nfn loadModels() {\n    // ...\n}\n\n```\n\n\n# Mermaid Architecture Diagram\n\nhttps://mermaid.js.org/syntax/architecture.html\n\n\n## Take a look at the available icons\n\nhttps://icon-sets.iconify.design/logos/\n\n## Registered icons:\n\nhttps://unpkg.com/@iconify-json/logos@1/icons.json\n\nhttps://unpkg.com/@iconify-json/ix@1.2.0/icons.json\n\nhttps://unpkg.com/@iconify-json/vscode-icons@1.2.3/icons.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilosampaio%2Fintegraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanilosampaio%2Fintegraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilosampaio%2Fintegraph/lists"}