- TypeScript 67.8%
- Go 23.7%
- JavaScript 5.7%
- CSS 1%
- Shell 0.6%
- Other 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Skip the preloaded seed when it is already stored UpdateFromPreload only compared the bundled hash against the dictionary version and the latest dump, so a restart after the dictionary had moved on hit the unique constraint on _dbDumps.hash and failed. Look the hash up across every stored dump instead: a stored dump means the seed was applied once already and whatever replaced it since was deliberate. Co-Authored-By: Claude Opus 5 <[email protected]> * Add a script fetching the seed from a deployment The dictionary seed is not tracked in git, so builds have had to be fed a backup/seed.db by hand. Pull it from a running instance instead: SEED_HOSTS lists the origins to try in order, and a host only counts as good if the payload it serves matches the sha256 it advertises. Co-Authored-By: Claude Opus 5 <[email protected]> * Cross compile the image instead of emulating it Every build stage now runs on the build platform and the go binary is cross compiled for the target, so a multi platform build no longer runs npm and go under qemu. Only the final COPY-only stage is per platform. Hashing the seed needs a runnable binary, so that stage builds a host native one; being platform independent it is built once and shared. Add a .dockerignore so the context stops carrying node_modules, tmp and the old seed backups. Co-Authored-By: Claude Opus 5 <[email protected]> * Add CI and release workflows CI runs on pull requests and master: gofmt, vet, build and tests for the backend, typecheck, eslint and build for the frontend, plus a multi platform image build so the release path is exercised before a tag. Release runs on tag pushes only, reuses the CI workflow as its gate and then pushes the image to Docker Hub tagged with the tag name, the commit sha and latest. Both workflows take the seed from SEED_HOSTS. Co-Authored-By: Claude Opus 5 <[email protected]> * Document the seed fetch and the CI workflows Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> |
||
| .github | ||
| backup | ||
| cmd/gbp | ||
| internals | ||
| migrations | ||
| screenshots | ||
| scripts | ||
| ui | ||
| .air.toml | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitignore | ||
| build.nu | ||
| CLAUDE.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| publish.nu | ||
| README.md | ||
| TODO.md | ||
Genshin Build Planner
A web application for planning and managing Genshin Impact character builds, weapon builds, artifact sets, and team compositions. The application features a Go backend powered by PocketBase and a modern React/TypeScript frontend.
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
Self-Hosting / Deployment
Follow these steps to deploy your own instance of Genshin Build Planner. For development instructions, see the "Development Setup" section below.
Step 1: Get the Application
You have two options: use the pre-built Docker image (easiest) or build from source.
Option A: Using Docker (Recommended)
This is the simplest way to get started. All you need is Docker installed.
docker pull qxuken/gbp:latest
Option B: Building from Source
If you prefer not to use Docker, you can build the application manually.
- Ensure you have Go and Node.js/npm installed.
- Run the build command from the root of the project directory:
cd ./ui && npm run build && cd .. && go build ./cmd/gbp
Step 2: Run the Application & Create Admin Account
Run the application. If using Docker, it is highly recommended to use a volume to persist your data.
# Example Docker command
docker run --name gbp -p 8080:8080 -v gbp_data:/pb_data qxuken/gbp:latest
-p 8080:8080maps the container's port 8080 to your host's port 8080.-v gbp_data:/pb_datacreates a persistent volume namedgbp_datato store your database. This ensures your data is safe even if you remove the container.
On the first launch, the application will print a URL in the console logs. Visit this URL in your browser to create your first admin account. This link is only valid for a short time.
Step 3: Configuration
Navigate to the "Settings" panel in the application to configure additional options, such as setting up an SMTP server for email features (like password resets).
If you don't want to configure SMTP, you will need to disable the authentication rule. First, go to Settings > Application, uncheck "Hide collection create and edit controls," and click Save. Then, go to Collections > Users > Edit collection > API Rules, clear the "Authentication rule," and click Save. You will then be able to log in without verification.
Step 4: (Optional) Upload Seed Data
The docker images already seeded with game data (characters, weapons, etc.).
- Get the
dump.dbfile. (See the "Seed Data" section below for download links). - Log in to your new instance with the admin account you just created.
- Navigate to the
/admin/dumpendpoint in your browser (e.g.,http://localhost:8080/admin/dump). - Upload the
dump.dbfile.
Step 5: Done!
Your personal instance of Genshin Build Planner is now ready to use.
Seed Data
The dump.db file contains all the necessary game data (characters, artifacts, weapons) required for the application to work. You only need to upload this once during the initial setup.
You can download the latest version from one of two places:
- From the Website: Go to genshinbuild.app and click the "Download Seed" button.
- From GitHub: Download the
dump.dbfile from the latest GitHub Release.
Tech Stack
- Backend: Go with PocketBase framework
- Frontend: TypeScript, React, Vite
- Database: SQLite (via PocketBase)
- Containerization: Docker
- Scripting: Nushell
Development Setup
This section is for developers who want to contribute to the project or modify the source code.
Prerequisites
- Go 1.x
- Node.js & npm
- Air for live-reloading the Go backend
go install github.com/air-verse/air@latest
Running in Development Mode
-
Backend First, ensure the frontend has been built at least once. Then, start the live-reload server.
nu build.nu ui # Run this the first time air -
Frontend Navigate to the UI directory, install dependencies, and start the Vite dev server.
cd ui npm install npm run dev
Building & Publishing
The project includes Nushell scripts for building and publishing.
build.nu: Builds the application.publish.nu: Builds and publishes multi-arch Docker images (arm64 & amd64). This is primarily for project maintainers.
The image is baked with a dictionary seed, which is not tracked in git. Fetch it from a running deployment before building:
scripts/fetch_seed.sh
It writes backup/seed.db and backup/seed.note, trying each origin in
SEED_HOSTS (whitespace separated, https://gbp.qxuken.dev https://genshinbuild.app
by default) until one serves a dump matching the sha256 it advertises.
# Example: Build and publish a new version
nu publish.nu
CI
.github/workflows/ci.ymlruns on pull requests and pushes tomaster: gofmt,go vet,go buildandgo testfor the backend,npm run typecheck,npm run checkandnpm run buildfor the frontend, and a multi-platform image build..github/workflows/release.ymlruns on tag pushes only. It reuses the CI workflow as a gate and then pushesqxuken/gbpas a single multi-arch manifest tagged with the git tag name, the commit sha andlatest.
Publishing needs two repository secrets, DOCKERHUB_USERNAME and
DOCKERHUB_TOKEN. A SEED_HOSTS repository variable overrides the seed origins
for both workflows.
TODO
Refer to TODO.md for a list of pending tasks and future improvements.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.

