Note: This project uses Docker for containerization. To get Docker, visit Docker Documentation.
- Clone this repository.
git clone https://github.com/MrPaschenko/sportradar- Navigate to the
sportradardirectory.
cd sportradar- Copy
.env.exampleto.env.
cp ./backend/.env.example ./backend/.env- Build and start the Docker containers.
docker-compose up --build- 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).
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:
To store sport events, I have identified the following entities:
Events: Main table to store sports eventsidof typeuuid: Primary keystart_timeof typetime: Time when the event startsstart_dateof typedate: Date when the event starts_sport_idof typeuuid: Foreign key referencingSportstable_home_team_idof typeuuid: Foreign key referencingTeamstable_guest_team_idof typeuuid: Foreign key referencingTeamstable_venue_idof typeuuid: Foreign key referencingVenuestablestatusof typesmallint: Status of the event0: Scheduled1: In Progress2: Completed3: Canceled
home_scoreof typeint: Score of the home teamguest_scoreof typeint: Score of the guest team
Sports: Table to store sports informationidof typeuuid: Primary keynameof typetext: Name of the sportdescriptionof typetext: Description of the sport
Venues: Table to store venues informationidof typeuuid: Primary keynameof typetext: Name of the venuecityof typetext: City where the venue is locatedcountryof typetext: Country where the venue is locatedlongitudeof typefloat: Longitude of the venuelatitudeof typefloat: Latitude of the venuewebsite_urlof typetext: Website URL of the venue
Teams: Table to store teams informationidof typeuuid: Primary keynameof typetext: Name of the teamshort_nameof typetext: Short name of the teamcityof typetext: City where the team is basedcountryof typetext: Country where the team is based_sport_idof typeuuid: Foreign key referencingSportstablewebsite_urlof typetext: Website URL of the teamlogo_urlof typetext: Logo URL of the team
I have created an ERD that includes all the tables, their fields, and relationships. ERD also follows the third normal form of database normalization.
