Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UEFA Champions League Simulator

A comprehensive Spring Boot web application that simulates the entire UEFA Champions League tournament, from group stage draw to the final match.

Project Overview

This Java-based web application provides a complete simulation of the UEFA Champions League tournament structure. Users can experience the excitement of Europe's premier club football competition through automated match simulations, knockout rounds, and realistic team matchups.

Features

  • Tournament Structure:

    • Complete Champions League format simulation
    • Group stage draw with realistic constraints
    • Knockout rounds: Round of 16, Quarter-finals, Semi-finals, Final
    • Automated match results generation
  • Team Management:

    • Real European club teams with ratings
    • CSV-based team data (country codes, names, rankings)
    • Dynamic team standings calculation
  • Match Simulation:

    • Automated score generation based on team strength
    • Realistic match outcomes
    • Tournament progression tracking
  • Web Interface:

    • Clean, responsive UI with Thymeleaf templates
    • Real-time tournament updates
    • Stadium background for immersive experience
    • Step-by-step tournament progression

Technology Stack

Backend

  • Java 17
  • Spring Boot 2.6.4
    • Spring Web MVC
    • Spring Boot DevTools
  • Maven - Dependency management and build tool

Frontend

  • Thymeleaf - Server-side template engine
  • HTML5 & CSS3
  • Bootstrap (implied from templates)

Data & Libraries

  • OpenCSV 5.6 - CSV file processing for team data
  • H2 Database - In-memory database for runtime
  • iTextPDF 5.0.6 - PDF generation capabilities

Development Tools

  • Spring Boot DevTools - Hot reload during development
  • Maven - Build automation
  • JUnit & Spring Test - Testing framework

Project Structure

uefa_cl_simulator/
 src/
    main/
       java/com/knf/dev/CL_Simulator/
          Application.java              # Spring Boot entry point
          controller/
             MatchController.java      # Match simulation logic
             TeamController.java       # Team management
          entity/
             Match.java                # Match entity
             Team.java                 # Team entity
             TeamStandings.java        # Standings calculation
          service/
              MatchService.java         # Match business logic
              TeamService.java          # Team business logic
       resources/
           application.properties        # App configuration
           data/
              teams.csv                 # Team data (country, name, rating)
           static/
              images/
                  stadium.jpg           # Background image
           templates/                    # Thymeleaf HTML templates
               index.html                # Home page
               team-list.html            # Team overview
               draw.html                 # Group stage draw
               matches.html              # Match results
               knockouts.html            # Knockout overview
               roundOf16.html            # Round of 16
               quarterfinals.html        # Quarter-finals
               semifinals.html           # Semi-finals
               final.html                # Final match
               comman/
                   footer.html           # Shared footer
    test/                                 # Unit tests
 pom.xml                                   # Maven configuration
 .gitignore                                # Git ignore rules
 LICENSE                                   # Project license

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • IDE (IntelliJ IDEA, Eclipse, or VS Code)

Installation

  1. Clone the repository:
git clone https://github.com/BrandyBrandt/uefa-cl-simulator.git
cd uefa-cl-simulator
  1. Build the project:
mvn clean install
  1. Run the application:
mvn spring-boot:run
  1. Open your browser and navigate to:
http://localhost:8080

How to Use

  1. Start Tournament: Navigate to the home page
  2. View Teams: See all participating teams and their ratings
  3. Draw Phase: Simulate the group stage draw
  4. Group Matches: View simulated group stage results
  5. Knockout Rounds: Progress through:
    • Round of 16
    • Quarter-finals
    • Semi-finals
    • Final
  6. View Results: See match outcomes at each stage

Team Data Format

Teams are loaded from teams.csv with the following format:

country_code;team_name;rating
gb-eng;Liverpool FC;2345
es;Real Madrid;2380
de;Bayern Munich;2400
  • country_code: ISO country code (e.g., gb-eng, es, de)
  • team_name: Full team name
  • rating: Team strength rating (higher = stronger)

Architecture

MVC Pattern

  • Model: Entity classes (Team, Match, TeamStandings)
  • View: Thymeleaf templates
  • Controller: Spring MVC controllers (MatchController, TeamController)

Service Layer

  • MatchService: Handles match simulation logic
  • TeamService: Manages team data and CSV parsing

Data Flow

  1. Teams loaded from CSV on startup
  2. Controllers handle HTTP requests
  3. Services process business logic
  4. Views render dynamic content with Thymeleaf

Testing

Run tests with Maven:

mvn test

Building for Production

Create an executable JAR:

mvn clean package
java -jar target/librarymanagementsystem-0.0.1-SNAPSHOT.jar

Key Implementation Details

Match Simulation Algorithm

  • Uses team ratings to calculate match outcomes
  • Probabilistic score generation
  • Home/away considerations (if implemented)

Tournament Bracket Generation

  • Ensures teams from same country don't meet early (if implemented)
  • Follows official UEFA Champions League rules
  • Automatic progression to next rounds

Screenshots

(Tournament simulation interface with stadium background)

Author

Aleksander Brandt

Academic Context

This project was created as part of a Java programming course, demonstrating:

  • Spring Boot application development
  • MVC architecture implementation
  • RESTful controller design
  • Thymeleaf template integration
  • CSV data processing
  • Business logic implementation
  • Object-oriented programming principles

License

See the LICENSE file for details.

Future Enhancements

  • Add user authentication
  • Implement match statistics
  • Add player data and transfers
  • Real-time match commentary
  • Export tournament results to PDF
  • Database persistence for tournament history
  • API endpoints for external integrations
  • Mobile-responsive UI improvements

Contributing

This is an academic project, but suggestions and improvements are welcome!

Contact

For questions or feedback about this project, please reach out through GitHub.


Made with and for football fans everywhere

About

UEFA Champions League Tournament Simulator - Spring Boot web application with match simulation, knockout rounds, and team management

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages