Find a file
Phan Huy Tran 4e8530c861
All checks were successful
Release / Release (push) Successful in 49s
Merge pull request 'refactor: refactor state logic' (!106) from refactor/state-logic into main
Reviewed-on: #106
2025-03-27 17:25:00 +00:00
.gitea/workflows chore(deps): update dorny/paths-filter action to v3 2025-03-13 10:02:48 +00:00
backend refactor: refactor state logic 2025-03-27 15:46:07 +01:00
docker chore(deps): update postgres docker tag to v17 2025-03-13 06:44:49 +00:00
frontend feat(blackjack): implement game start and controls functionality 2025-03-26 15:30:55 +01:00
.gitignore refactor: update .gitignore and optimize Angular config (!7) 2025-02-05 10:37:21 +00:00
CLAUDE.md docs: add Claude Assistant Guide to documentation 2025-03-12 14:07:53 +01:00
LICENSE feat: add MIT License and update README for clarity 2025-03-12 14:29:21 +01:00
README.md Update README.md 2025-03-27 11:59:49 +00:00
release.config.cjs Update release.config.cjs 2025-03-12 12:00:22 +00:00
renovate.json chore(deps): add renovate.json 2025-03-12 13:01:23 +00:00

Casino Gaming Platform

An online gaming platform offering various casino-style games with virtual currency support. This project features a modern tech stack with Angular frontend, Spring Boot backend, and complete user authentication.

Please refer to our Style Guide for design guidelines and component standards.

Features

  • Multiple casino games: Poker, Blackjack, Slots, Plinko, Liars Dice, and Lootboxes
  • User authentication and account management via Keycloak
  • Virtual currency deposit system using Stripe payments
  • Transaction history tracking
  • Responsive modern UI built with Angular and TailwindCSS

Tech Stack

Frontend

  • Angular 18
  • TailwindCSS
  • Keycloak integration
  • Stripe payment integration

Backend

  • Spring Boot (Java)
  • PostgreSQL database
  • Keycloak for authentication/authorization
  • Stripe API for payment processing

Infrastructure

  • Docker containerization for all services

Getting Started

Prerequisites

Setting Up the Environment

  1. Clone the repository
git clone <repository-url>
cd casino
  1. Start the Docker services
cd docker
docker-compose up -d

This will start:

  • PostgreSQL database
  • Keycloak authentication server

Running the Backend

  1. Navigate to the backend directory
cd backend
  1. Start the Spring Boot application
./gradlew bootRun

You may optionally install watchexec and use this command to autorecompile the backend on file changes:

watchexec -r -e java ./gradlew :bootRun

The backend will be available at:

Running the Frontend

  1. Navigate to the frontend directory
cd frontend
  1. Install dependencies
npm install
  1. Start the development server
npm run dev

The frontend will be available at http://localhost:4200

Local Stripe integration

  1. Install the Stripe CLI https://stripe.com/docs/stripe-cli

  2. Login to the casino stripe account

stripe login --api-key <casino-stripe-secret-key>
  1. Start webhook forwarding
stripe listen --forward-to localhost:8080/webhook

Database Management

Postgres Management

Database cleanup (if needed)

cd docker
docker-compose down
docker volume rm local_lf8_starter_postgres_data
docker-compose up -d

Setting up IntelliJ Database View

  1. Run the Docker container with PostgreSQL database
  2. Open application.properties in the resources folder and copy the database URL
  3. Open the Database tab in IntelliJ
  4. Click on the database icon with key in the Database toolbar
  5. Click the plus sign and select "Datasource from URL"
  6. Paste the DB URL and select PostgreSQL driver, confirm with OK
  7. Enter username lf8_starter and password secret
  8. In the Schemas tab, uncheck all options and only check lf8_starter_db and public

Authentication

The application uses Keycloak for authentication. To get a bearer token for API testing:

  1. Open requests/getBearerToken.http
  2. Click the green arrow next to the request
  3. Copy the access_token from the response

Development Guidelines

Commit Message Format

We follow semantic commit messages to maintain clear project history.

Format: <type>(<scope>): <subject>

Where <type> is one of:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Formatting, missing semicolons, etc; no code change
  • refactor: Code refactoring
  • test: Adding or refactoring tests
  • chore: Updating build tasks, etc; no production code change

Examples:

feat: add user balance display
fix(auth): resolve token expiration issue
docs: update API documentation

References:

License

This project is licensed under the MIT License - see the LICENSE file for details.