REST-backend is a RESTful API that serves as a backend for a public message board.
It supports the simple CRUD operations (C)reate, (R)ead, (U)pdate, (D)elete:
A user can create a message in the service
A user can modify their own messages
A user can delete their own messages
A user can view all messages in the service
Assumption: Validation of username/ID is assumed to have been validated by another REST endpoint.
The API uses Python and MongoDB, it uses the following dependencies:
Thanks to Flask-RestPlus we get a nice Swagger UI for easy visualisation on the
API as well as documentation and being able to test out the API.

You will need both Docker and Docker-compose:
Arch Linux:
sudo pacman -S docker
systemctl start docker.service
systemctl enable docker.service
groupadd docker
gpasswd -a user docker [replace user with your username]
relogin to apply the group change
Ubuntu: Docker offical ubuntu guide
Arch Linux & Ubuntu:
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Clone the repo:
git clone https://github.com/Brew8it/REST-backend.git && cd REST-backend
Build and start our docker image and start our mongodb service
sudo docker-compose up --build
You will now be able to navigate to the following url and start using swagger UI test the API from there
http://localhost:4000/api/
A user can create a message in the service
curl -X POST "http://localhost:4000/api/Message/" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"user_id\": 0, \"msg_id\": 0, \"message\": \"string\"}"
A user can modify their own messages
curl -X PUT "http://localhost:4000/api/Message/" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"user_id\": 0, \"msg_id\": 0, \"message\": \"string\"}"
A user can delete their own messages
curl -X DELETE "http://localhost:4000/api/Message/" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"user_id\": 0, \"msg_id\": 0, \"message\": \"string\"}"
A user can view all messages in the service
curl -X GET "http://localhost:4000/api/Message/" -H "accept: application/json"