Skip to content

tember8003/SteamGame_Recommend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

46 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Steam Game Recommend API & UI

Steam game recommendation system that uses tag information, user profiles, recent play history

Note: To optimize database size with H2, we only include games that have 50+ reviews. Some games you're looking for might not be available due to this limitation.


๐Ÿ“ Project Structure

recommend/
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ main
โ”‚   โ”‚   โ”œโ”€โ”€ java/SteamGame.recommend/  # Spring Boot REST API
โ”‚   โ”‚   โ””โ”€โ”€ resources/
โ”‚   โ”‚       โ”œโ”€โ”€ application.properties
โ”‚   โ”‚       โ””โ”€โ”€ static/               # HTML-based UI
โ”‚   โ”‚           โ”œโ”€โ”€ index.html        # Home (Feature menu)
โ”‚   โ”‚           โ”œโ”€โ”€ random.html       # Tag-based random recommendations
โ”‚   โ”‚           โ”œโ”€โ”€ input.html        # Direct input tag recommendations
โ”‚   โ”‚           โ”œโ”€โ”€ profile.html      # Profile-based recommendations
โ”‚   โ”‚           โ”œโ”€โ”€ recent.html       # Recent 2-week play recommendations
โ”‚   โ”‚           โ”œโ”€โ”€ similar.html      # Similar tag recommendations
โ”‚   โ”‚           โ”œโ”€โ”€ choice.html       # Game choice interactive feature
โ”‚   โ”‚           โ””โ”€โ”€ review-guess.html # Review guessing game
โ”œโ”€โ”€ electron/                         # Electron desktop app
โ”‚   โ”œโ”€โ”€ main.js                       # Main process
โ”‚   โ”œโ”€โ”€ package.json                  # Build configuration
โ”‚   โ”œโ”€โ”€ html/
โ”‚   โ”‚   โ”œโ”€โ”€ config.html               # API key settings
โ”‚   โ”‚   โ””โ”€โ”€ loading.html              # Loading screen
โ”‚   โ””โ”€โ”€ resources/
โ”‚       โ””โ”€โ”€ recommend-0.0.1-SNAPSHOT.jar
โ””โ”€โ”€ data/                             # H2 Database files (auto-created)
    โ””โ”€โ”€ gamedb.mv.db                  # H2 database file

๐Ÿ“‘ Prerequisites

  • General Requirements
    • JDK 17 or higher, Git
    • No external database required (H2 embedded)
  • Desktop Application
    • Windows 10/11 (64-bit)
    • Java 17 or higher installed
    • API keys can be configured when running the app

๐Ÿ”‘ API Key Setup

1. Steam Web API Key

  1. Visit Steam API Key Registration Page and log in with your Steam account
  2. Enter any domain name (e.g., localhost)
  3. Check "I agree" and click "Register"
  4. Copy and save the generated API Key

Note: Steam Guard verification required. Community-restricted accounts cannot obtain API keys.

2. Google Gemini API Key

  1. Visit Google AI Studio and log in
  2. Click "Create API Key"
  3. Copy and save the generated API Key

๐Ÿ–ฅ๏ธ How to Run

Method 1: Desktop Application (Recommended)

  1. Download & Install

    • Download the latest version from the Releases page
    • Run Steam-Game-Recommend-Setup-x.x.x.exe
  2. Launch Application

    • API key configuration screen appears automatically on first run
    • Enter your Steam API Key and Gemini API Key
    • Click Skip for Now to use tag search without API keys
    • API keys are stored locally at: %AppData%\steam-game-recommend\api-keys.json
  3. Use Features

    • All features run in a single application
    • No separate server environment variable setup required

Method 2: Developer/Server Execution

  1. Clone Project

    git clone https://github.com/tember8003/SteamGame_Recommend.git
    cd SteamGame_Recommend
  2. Set Environment Variables (Optional)

    • macOS/Linux (bash, zsh)

      export STEAM_API_KEY=YOUR_STEAM_API_KEY
      export GEMINI_API_KEY=YOUR_GEMINI_API_KEY
    • Windows (PowerShell)

      $Env:STEAM_API_KEY = "YOUR_STEAM_API_KEY"
      $Env:GEMINI_API_KEY = "YOUR_GEMINI_API_KEY"
  3. Start Server

    ./gradlew clean bootRun

๐Ÿ–ฅ๏ธ UI Pages

Feature Description Path
Home (Feature selection) /
Tag-based recommendations /random.html
Direct input tag recommendations /input.html
Profile-based recommendations /profile.html
Recent 2-week play recommendations /recent.html
Similar tag recommendations /similar.html

๐Ÿ“ฆ Electron App Build (For Developers)

  1. Setup

    cd electron
    npm install
  2. Prepare JAR File

    # Build JAR from main project
    cd ..
    ./gradlew clean bootJar
    
    # Copy JAR file
    cp build/libs/recommend-0.0.1-SNAPSHOT.jar electron/resources/
  3. Build Application

    cd electron
    npm run build-win  # Windows build
    • Build output: electron/dist/

โš™๏ธ Configuration Example

# API Keys
steam.api.key=${STEAM_API_KEY}
spring.ai.google.api-key=${GEMINI_API_KEY}

# H2 Database Configuration
spring.datasource.url=jdbc:h2:file:./data/gamedb;DB_CLOSE_DELAY=-1;MODE=MySQL;AUTO_SERVER=TRUE;DATABASE_TO_LOWER=FALSE;CASE_INSENSITIVE_IDENTIFIERS=TRUE;CHARSET=UTF-8
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=

# H2 Console
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console

# Server Configuration
server.port=8888

๐Ÿ“– Key Features

  • ๐Ÿ” Tag-based Recommendations
    • Random recommendations: Random game suggestions based on tags
    • Similar tags: Game recommendations with tags similar to specific games
  • ๐Ÿ˜Š Profile-based Recommendations
    • Steam ID library analysis
  • โฐ Recent Play-based Recommendations
    • Analysis of games played in the last 2 weeks
    • Recommendations based on current interests

๐Ÿ†˜ Troubleshooting

Desktop Application

  • Java Error: Verify Java 17 or higher is installed
  • API Key Error: Verify correct API keys are entered
  • Port Conflict: Check if port 8888 is in use

Server Execution

  • Port Conflict: Verify port 8888 is not in use by other applications
  • Environment Variable Error: Verify API keys are set correctly (optional for basic functionality)
  • Database Error: H2 database files are automatically created in ./data/ directory

๐Ÿ“ API Key Storage Location

The desktop application stores API keys locally at:

  • Windows: %AppData%\steam-game-recommend\api-keys.json
  • Full path example: C:\Users\[Username]\AppData\Roaming\steam-game-recommend\api-keys.json

This ensures your API keys remain private and are not shared with others.


๐Ÿ’พ Database

The application uses H2 embedded database with the following features:

  • Automatic initialization: Database and tables are created automatically on first run
  • Data persistence: Game data persists between application restarts stored in ./data/gamedb files
  • Special character support: Proper handling of Unicode characters including ยฎ, โ„ข symbols
  • MySQL compatibility mode: Ensures compatibility with MySQL syntax
  • H2 Console: Built-in web interface for database management at /h2-console
  • No external dependencies: No need for separate database server installation

๐ŸŒ API Endpoints

Game Recommendations

  • POST /api/recommend/random - Tag-based random recommendations
  • POST /api/recommend/input - Text input-based recommendations
  • POST /api/recommend/profile - Profile-based recommendations
  • POST /api/recommend/recent-play - Recent play-based recommendations
  • POST /api/recommend/similar - Similar game recommendations

Game Data

  • GET /api/games/appid?appid={id} - Get game by AppID
  • GET /api/games/tags - Get all available tags
  • GET /api/games/search?query={name} - Search games by name

Interactive Features

  • POST /api/choice/start - Start game choice session
  • POST /api/choice/select - Submit choice selection
  • POST /api/choice/result - Get choice recommendations

Review Guess Game

  • POST /api/review-guess/start - Start review guess game
  • POST /api/review-guess/answer - Submit answer
  • GET /api/review-guess/{sessionId}/result - Get game results

๐Ÿ› ๏ธ Technology Stack

  • Backend: Spring Boot 3.x, Java 17
  • Database: H2 (embedded, production) / MySQL (development)
  • Frontend: HTML, CSS, JavaScript
  • Desktop: Electron
  • AI Integration: Google Gemini API
  • External API: Steam Web API
  • Build: Gradle
  • Database Console: H2 Console (built-in web interface)

๐Ÿ“„ License

This project is available under the MIT License.


๐Ÿ“ž Support

For project-related issues, please register them on the Issues page.

About

Steam game recommendation system built with Spring Boot

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published