{"id":21326343,"url":"https://github.com/maximemoreillon/group_manager","last_synced_at":"2025-07-12T07:30:30.578Z","repository":{"id":42238457,"uuid":"253669581","full_name":"maximemoreillon/group_manager","owner":"maximemoreillon","description":"A NodeJS application to manage groups of users in a Neo4J database","archived":false,"fork":false,"pushed_at":"2024-09-16T05:51:50.000Z","size":1016,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-17T01:30:02.152Z","etag":null,"topics":["express","neo4j","nodejs"],"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/maximemoreillon.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":"2020-04-07T02:43:53.000Z","updated_at":"2024-09-16T05:51:54.000Z","dependencies_parsed_at":"2024-02-19T02:29:33.651Z","dependency_job_id":"cc23fba0-0c3e-4f5d-8279-ef1dfbdc83dc","html_url":"https://github.com/maximemoreillon/group_manager","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximemoreillon%2Fgroup_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximemoreillon%2Fgroup_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximemoreillon%2Fgroup_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximemoreillon%2Fgroup_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximemoreillon","download_url":"https://codeload.github.com/maximemoreillon/group_manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225802657,"owners_count":17526452,"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":["express","neo4j","nodejs"],"created_at":"2024-11-21T21:09:19.214Z","updated_at":"2024-11-21T21:09:19.841Z","avatar_url":"https://github.com/maximemoreillon.png","language":"TypeScript","readme":"# Group manager\n\n[![pipeline status](https://gitlab.com/moreillon_k8s/group-manager/group_manager_neo4j/badges/master/pipeline.svg)](https://gitlab.com/moreillon_k8s/group-manager/group_manager_neo4j)\n[![coverage report](https://gitlab.com/moreillon_k8s/group-manager/group_manager_neo4j/badges/master/coverage.svg)](https://gitlab.com/moreillon_k8s/group-manager/group_manager_neo4j)\n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/moreillon)](https://artifacthub.io/packages/search?repo=moreillon)\n\nAs a graph database Neo4jis a great choice to manage highly relational data. On the other side, a great number of applications feature at least some form of user management system. With Neo4j, those users can be store as nodes and connected to other items via relationships. A typical example would be a blog, where both articles and users are individual nodes while authorships are represented by a relationship.\n\nWhen dealing with a large number of users, it can become convenient to arrange those in groups. Here, groups too can be represented as nodes and the membership of a user by a relationship. However, building group management logic from scratch for every application would be tedious.\n\n![Example graph](docs/6149cfd89a075fff8259b929.png)\n\nThis microservice, named Group manager, proposes a solution to this problem by offering just the generic logic to handle groups and their relationships, making it easy to integrate in a microservice architecture, alongside other services managing Neo4j records.\n\nThe application is built using Node.js and the Express framework.\n\nAn example of application relying on Group manager is [申請マネージャ](https://github.com/jtekt/web-based-approval-system), A web based approval system for application forms and other documents\n\nFor more information, please visit the project page [here](https://articles.maximemoreillon.com/articles/398)\n\n## API\n\n### Groups\n\n| Endpoint                    | Method | query/body | Description                                                          |\n| --------------------------- | ------ | ---------- | -------------------------------------------------------------------- |\n| /v3/groups/                 | GET    | tbd        | Returns list of groups                                               |\n| /v3/groups/                 | GET    | tbd        | Returns list of groups                                               |\n| /v3/groups/{group_id}       | GET    | -          | Returns information about the group corresponding to the provided ID |\n| /v3/groups/{group_id}       | PATCH  | properties | Updates properties of a group                                        |\n| /v3/groups/{group_id}       | DELETE | -          | Deletes a group                                                      |\n| /v3/groups/{group_id}/join  | POST   | -          | Join a group                                                         |\n| /v3/groups/{group_id}/leave | POST   | -          | leave a group                                                        |\n\n### Subgroups\n\n| Endpoint                                   | Method | query/body | Description                                                          |\n| ------------------------------------------ | ------ | ---------- | -------------------------------------------------------------------- |\n| /v3/groups/{group_id}/groups               | GET    | -          | Returns the groups belonging to the group with the given ID          |\n| /v3/groups/{group_id}/groups/direct        | GET    | -          | Returns the groups directly belonging to the group with the given ID |\n| /v3/groups/{group_id}/parent_groups        | GET    | -          | Returns the groups to which the group with the given ID belongs      |\n| /v3/groups/{group_id}/groups/{subgroup_id} | POST   | -          | Puts a group into another                                            |\n| /v3/groups/{group_id}/groups/{subgroup_id} | DELETE | -          | Removes a subgroup from a group                                      |\n\n### Members\n\n| Endpoint                                | Method | query/body | Description                                                                    |\n| --------------------------------------- | ------ | ---------- | ------------------------------------------------------------------------------ |\n| /v3/groups/none/members                 | GET    | -          | Returns users without a group                                                  |\n| /v3/groups/{group_id}/members           | GET    | -          | Returns the users belonging to the group with the given ID                     |\n| /v3/groups/{group_id}/members/{user_id} | POST   | -          | Adds a user to the group                                                       |\n| /v3/groups/{group_id}/members/{user_id} | DELETE | -          | Removes a user from the group                                                  |\n| /v3/members/groups                      | GET    | user_ids   | Gets the groups of multiple users identrified by their respective IDs          |\n| /v3/members/{member_id}/groups          | GET    | -          | Gets the groups of a member, here, use 'self' as member_id of one's own groups |\n\n### Administrators\n\n| Endpoint                                                | Method | query/body | Description                                                                                |\n| ------------------------------------------------------- | ------ | ---------- | ------------------------------------------------------------------------------------------ |\n| /v3/groups/{group_id}/administrators                    | GET    | -          | Returns the administrators of the group with the given ID                                  |\n| /v3/groups/{group_id}/administrators/{administrator_id} | POST   | -          | Adds an administrator to the group                                                         |\n| /v3/groups/{group_id}/administrators/{administrator_id} | DELETE | -          | Removes an administrator from the group                                                    |\n| /v3/administrators/{administrators_id}/groups           | GET    | -          | Gets the groups administrated by a user, here, use 'self' as member_id of one's own groups |\n\n### Pagination\n\nTo limit the size of responses, groups, members and administrators are provided in a paginated manner. The page size and index of the first item on the page can be defined using the query parameters 'batch_size' and 'start_index' respectively.\n\n## Environment variables\n\n| Variable            | Description                                                                             |\n| ------------------- | --------------------------------------------------------------------------------------- |\n| APP_PORT            | Application that the app listens on                                                     |\n| NEO4J_URL           | URL of the Neo4j database                                                               |\n| NEO4J_USERNAME      | Username for the Neo4j database                                                         |\n| NEO4J_PASSWORD      | Password for the Neo4j database                                                         |\n| OIDC_JWKS_URI       | URI for the JWKS of by the OAuth provider                                               |\n| IDENTIFICATION_URL  | URL of the user identification endpoint (legacy)                                        |\n| DB_USER_ID_FIELDS   | Fields of a Neo4J user record that can be used as identifier                            |\n| AUTH_USER_ID_FIELDS | Fields of the user profile provided by the auth provider that can be used as identifier |\n\n## Docker image\n\n[![dockeri.co](https://dockeri.co/image/moreillon/group-manager)](https://hub.docker.com/r/moreillon/group-manager)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximemoreillon%2Fgroup_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximemoreillon%2Fgroup_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximemoreillon%2Fgroup_manager/lists"}