A dynamic Trading Card Game (TCG) web application built with Spring Boot and Thymeleaf.
Chaos & Monkeys allows players to collect, buy, and trade a wide variety of primate-themed cards. You can build custom decks, open booster packs, and optimize your collection while monitoring live server stats.
Designed and developed by Brayan, Adam, Oihan, and Asier.
For comprehensive documentation on the project architecture, features, and database design, please visit our Project Knowledgebase.
- Player Authentication & Profiles: Secure registration and login using jBCrypt. Players can customize their profile and upload avatars.
- Booster Packs: Test your luck by opening card packs with dynamic rarity probabilities. Earn free packs periodically!
- Flash Shop: A live-updating shop environment where players can buy specific cards. The shop inventory rotates based on server-side events.
- Deck Builder: Create, manage, and edit your custom decks using the cards in your collection.
- Card Collection System: Over 100 unique monkey/primate cards with different rarities (Common, Rare, Epic, Legendary, Mythic, and the elusive Arok). Automatic duplicate-selling mechanics built right into the database.
- Economy System: In-game currency ("Coins") to buy packs and individual cards. Contains simulated real-money coin bundles.
- Live Dashboard: Real-time statistics including active players, most/least common cards, and latest additions.
- Backend: Java 25, Spring Boot 4.0.x (WebMVC, JDBC)
- Frontend: HTML5, Thymeleaf, Javascript, Vanilla CSS (styled using Tailwind CSS CLI)
- Database: MySQL (Heavily relies on Stored Procedures, Triggers, and Events)
- Build Tools: Maven & npm (for Tailwind compilation)
- JDK 25 or higher
- Node.js and npm (for managing frontend styling)
- MySQL Server
- Create a MySQL database named
CHAOSMONKEYS. - Execute the provided SQL script
database/Chaos&MonkeysDatabase.sqlto initialize the schema, populate the 100+ cards, insert dummy players, and create the required Stored Procedures, Triggers, and Events. - Keep the MySQL Event Scheduler running (
SET GLOBAL event_scheduler = ON;). This is critical for the shop rotations and free packs. - Verify your database credentials in
src/main/resources/configDB.properties:DB=chaosmonkeys Conn=jdbc:mysql://localhost:3306/chaosmonkeys?serverTimezone=Europe/Madrid&useSSL=false DBUser=root DBPass=YOUR_PASSWORD Driver=com.mysql.cj.jdbc.Driver
- Install frontend UI dependencies:
npm install
- Build the Tailwind CSS (Required if you make changes to HTML/CSS files):
(Use
npm run build:css
npm run dev:cssto watch for file changes during development) - Run the Spring Boot application using the Maven wrapper:
./mvnw spring-boot:run
- Access the application in your browser at
http://localhost:8080.
/src/main/java/com/dami/tcg/controller/: MVC endpoints routing to the views logic./src/main/java/com/dami/tcg/modelo/: Domain objects and standard interfaces with direct JDBC implementations./src/main/resources/templates/: Frontend Thymeleaf HTML views./src/main/resources/static/: Client side JS logic, raw CSS inputs, and game images./database/: Contains the criticalChaos&MonkeysDatabase.sqldump./data/images/players/: Managed external volume allowing safe storage for user avatars outside the classpath.