Giter Club home page Giter Club logo

membership-management's Introduction

Membership Management project


Overview

The MembershipManagement project provides a way to manage teams, users and their memberships.

This project is developed by Pierre Bouillon and Victor Varnier

It is split among three sub-projects:

  • The web API, which exposes the managed resources through a web REST API,
  • A logging client, which is logging every operation performed on the API,
  • A monitoring client, which is displaying the count, in real time, of the resources managed by the API.

Installation

There is several ways of running the project:

Dockerized with docker-compose

Run the Docker stack

You can deploy the whole application stack (RabbitMQ, the API and the two clients) using the provided docker-compose.yml.

To do so, ensure that your docker daemon is running and then type the following:

~$ docker-compose up -d --build

This will build the images and run them in the background.

You can then reach the containers from the docker Desktop application or by seeing their logs using

~$ docker logs CONTAINER_ID

As for the logging client, you can open a terminal in the container and navigate to the log file using the following command:

~$ docker exec -it CONTAINER_ID bash

Run the API test script

You can then run the Python script to test the projects:

~$ python ./tools/api-requests/api-requests.py

More information about the Python script are available in its README

Natively with powershell

Under tools/ you will find a PowerShell script that will run the whole stack and a script to test the API:

~$ ./tools/local-run.ps1

If you chose to use this solution, you will have to specify the RabbitMQ settings in the application.properties of each project

The script will open three new terminals, with each one of them running a Spring application from the project (the API, the monitoring client and the logging client).

You will then see the python script logging actions in the console, which correspond to the API calls it is performing.

More information about the Python script are available in its README

If you are experiencing an issue with your Java path, you may want to check the configuration at the top of the PowerShell script

From the top-level folder with the Makefile

If you have make installed, you can use the commands provided in the Makefile:

  • make docker-run will build and run the whole docker stack along with the Python script to test the API
  • make docker-stop will gracefully stop and remove the docker stack
  • make install will install the needed dependencies of the project
    (especially the ones needed for the Python script)
  • make run will run the PowerShell script aforementioned;

Structure

The overall architecture and the projects are structured as defined by the following picture:

Structure

The API is managing its resources and can be reached using the generated Swagger UI (see the API's documentation).

Whenever an operation is performed on it, the API will send a message to the RabbitMQ broker on a specific topic. The logger and the monitoring client are both listening to the broker on dedicated queues.

When receiving a message, the logging client will store a log of the operation performed both in the console and in a file. For the monitoring client, it will dynamically update the count of the users and the teams stored in the database of the API.

Pipelines

In order to continuously check the consistency and the correctness of our code, we set up a continuous integration process with GitLab CI which can be found here.

The CI is building all the projects using Gradle and JRE 15, and then running the unit tests. Integration tests are available but should be run locally, with your own RabbitMQ instance up and running. A docker-compose file is available to run the development stack.

membership-management's People

Contributors

pbouillon avatar vvarnier avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.