Group management microservice

Group management microservice

As a graph database Neo4J is 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.

When 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.

This 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.

This service takes advantage from the Neo4J database used by the user management service and adds a "Group" node type. Members can be added to a group by creating a BELONGS_TO relationship between a user and the desired group. Similarly, a user can be made administrator of a group using an ADMINISTRATED_BY relationship.

The group nodes and their relationships are managed by a back-end built using Node.js and express, which exposes a REST API to perform the appropriate operations.

To make group management easier, I developed a companion GUI using Vue.js. The GUI allows the creation and deletion of groups, edition of their details as well as adding and removing members or administrators to them.

Source code

The source code for this project is available on GitHub: