{"id":32232465,"url":"https://github.com/csicar/purescript-generic-graphviz","last_synced_at":"2025-10-22T11:59:13.898Z","repository":{"id":58231130,"uuid":"111459460","full_name":"csicar/purescript-generic-graphviz","owner":"csicar","description":"library for generating graphviz visualizations using purescript generics","archived":false,"fork":false,"pushed_at":"2021-03-27T14:50:31.000Z","size":86,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T11:58:56.616Z","etag":null,"topics":["dot-lang","graphviz","purescript","purescript-generics"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/csicar.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":"2017-11-20T20:28:34.000Z","updated_at":"2023-11-24T12:16:03.000Z","dependencies_parsed_at":"2022-08-30T20:01:46.504Z","dependency_job_id":null,"html_url":"https://github.com/csicar/purescript-generic-graphviz","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/csicar/purescript-generic-graphviz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csicar%2Fpurescript-generic-graphviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csicar%2Fpurescript-generic-graphviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csicar%2Fpurescript-generic-graphviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csicar%2Fpurescript-generic-graphviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csicar","download_url":"https://codeload.github.com/csicar/purescript-generic-graphviz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csicar%2Fpurescript-generic-graphviz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280431506,"owners_count":26329786,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dot-lang","graphviz","purescript","purescript-generics"],"created_at":"2025-10-22T11:59:12.256Z","updated_at":"2025-10-22T11:59:13.890Z","avatar_url":"https://github.com/csicar.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Generic Graphviz\n====\n\ndocumentation can be found on [pursuit](https://pursuit.purescript.org/packages/purescript-generic-graphviz/)\n\nconsists of 3 parts (which probably *now are* seperate modules..):\n\n1. Dot-Lang typed representation and Dot-Lang code-generator. [here](https://github.com/csicar/purescript-dotlang)\n2. Generic Graph generator (takes an arbituary ADT and generates a graph for it) (this repository)\n3. Bindings for Graphviz [here](https://github.com/csicar/purescript-graphviz)\n\nExample\n---\n\n```purescript\n-- your data type\ndata Tree' a = Leaf' | Node' (Tree' a) a (Tree' a)\n\n-- derive generic\nderive instance treeGeneric :: Generic (Tree' a) _\n\n-- create instances for the needed type classes\ninstance treeEdges :: Edges a =\u003e Edges (Tree' a) where\n  edges x = genericEdges x\ninstance treeDotRepr ::  Edges a =\u003e GraphRepr (Tree' a) where\n  toGraph = genericToGraph\n\nexample :: String\nexample = renderToSvg Dot $ toGraph $\n  Node' Leaf' 3 (Node' (Node' Leaf' 5 Leaf') 4 Leaf')\n-- example = \"...\u003csvg\u003e\u003cg\u003e...\u003c/g\u003e...\u003c/svg\u003e...\"\n```\n`example` will be:\n\n\n![screenshot](screenshot.png)\n\nsee [full example](./test/Example.purs) for imports\n\nsee [todo mvc example](https://github.com/csicar/generic-graphviz-todomvc) for a larger example\n\nFeatures\n--------\n\n- generic graph generation\n- after `npm install`: usable from nodejs backend\n- graphviz-images can be rendered to Chrome's WebDev Console (using console.log)\n\nTODOs\n-----\n\n- Refactor into multiple libraries\n- support entire DOT language in data model\n- allow custom edges in GenericGraph\n- add effects to console.image\n- move viz.js call into a WebWorker\n\nTesting\n-------\n\nrun tests:\n```bash\n$ pulp test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsicar%2Fpurescript-generic-graphviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsicar%2Fpurescript-generic-graphviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsicar%2Fpurescript-generic-graphviz/lists"}