Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

PlaySkyHD/SportSpot-Backend

Repository files navigation

SportSpot

About

SportSpot is a web application designed to manage sports-related activities. It includes various services and components such as a backend, database services, and a REST emulator.

Services

Backend

The backend service is executed in a Docker container and can be accessed at http://localhost:8080.

MongoDB

The MongoDB service is executed in a Docker container and can be accessed at http://localhost:27017.

MariaDB

The MariaDB service is executed in a Docker container and can be reached at http://localhost:8082.
Username: root
Password: secret

Requirements

Installation

  1. Clone the Repository:

    git clone https://github.com/PlaySkyHD/SportSpot-Backend.git
    cd SportSpot-Backend
  2. Create and start the Docker-Container:

    docker-compose up --build -d
  3. Open any browser and open the Swagger-UI:
    http://localhost:8080/swagger

Database

  1. MongoDB

  2. MariaDB

Tests

Requirements

  • DotNet 9
  • Docker

Unit-Tests

Command:

dotnet test SportSpot-Test/SportSpot-Test.csproj -v d

Integration-Tests

You must execute all command with Powershell.

Without OAuth

Command:

  1. Create Dummy-EnviormentVariable:
    Set-Content -Path Subscription.env -Value AZURE_MAPS_SUBSCRIPTION_KEY=Dummy
  2. Start Docker-Container:
    docker compose up --build -d
  3. Execute Test:
    dotnet test Integration-Test/Integration-Test.csproj -v d

With OAuth

Command:

  1. Create Dummy-Environment variable:
    Set-Content -Path Subscription.env -Value AZURE_MAPS_SUBSCRIPTION_KEY=Dummy
  2. Change Environment Variable to execute oauth tests:
    (Get-Content Development.env) -replace '^OAUTH_GOOGLE_USER_INFORMATION_ENDPOINT=.*', 'OAUTH_GOOGLE_USER_INFORMATION_ENDPOINT=http://restemulator:8083/oauth' | Set-Content Development.env
  3. Start Docker Container:
    docker compose up --build -d
  4. Set OAuth-Environment variable and Execute the tests:
    $env:RUN_OAUTH_TEST="true"
    dotnet test Integration-Test/Integration-Test.csproj -v d

License

This project is released under the MIT License. For more information, see the `LICENSE` file.

Contributors 3

  •  
  •  
  •