{"id":22903942,"url":"https://github.com/tracktor/treege","last_synced_at":"2025-05-08T17:03:53.057Z","repository":{"id":46100551,"uuid":"511834864","full_name":"Tracktor/treege","owner":"Tracktor","description":"Form decision tree generator","archived":false,"fork":false,"pushed_at":"2025-03-21T11:56:31.000Z","size":1722,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T17:03:34.763Z","etag":null,"topics":["javascript","react","tree","treege","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tracktor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-07-08T09:17:20.000Z","updated_at":"2025-03-21T11:55:40.000Z","dependencies_parsed_at":"2024-04-18T15:41:11.118Z","dependency_job_id":"5033d9cc-0b25-47bd-90ba-15eb63dd28fe","html_url":"https://github.com/Tracktor/treege","commit_stats":{"total_commits":390,"total_committers":4,"mean_commits":97.5,"dds":"0.17948717948717952","last_synced_commit":"4da2ef2bc316d17c83eed314d4c8c525337253d8"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Ftreege","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Ftreege/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Ftreege/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tracktor%2Ftreege/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tracktor","download_url":"https://codeload.github.com/Tracktor/treege/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112073,"owners_count":21856070,"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":["javascript","react","tree","treege","typescript"],"created_at":"2024-12-14T02:39:33.753Z","updated_at":"2025-05-08T17:03:53.034Z","avatar_url":"https://github.com/Tracktor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"Treege\" src=\"https://user-images.githubusercontent.com/108873902/189673125-5d1fdaf3-82d1-486f-bb16-01b0554bd4f1.png\" style=\"padding: 20px;\" width=\"auto\" height=\"100\" /\u003e\n  \u003cp\u003e\u003cstrong\u003eTreege is a tools for decision tree generator\u003c/strong\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n[![npm version](https://badge.fury.io/js/treege.svg)](https://badge.fury.io/js/treege)\n\n[![Video Thumbnail](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID/0.jpg)](https://user-images.githubusercontent.com/108873902/184317603-61ceafc6-a326-49b2-b0de-ffda9cf9c75e.mov)\n\n- [Installation](#Installation)\n- [Usage](#Usage)\n  - [Options](#Options)\n- [Generate form from Treege data](#Generate-form-from-Treege-data)\n- [Local installation](#local-installation)\n- [Available Scripts](#Available-Scripts)\n    - [yarn dev](#yarn-dev)\n    - [yarn build](#yarn-build)\n    - [yarn preview](#yarn-preview)\n- [Convention](#Convention)\n\n## Installation\n\n```console\nyarn add treege\n```\n\n## Usage\n\n```typescript jsx\nimport { Treege } from \"treege\";\n\nconst App = () =\u003e {\n  return \u003cTreege /\u003e;\n};\n\nexport default App;\n```\n\n### Options\n\n| Props         | Type   | Default   | Required | Detail                                                                                        |\n|---------------|--------|-----------|----------|-----------------------------------------------------------------------------------------------|\n| backendConfig | object | undefined | false    | Backend configuration. Only necessary if you want backend communication.                      |\n| initialTreeId | string | undefined | false    | If provided, this will fetch initial tree id. Cannot provided with `initialTree` in same time |\n| initialTree   | object | undefined | false    | Initial tree data. Cannot provided with `initialTreeId` in same time                          |\n\n\n#### `backendConfig`\n| Props     | Type   | Default   | Required | Detail                                                      |\n|-----------|--------|-----------|----------|-------------------------------------------------------------|\n| baseUrl   | string | undefined | true     | Base url for API communication. ex : https://api.treege.com |\n| authToken | string | undefined | false    | Authentication token                                        |\n| endpoints | object | undefined | false    | Endpoints configuration                                     |\n\n#### `endpoints`\n| Props     | Type   | Default   | Required        | Detail                                                      |\n|-----------|--------|-----------|-----------------|-------------------------------------------------------------|\n| workflow  | string | undefined | \"/v1/workflow\"  | Endpoint for `get/post/patch` single `workflow`             |\n| workflows | string | undefined | \"/v1/workflows\" | Endpoint for get all workflows. It is a array on `workflow` |\n\nBackend model need to be compatible with the following interface:\n\n```typescript\ninterface Workflow {\n  id: string;\n  name: string;\n  description: string;\n  tree: Tree;\n}\n```\n\n`Tree` is a JSON object generated by `Treege` with the following interface:\n\n```typescript\ninterface Tree {\n  name: string;\n  attributes: any;\n  children: Tree[];\n  treeId?: string;\n}\n```\n\n## How use Treege data ?\n\nYou can easily generate a form with the `React library` [treege-consumer](https://github.com/Tracktor/treege-consumer) or use our own application !\n\n## Local installation\n\nClone the repository and install dependencies\n\n```console \nyarn install\n```\nLocally preview production build\n\n## Convention\n\n- [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)\n- [Versioning](https://semver.org)\n- [Conventional Commits](https://www.conventionalcommits.org)\n\n## Type Definitions\n\nThis library uses type definitions from [@tracktor/types-treege](https://www.npmjs.com/package/@tracktor/types-treege)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftracktor%2Ftreege","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftracktor%2Ftreege","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftracktor%2Ftreege/lists"}