Skip to content

anthony-hyo/game-launcher

Repository files navigation

Game Launcher

Docker License
Java Version
Gradle Spring Boot PostgreSQL Tailwind CSS Angular Hibernate Electron

A game launcher with web and Electron desktop versions. Browse games and open them in tabs.


Preview (Web)

Preview 5 Preview 6
Preview 7 Preview 12

Preview (Web) 01/2026

Preview 12 Preview 9
Preview 11 Preview 10

Preview (Electron)

Preview 1 Preview 2
Preview 3 Preview 4

Features

  • Browse game library
  • Multi-tab interface
  • Track play counts
  • Light/dark themes
  • Electron desktop app with native controls
  • Discord Rich Presence

Stack

Frontend: Angular 21 + SCSS + Tailwind + RxJS signals + Electron

Backend: Spring Boot 4.0.0 + Java 25 + PostgreSQL + Spring Data JPA


Quick Start

Frontend

cd frontend
npm install
npm start
# http://localhost:4200/

Backend

cd backend
./gradlew bootRun
# http://localhost:8080/

Architecture

Frontend

Services:

  • LibraryService – Fetch games, track plays
  • StateService – Manage tabs
  • SettingsService – Theme & settings

Routes:

  • /library – Game grid
  • /library/viewer/:id – Game details
  • /home – Welcome (web only)
  • /download – Download page (web only)

Backend

Endpoints:

  • GET /api/library/games – All games
  • GET /api/launcher/deploys – Launcher updates

Database:

  • games table – Game info (title, description, genre, urls, images)
  • launcher_deploys table – Version info per OS

Electron Integration

The Electron preload script exposes APIs to the frontend:

// Window controls
window.electron.window_minimize()
window.electron.window_maximize()
window.electron.window_close()
window.electron.update_rich_presence(data)

// Tab management
window.tab.open(viewId)
window.tab.close(event, tab)
window.tab.openURL(url)

// Loading progress
window.loading.progress(value)
window.loading.text("message")

Building

Frontend

# Web
npm run build
# dist/game-launcher-angular/browser/

# Electron
npm run build-electron
# dist/game-launcher-angular/browser/ (with hash routing)

Backend

# Build JAR
./gradlew clean build
# build/libs/launcher-0.0.1-SNAPSHOT.jar

# Run JAR
java -jar build/libs/launcher-0.0.1-SNAPSHOT.jar

Docker

Development (with hot reload)

docker-compose -f docker-compose.dev.yml up

Services:

  • PostgreSQL (port 5432) - root / 321
  • Backend (port 8080) - Live with Maven
  • Frontend (port 4200) - Live with Node

Production

Create .env:

DATABASE_USER=root
DATABASE_PASSWORD=321
DATABASE_DB=game_launcher
DATABASE_URL=jdbc:postgresql://postgresql:5432/game_launcher
API_URL=http://backend:8080

Then run:

docker-compose -f docker-compose.prod.yml up

Services:

  • PostgreSQL - Persisted volume
  • Backend - Built JAR
  • Frontend - Built Angular bundle

All on internal network game_launcher-net


Configuration

Frontend Environment Variables

Edit src/environments/environment.ts:

{
  apiUrl: 'https://api-launcher.anthhyo.dev',
  showHome: true,
  showDownload: true,
  useHash: false,
  useWebview: false
}

Backend Environment Variables

DATABASE_URL=jdbc:postgresql://localhost:5432/game_launcher
DATABASE_USER=root
DATABASE_PASSWORD=321
SERVER_PORT=8080

Or edit src/main/resources/application.properties


Database Schema

Games:

CREATE TABLE games (
  id SERIAL PRIMARY KEY,
  title VARCHAR(128) UNIQUE NOT NULL,
  description TEXT NOT NULL,
  genre VARCHAR(64) NOT NULL,
  url TEXT UNIQUE NOT NULL,
  image_url, cover_url, icon_url TEXT NOT NULL,
  play_clicks BIGINT DEFAULT 0
);

Launcher Deployments:

CREATE TABLE launcher_deploys (
  id SERIAL PRIMARY KEY,
  system VARCHAR(16),    -- Windows, Linux, macOS
  version VARCHAR(16),   -- 1.0.0
  description TEXT,      -- Features (comma-separated)
  url TEXT               -- Download link
);

Contributing

Contributions, issues, and feature requests are welcome! Feel free to fork the repo and submit pull requests.


License

This project is licensed under the MIT License.