A comprehensive football ticket booking platform built with Spring Boot and modern web technologies.
- Dynamic League Loading: Leagues are loaded dynamically from the backend API
- League Filtering: Filter events by specific leagues (Premier League, La Liga, Bundesliga, etc.)
- League Details: View detailed information about each league including teams, founding year, and season dates
- League Statistics: Track league performance and event counts
- Event Images: Each event now displays attractive football images from Unsplash
- Image Fallback: Graceful fallback to default styling when images fail to load
- Hover Effects: Smooth image scaling and transition effects on hover
- Responsive Design: Images adapt to different screen sizes
- Modern Card Design: Redesigned event cards with image headers
- League Badges: Visual indicators for different leagues
- Date Badges: Clear date display on event cards
- Team Icons: Visual representation of competing teams
- Smooth Animations: Hover effects and transitions throughout the interface
- League-based Filtering: Filter events by specific leagues
- Date Filtering: Search events by specific dates
- Text Search: Search events by title, description, or venue
- Combined Filters: Use multiple filters simultaneously
- Event Statistics: Total events, upcoming events, available seats, average prices
- League Statistics: Total leagues, active leagues, total teams, total events
- Real-time Updates: Statistics update dynamically based on current data
- Spring Boot 3.x: Main application framework
- Spring Data JPA: Database operations
- Spring Security: Authentication and authorization
- JWT: Token-based authentication
- H2 Database: In-memory database for development
- Maven: Dependency management
- HTML5: Semantic markup
- CSS3: Modern styling with Tailwind CSS
- JavaScript (ES6+): Dynamic functionality
- Responsive Design: Mobile-first approach
- Java 17 or higher
- Maven 3.6 or higher
- Modern web browser
- Clone the repository
git clone <repository-url>
cd Football-Ticket-I- Run the application
mvn spring-boot:run- Access the application
- Open your browser and navigate to
http://localhost:8080 - The application will automatically initialize with sample data
- Open your browser and navigate to
The application comes with pre-loaded sample data including:
- Premier League (England)
- La Liga (Spain)
- Bundesliga (Germany)
- Serie A (Italy)
- Ligue 1 (France)
- UEFA Champions League (Europe)
- 12 sample football matches across all major leagues
- Each event includes attractive images, detailed descriptions, and pricing
- Events are scheduled for upcoming dates
GET /api/events- Get all eventsGET /api/events/featured- Get featured eventsGET /api/events/upcoming- Get upcoming eventsGET /api/events/{id}- Get event by IDGET /api/events/league/{league}- Get events by leagueGET /api/events/search- Search eventsGET /api/events/stats- Get event statistics
GET /api/leagues- Get all leaguesGET /api/leagues/active- Get active leaguesGET /api/leagues/{id}- Get league by IDGET /api/leagues/search- Search leaguesGET /api/leagues/{id}/events/count- Get event count by league
async function loadLeagues() {
try {
const response = await fetch(`${API_BASE_URL}/leagues`);
const leagues = await response.json();
populateLeagueFilter(leagues);
} catch (error) {
// Fallback to static leagues
populateLeagueFilter(getStaticLeagues());
}
}function displayEvents(events) {
return events.map(event => `
<div class="match-card">
<div class="relative h-48">
${event.imageUrl ? `
<img src="${event.imageUrl}" alt="${event.title}"
class="w-full h-full object-cover transition-transform duration-300 hover:scale-110">
` : `
<div class="w-full h-full bg-gradient-to-r from-blue-600 to-blue-800">
<!-- Fallback content -->
</div>
`}
</div>
</div>
`).join('');
}@Entity
public class Event {
private Long id;
private String title;
private String description;
private String venue;
private LocalDateTime eventDate;
private Integer totalSeats;
private BigDecimal price;
private String imageUrl; // New field for event images
private League league;
}@Entity
public class League {
private Long id;
private String name;
private String description;
private String country;
private Integer foundedYear;
private String logoUrl;
private String bannerUrl;
private Integer totalTeams;
private String seasonStart;
private String seasonEnd;
private LeagueStatus status;
}- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please contact:
- Email: aekmohop@gmail.com
FootballTix - Sui