Skip to content

Latest commit

 

History

History
179 lines (112 loc) · 7.54 KB

README.md

File metadata and controls

179 lines (112 loc) · 7.54 KB

Enterprise Development Project - group 10

Subject: Football

Team members:

  • Sohaib Ibenhajene
  • Jarne Dirken

Contents

Introduction

In our project we developed a Java backend achitecture of the basis of microservices. The acrhitecture includes:

  • 4 microservices
    • Two MySQL backend microservices
    • Two MongoDB backend microservices
  • Github Actions pipline
  • Api related stuff
  • Local hosting (Okteto didn't work anymore)

Our story is that we want to let people see football matches, clubs, players and transfers.

Architecture

Our application has the following achitecture: Architecture Image

Github Repositories

CI-CD pipeline

GitHub Actions

All code and version control is handled by GitHub actions. A GitHub workflow is made made. This includes building and uploading a docker container of each service.

GitHub Actions Image

Docker Compose

This Docker Compose file serves as a blueprint for orchestrating a network of connected services within a containerized environment. It essentially defines a set of containers, each encapsulating a specific component of a larger application. The containers include databases like MongoDB and MySQL, as well as custom services for handling match, player, club, and transfer-related data.

Docker Compose Image

Docker Desktop

Because the okteto hosting didn't work at the time of making this project. We did everything local and used docker desktop.

Docker Desktop Image

0Auth2 Security

We secrured our API gateway with 0Auth2. This way you can only do the basic function without being autorized (like view all the upcomming matches, view all the clubs and players). But it's not possible for anyone to delete a club, edit, etc... .

0Auth2 Security Image 0Auth2 Security Image

without key

Here I try calling one club without being authorised: 0Auth2 Image As you can see this didn't work. Now let's try the same call but with our 0auth2 token.

with key

Here you can see that the request did indeed work as expected. 0Auth2 Image

Postman

Here you can view all of our requests.

Club requests

Get All Clubs GetAllClubs Image

Get Club by name GetOneClub Image

Create a Club CreateClub Image

The Club has now been created CreatedClub Image

Edit Club EditClub Image

The second Club has now been updated EditedClub Image

Match requests

Get All Matches GetAllMatches Image

Create a Match CreateMatch Image

The Match has now been created CreatedMatch Image

Delete A Match DeleteMatch Image

Player requests

Get All Players GetAllPlayers Image

Get Specific PlayerList GetPlayerList Image

Get One Player GetOnePlayer Image

Create a Player CreatePlayer Image

The Player has now been created CreatedPlayer Image

Delete A Player DeletePlayer Image

Transfer requests

Create a Transfer CreateTransfer Image

Get All Transfers GetAllTransfers Image

Unit tests

Of course we used Unit tests. Here you can see that we did unit tests in all of our services. These tests have a 100% coverage on our service classes.

Club service

Club Unit Test Image

Match service

Match Unit Test Image

Player service

Player Unit Test Image

Transfer service

Transfer Unit Test Image

Conclusion

We found this project to be really challenging, but at the same time also very fun. We gained a lot of new knowledge from this project.

#itfactory #thomasmore