{"id":14544228,"url":"https://github.com/brunofurmon/open-org-chart","last_synced_at":"2025-09-03T12:33:55.857Z","repository":{"id":255504789,"uuid":"849611168","full_name":"brunofurmon/open-org-chart","owner":"brunofurmon","description":"An open-source Org Chart made in react","archived":false,"fork":false,"pushed_at":"2024-09-05T17:43:00.000Z","size":220,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-05T21:17:53.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/brunofurmon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T23:05:54.000Z","updated_at":"2024-09-04T15:33:50.000Z","dependencies_parsed_at":"2024-09-05T21:17:59.876Z","dependency_job_id":"3fcd40c1-92bd-40b5-9cc5-4b5279118b8b","html_url":"https://github.com/brunofurmon/open-org-chart","commit_stats":null,"previous_names":["brunofurmon/open-org-chart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunofurmon%2Fopen-org-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunofurmon%2Fopen-org-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunofurmon%2Fopen-org-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunofurmon%2Fopen-org-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brunofurmon","download_url":"https://codeload.github.com/brunofurmon/open-org-chart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":217701078,"owners_count":16217506,"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":[],"created_at":"2024-09-06T02:00:53.281Z","updated_at":"2024-12-30T16:30:32.346Z","avatar_url":"https://github.com/brunofurmon.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# open-org-chart\n\nAn open-source Org Chart made with [NextJS](https://nextjs.org/) and [d3-org-chart](https://www.npmjs.com/package/d3-org-chart)\n\n\nhttps://github.com/user-attachments/assets/6e30ff9b-b908-4134-89b5-d9b2494ab65f\n\n# Features:\n- Dragable interface\n- User search\n- English/Portuguese\n- Use it with CSV, Google Sheets or Google Admin API (Google Workspace Admin)\n\n\n## Installation\n\n```sh\nmake setup\n```\n\n## Configuration\n\nThe application can be configured by setting environment variables. The default values are set on the `.env.default` file, and you should modify the `.env` file to override them.\n\n| Variable                       | Description                                                                                                     | Default Value                                  |\n| ------------------------------ | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| `CACHE_ENGINE`                 | Cache engine of choice. Can be 'memory' or 'redis'                                                              | `memory`                                       |\n| `CSV_FILE_PATH`                | Path to the CSV file containing the users data. Only used when `USER_BACKEND_MODE` is set to `csv`              | `./csv_sample.csv`                             |\n| `DEBUG`                        | All log lines that match this expression will be thrown in STDOUT (Console).                                    | `*`                                            |\n| `GADMIN_AUTH_CLIENT_SUBJECT`   | An account with permissions to list users from the directory                                                    | `admin@domain.com`                             |\n| `GADMIN_WORKSPACE_CUSTOMER_ID` | Your Google Workspace id ([how to get it](https://support.google.com/a/answer/10070793))                        | `A0123b4c5`                                    |\n| `GADMIN_WORKSPACE_DOMAIN`      | The domain used to filter users from a directory                                                                | `domain.com`                                   |\n| `GSHEETS_API_KEY`              | API key to access the Google Sheets API                                                                         | `no default`                                   |\n| `GSHEETS_SPREADSHEET_ID`       | Id of the Google Sheets document                                                                                | `13epIQsN6DqmAktLCSeIzSYpNR5LzVEnvZ2cbo5-KgyY` |\n| `LOG_LEVEL`                    | The log level of the application. Examples: `info`, `debug`, `error`, `warn`                                    | `info`                                         |\n| `NODE_ENV`                     | The environment the application is running on. Examples: `development`, `production`                            | `development`                                  |\n| `REDIS_URL`                    | Id `CACHE_ENGINE` is set to \"redis\" then the complete URL with protocol, host and port                          | `redis://redis:6379`                           |\n| `REDIS_CONN_TIMEOUT_MS`        | Redis connection timeout (in milliseconds).                                                                     | `5000`                                         |\n| `ROOT_NODE_ID`                 | The id (email) of the root node                                                                                 | `email@domain.com`                             |\n| `SERVER_PORT`                  | The port the application will be listening to.                                                                  | `3000`                                         |\n| `CACHE_TTL_S`                  | Expiration time for users cache entry to be valid (when using memory, cache is perpetual until app termination) | `3600`                                         |\n| `USER_BACKEND_MODE`            | User backend selection. Can be \"csv\", \"googleadmin\" or \"googlesheets\"                                           | `csv`                                          |\n\n## Running\n\n### Development:\n\nFirst of all, install dependencies through your favorite package mananger (yarn is the default)\n\n```sh\nyarn\n```\n\nThe command above will run a server on port 3000 and map port 9229 for debug attaching\n\n```sh\nyarn dev\n```\n\nThis repo comes with [vscode launch file](.vscode/launch.json). Chose a debugging profile and hit F5 to start inspect server or attach through browser.\n\n### Production:\n\nThe present Dockerfile will generate a production optimized build and serve it through 0.0.0.0:3000 for\nthe use to be able to reach it through the host machine against the application container.\n\n```sh\nmake setup\n```\n\nAnd run with\n\n```sh\nmake start\n```\n\n# Integrations Reference\n\nYou can select one of the following integrations to fetch users from:\n\n## CSV\n\n- Set `USER_BACKEND_MODE` to `csv`\n- Use the `csv_sample.csv` file as a template to populate your org with data\n- Set the `CSV_FILE` environment variable to the path of your CSV file if you wish to have a different path and/or name\n\n## Google Admin\n\n- Set `USER_BACKEND_MODE` to `googleadmin`\n- Set the `GADMIN_WORKSPACE_CUSTOMER_ID` to your Google Workspace id ([how to get it](https://support.google.com/a/answer/10070793))\n- Set the `GADMIN_WORKSPACE_DOMAIN` to the domain you want to filter users from\n- Set the `GADMIN_AUTH_CLIENT_SUBJECT` to an account with permissions to list users from the directory (part of GSuite Admins)\n\n## Google Sheets\n\n- Set `USER_BACKEND_MODE` to `googlesheets`\n- Copy this public spreadsheet -\u003e https://docs.google.com/spreadsheets/d/13epIQsN6DqmAktLCSeIzSYpNR5LzVEnvZ2cbo5-KgyY/edit?gid=0#gid=0 and...\n- ...set the `GSHEETS_SPREADSHEET_ID` to the id of the Google Sheets document (part of the URL, as in the example above between `/d/` and `/edit` (may change in the future))\n- Set the `GSHEETS_API_KEY` to the API key to access the Google Sheets API\n\n# Cache Engine\n\nYou can select one of the following cache engines to store users data:\n\n## Memory\n\n- Set `CACHE_ENGINE` to `memory`\n- Set the `CACHE_TTL_S` to the expiration time for users cache entry to be valid (in seconds)\n\n## Redis\n\n- Set `CACHE_ENGINE` to `redis`\n- Set the `REDIS_URL` to the complete URL with protocol, host and port\n- Set the `CACHE_TTL_S` to the expiration time for users cache entry to be valid (in seconds)\n- Set the `REDIS_CONN_TIMEOUT_MS` to the (socket) connection timeout. Ref.: [[1]](https://github.com/redis/node-redis/blob/redis%404.6.7/docs/client-configuration.md) [[2]](https://github.com/redis/node-redis/blob/redis%404.6.7/packages/client/lib/client/socket.ts#L12) [[3]](https://github.com/redis/node-redis/blob/redis%404.6.7/packages/client/lib/client/socket.ts#L56).\n\n## API reference\n\n### GET /[?debug=false]\n\nRenders the organogram page\n\n- _debug_ (default=false): If true, will render an intermediate node containing every account that has no original parent (manager) in the directory\n\n### GET /api/liveness\n\nReturns a liveness check if the application is running.\n\n### GET /api/readiness\n\nReturns a readiness check if cache is running and app is ready to deliver content.\n\n## Improvements (TODO):\n\n- Enable security enforcement\n- Loading indication\n- Better Layout and module separation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunofurmon%2Fopen-org-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunofurmon%2Fopen-org-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunofurmon%2Fopen-org-chart/lists"}