/spring-boot-gamepass-app

XBOX GamePass Clone with Spring Boot

Primary LanguageJavaMIT LicenseMIT

GamePass App

This is a Spring Boot application that clones the XBOX GamePass platform as a practice.

Table of Contents

Features

  • JWT Authentication
  • Exception Handling
  • Validation
  • Swagger OpenAPI
  • Subscription, Payment and Invoice
  • Integration Testing
  • TestContainers
  • Scheduling
  • Docker Image
  • Pagination

Installation

Prerequisites

  • Docker

Installation Steps

  • git clone https://gitlab.com/onurhizar/spring-boot-gamepass-app
  • cd spring-boot-gamepass-app
  • ./mvnw clean package -DskipTests to build JAR file
  • docker compose up to run app
  • http://localhost:8080/swagger-ui.html to see Swagger UI of API routes
  • docker compose down to stop the app and remove the images

Project Steps

  • Game entity and database connection
  • Populate sample data with data.sql
  • Hierarchical Categories for Game entity
  • Exception Handling (initialized)
  • ManyToMany Bidirectional relationship on Category-Game
  • DTO for bidirectional entities
  • CRUD on Category with DTO
  • User entity
  • Auth (JWT)
  • OpenAPI & Swagger
  • JWT environment variable constants
  • Validation
  • Integration Testing (initialized)
  • User Interests : Favorite / Unfavorite Games
  • User Verification & Password Reset
  • Admin or Self Authorization Logic
  • Scheduling
  • Subscription and ContractRecord
  • Invoice and Payment
  • TestContainers
  • CommonEntity for createdAt and updatedAt
  • Dockerfile
  • Other entities
  • Business Logic
  • Cron Expressions for Production
  • Downgrade from Java 17 to Java 8
  • Pagination
  • Review and Refactoring

Sample Environment Variables

DB_URL=jdbc:postgresql://localhost:5432/gamepass
DB_USERNAME=postgres
DB_PASSWORD=secretpassword
JWT_ISSUER=GamePass
JWT_EXPIRATION_HOURS=12
JWT_SECRET_KEY=104E635266556A586E3272367538722F413F4438472B4B6250645367266B5275
UPLOAD_DIRECTORY=/tmp

License

This application is licensed under the MIT License. See the LICENSE file for more information.