Skip to content

MrPaschenko/sportradar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sportradar Coding Academy Coding Exercise (BE)

Download and Setup

Note: This project uses Docker for containerization. To get Docker, visit Docker Documentation.

  1. Clone this repository.
git clone https://github.com/MrPaschenko/sportradar
  1. Navigate to the sportradar directory.
cd sportradar
  1. Copy .env.example to .env.
cp ./backend/.env.example ./backend/.env
  1. Build and start the Docker containers.
docker-compose up --build
  1. Use
  • Simple frontend .html file is located at ./frontend/index.html. Open it in browser.
  • Open API documentation is available at http://localhost:8000/api (Swagger UI).

Tech Stack Overview

I have chosen the following technologies as I have already worked with most of them during my studies in university.

While I did not specifically work with NestJS and Drizzle ORM before, some of my friends recommended them to me previously, so I decided to give them a try for this project.

I mostly followed official documentations of NestJS and Drizzle ORM to solve the task, but I have also used some blog posts, YouTube videos, and LLMs to help me understand certain concepts better.

More about my use of LLMs can be found in the AI_Reflection.txt file.

Backend:

Database:

Frontend:

Containerization:

Development Tools:

Database Modeling Overview

To store sport events, I have identified the following entities:

  • Events: Main table to store sports events
    • id of type uuid: Primary key
    • start_time of type time: Time when the event starts
    • start_date of type date: Date when the event starts
    • _sport_id of type uuid: Foreign key referencing Sports table
    • _home_team_id of type uuid: Foreign key referencing Teams table
    • _guest_team_id of type uuid: Foreign key referencing Teams table
    • _venue_id of type uuid: Foreign key referencing Venues table
    • status of type smallint: Status of the event
      • 0: Scheduled
      • 1: In Progress
      • 2: Completed
      • 3: Canceled
    • home_score of type int: Score of the home team
    • guest_score of type int: Score of the guest team
  • Sports: Table to store sports information
    • id of type uuid: Primary key
    • name of type text: Name of the sport
    • description of type text: Description of the sport
  • Venues: Table to store venues information
    • id of type uuid: Primary key
    • name of type text: Name of the venue
    • city of type text: City where the venue is located
    • country of type text: Country where the venue is located
    • longitude of type float: Longitude of the venue
    • latitude of type float: Latitude of the venue
    • website_url of type text: Website URL of the venue
  • Teams: Table to store teams information
    • id of type uuid: Primary key
    • name of type text: Name of the team
    • short_name of type text: Short name of the team
    • city of type text: City where the team is based
    • country of type text: Country where the team is based
    • _sport_id of type uuid: Foreign key referencing Sports table
    • website_url of type text: Website URL of the team
    • logo_url of type text: Logo URL of the team

Entity-Relationship Diagram (ERD)

I have created an ERD that includes all the tables, their fields, and relationships. ERD also follows the third normal form of database normalization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors