Skip to content

Backend repository for FIPost, it is a fast and efficient opensource internal post website and app for Fontys

License

Notifications You must be signed in to change notification settings

FontysIPost/FIPost

Repository files navigation

Build microservices SonarCloud analysis

📬 Backend - Fontys Internal Post (FIPost)

Backend repository for Frontend, this repository contains multiple API which is responsible for different functionality in a microservice architecture. The frontend communicates with the api-gateway to reroute the necessary microservice.

✉️ Contact Us

Mandatory to join the Discord server! The project overseer will guide you to setup the project if needed and other further inquiries. There were some bad documentations how to kickstart this project so this ends now, rapid development for 2023FALL+ made by 2023SPRING students.

⚒️ Development

📐Stack

  • .NET 6
  • IIS(Internet Information Services)

📁 Structure & services

🏁 Getting started:

  1. Clone the repository:
git clone --recursive https://github.com/FontysIPost/FIPost.git

  1. Setting up MSSQL Database:

Create a MSSQL Database in Fontys Portal website > Selfservice portal > MSSQL database and navigate to four appsettings.Development.json in ./locatie-service, ./pakketservice, ./authenthication-service and ./EmployeeService and put your credentials:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "ConnectionString": "Server=;Database=;User Id=;Password=;"
}

OPTIONAL:

Or you can also create a local mssql db in Docker (For outside developers or setting up faster), first pull it:

docker pull mcr.microsoft.com/mssql/server:2019-latest

Run the container:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Ipost11%" -p 1433:1433 -d --name MSSQLIPost mcr.microsoft.com/mssql/server:2019-latest

Use this connectionString:

Server=localhost,1433;Database=master;User Id=sa;Password=Ipost11%;

  1. Run the migrations:

in EmployeeService, Locatie-service, and pakketservice with the following command in the terminal:

dotnet ef database update

In order to use the functionality in the application, you have to populate 5 out of 6 tables (buildings, cities, Package, Person, and rooms but not Ticket), in the table Person, 0 = Admin and 1 = Employee for different access. The app will crash without these data.

See DATABASE wiki how you can populate the exact data into the 5 tables.


  1. Run all the following services, EmployeeService: IIS Express, PakketService: IIS Express, LocatieService: IIS Express, authentication-service: IIS Express and api-gateway: IIS Express with the frontend running.

Everything should work and ready to develop!

Don't forget to run the frontend of FIPost.