Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
8b2d8f7e05 | |||
c73a1a3af2 | |||
9fbb339261 |
2 changed files with 184 additions and 24 deletions
41
CLAUDE.md
Normal file
41
CLAUDE.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Casino Gaming Platform - Claude Assistant Guide
|
||||
|
||||
## Build Commands
|
||||
|
||||
### Frontend
|
||||
- Build: `bun run build` or `bunx @angular/cli build`
|
||||
- Start dev server: `bun run start` or `bunx @angular/cli serve --proxy-config src/proxy.conf.json`
|
||||
- Format: `bun run format` or `prettier --write "src/**/*.{ts,html,css,scss}"`
|
||||
|
||||
### Backend
|
||||
- Build: `./gradlew build` or `./gradlew clean build`
|
||||
- Run: `./gradlew bootRun`
|
||||
- Generate JAR: `./gradlew bootJar`
|
||||
|
||||
## Lint/Test Commands
|
||||
|
||||
### Frontend
|
||||
- Lint: `bun run lint` or `ng lint`
|
||||
- Test all: `bun run test` or `bunx @angular/cli test`
|
||||
- Test single file: `bunx @angular/cli test --include=path/to/test.spec.ts`
|
||||
|
||||
### Backend
|
||||
- Test all: `./gradlew test`
|
||||
- Test single class: `./gradlew test --tests "FullyQualifiedClassName"`
|
||||
- Checkstyle: `./gradlew checkstyleMain checkstyleTest`
|
||||
|
||||
## Code Style Guidelines
|
||||
|
||||
### Frontend (Angular)
|
||||
- Use PascalCase for class names with suffixes (Component, Service)
|
||||
- Use kebab-case for component selectors with "app-" prefix
|
||||
- File naming: `name.component.ts`, `name.service.ts`
|
||||
- Import order: Angular → third-party → local
|
||||
- Use RxJS catchError for HTTP error handling
|
||||
|
||||
### Backend (Java)
|
||||
- Use PascalCase for classes with descriptive suffixes (Controller, Service, Entity)
|
||||
- Use camelCase for methods and variables
|
||||
- Domain-driven package organization
|
||||
- Prefix DTOs with domain and suffix with "Dto"
|
||||
- Use Spring's global exception handling with custom exceptions
|
167
README.md
167
README.md
|
@ -1,34 +1,153 @@
|
|||
# How to: Semantic Commit Messages
|
||||
# Casino Gaming Platform
|
||||
|
||||
See how a minor change to your commit message style can make you a better programmer.
|
||||
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.
|
||||
|
||||

|
||||
|
||||
## 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
|
||||
* [Docker](https://docs.docker.com/get-docker/)
|
||||
* [Docker Compose](https://docs.docker.com/compose/install/) (included with Docker Desktop for Windows and Mac)
|
||||
* Java JDK 17+
|
||||
* Node.js 18+
|
||||
|
||||
### Setting Up the Environment
|
||||
|
||||
1. Clone the repository
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd casino
|
||||
```
|
||||
|
||||
2. Start the Docker services
|
||||
```bash
|
||||
cd docker
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
This will start:
|
||||
- PostgreSQL database
|
||||
- Keycloak authentication server
|
||||
|
||||
### Running the Backend
|
||||
|
||||
1. Navigate to the backend directory
|
||||
```bash
|
||||
cd backend
|
||||
```
|
||||
|
||||
2. Start the Spring Boot application
|
||||
```bash
|
||||
./gradlew bootRun
|
||||
```
|
||||
|
||||
The backend will be available at:
|
||||
- API endpoint: http://localhost:8080
|
||||
- Swagger documentation: http://localhost:8080/swagger
|
||||
|
||||
### Running the Frontend
|
||||
|
||||
1. Navigate to the frontend directory
|
||||
```bash
|
||||
cd frontend
|
||||
```
|
||||
|
||||
2. Install dependencies
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Start the development server
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
The frontend will be available at http://localhost:4200
|
||||
|
||||
## Database Management
|
||||
|
||||
### Postgres Management
|
||||
|
||||
#### Database cleanup (if needed)
|
||||
```bash
|
||||
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>`
|
||||
|
||||
`<scope>` is optional
|
||||
|
||||
## Example
|
||||
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 hat wobble
|
||||
^--^ ^------------^
|
||||
| |
|
||||
| +-> Summary in present tense.
|
||||
|
|
||||
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
|
||||
feat: add user balance display
|
||||
fix(auth): resolve token expiration issue
|
||||
docs: update API documentation
|
||||
```
|
||||
|
||||
More Examples:
|
||||
|
||||
- `feat`: (new feature for the user, not a new feature for build script)
|
||||
- `fix`: (bug fix for the user, not a fix to a build script)
|
||||
- `docs`: (changes to the documentation)
|
||||
- `style`: (formatting, missing semi colons, etc; no production code change)
|
||||
- `refactor`: (refactoring production code, eg. renaming a variable)
|
||||
- `test`: (adding missing tests, refactoring tests; no production code change)
|
||||
- `chore`: (updating grunt tasks etc; no production code change)
|
||||
|
||||
References:
|
||||
- [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
- [Semantic Commit Messages](https://seesparkbox.com/foundry/semantic_commit_messages)
|
||||
|
||||
- https://www.conventionalcommits.org/
|
||||
- https://seesparkbox.com/foundry/semantic_commit_messages
|
||||
- http://karma-runner.github.io/1.0/dev/git-commit-msg.html
|
||||
## License
|
||||
|
||||
[License information here]
|
Loading…
Add table
Reference in a new issue