In cooperativism, each member has one vote and decisions are taken in assemblies, by voting.
From there, you need to build a backend solution to manage these voting sessions.
This solution must run in the cloud and provide the following functionality through a REST API.
- Register a new agenda;
- Open a voting session on an agenda (the voting session must be open for a specified time in the opening call or 1 minute by default);
- Receive votes from members on agendas (votes are only Yes/No. Each member is identified by a unique id and can only vote once per agenda);
- Count the votes and give the result of the vote on the agenda.
- Gradle 7.4.2
- JDK 17
- Kotlin 1.6.10
- Docker
- Docker Compose
- Vession validity must be sent in utc
- Create a branch from main
- Open a PR and wait for approval to merge
- After merged into the master, generate a tag following semantic versioning, to learn more, go to link
- Create a folder called
rabbitmq
in the project root, as shown below:
- Run the command below in the project root, it will create an instance of MongoDB and Rabbitmq in the machine's docker.
docker-compose up -d
- Add the following environment variables, as per print:
MONGO_STAGING_USERNAME=admin
MONGO_STAGING_PASSWORD=admin
RABBITMQ_STAGING_USERNAME=admin
RABBITMQ_STAGING_PASSWORD=admin
- Add the following command in VMOptions, as print:
-Dspring.profiles.active=staging
http://localhost:8080/
http://localhost:8080/swagger-doc/swagger-ui.html
Collection is located inside the /collectionPostman folder