Skip to content

michal-kapala/gwentgg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gwent.gg

Personal game history browser for Gwent. Inspired by op.gg.

profile

How to use

You need your GOG user ID and personal API access token.

After you run the app it should be available on localhost:3000.

User ID

For Windows:

  1. Select Run from Start menu.
  2. Paste "%LOCALAPPDATA%\Programs\CD Projekt Red\REDlauncher\config\launcher.ini".
  3. Copy the value next to lastKnownUserId.
  4. Paste it as the value of user_id in this app's config.json.

Access token

As of now you need to use the access token generated by the game.

A guide on how to get your token is available here.

Your access token is valid for 1 hour. Gwent will automatically refresh it after 55min, so you can simply copy it and log in again.

Development

Prerequisites

Go runtime 1.21+ is required.

Due to the current dependency of GORM's SQLite driver on mattn/go-sqlite3 (see the related issue), you need to enable CGO (below), install GCC compiler and add it to PATH before you can build.

go env -w CGO_ENABLED=1

If needed, the database file will be created and initialized using the latest models on app startup.

For direct work with the database I recommend SQLite browser.

Build and run

Use templ generate only after component updates.

templ generate
go build
./gwentgg.exe

Code formatting

Use go fmt on all modified directories before you commit.

Disclaimer

This app interacts directly with Gwent's APIs using your GOG account.

Any abuse can be traced back and eventually result in a ban and/or other punishment, for which the authors take no responsibility. Use with common sense.

You may use this code and/or distributed application for personal and non-commercial purposes only.

Gwent.gg is a fan initiative and as such is not maintained or supported by CD Projekt RED.

Tech

Built with: