Welcome to the next major version of PRUNplanner, now open-sourced and community-driven! After years of developing PRUNplanner—the empire and base management tool for Prosperous Universe—on my own, I've decided to make the frontend rework public. This new version leverages the already public PRUNplanner API to create an enhanced user experience.
Development previews are powered by Netlify: http://preview.prunplanner.org/
Please Note, v2 uses the production backend. Changes made in the preview will be persisted to the database as if you would work with prunplanner.org.
Install dependencies with pnpm install
and run the vite development:
pnpm run dev
PRUNplanners frontend currently lacks proper and full-scope testing of its non-visual features and data validation. One aim of this rewrite is to reach full test coverage and zod
validation.
Backend calls can be mocked easily with axios-mock-adapter.
# Run tests
pnpm run test
# Or use vitest-ui
pnpm run test:ui
PRUNplanner offers a pre-built Docker image for the frontend, hosted on GitHub Container Registry: prunplanner-frontend. The image comes with default environment settings and rebuilds on published repository releases.
You can also build and run yourself with Docker:
# Build local
docker build -t prunplanner-frontend:latest .
# Run local build
docker run -p 80:80 prunplanner-frontend:latest --brotli --port 80
# or, run pre-build image
docker run -p 80:80 ghcr.io/prunplanner/prunplanner-frontend:latest --brotli --port 80
Or use it with Docker Compose in your docker-compose.yaml
:
services:
frontend:
image: ghcr.io/prunplanner/prunplanner-frontend:latest
container_name: prunplanner-frontend
command: --port 80 --brotli
ports:
- "80:80"
Key | Type | Default Value |
---|---|---|
VITE_APP_VERSION | string | "0.xx" |
VITE_API_BASE_URL | string | "https://api.prunplanner.org" |
VITE_SHARE_BASE_URL | string | "https://prunplanner.org/shared" |
VITE_GAME_DATA_STALE_MINUTES_BUILDINGS | int | 1440 |
VITE_GAME_DATA_STALE_MINUTES_RECIPES | int | 1440 |
VITE_GAME_DATA_STALE_MINUTES_MATERIALS | int | 1440 |
VITE_GAME_DATA_STALE_MINUTES_EXCHANGES | int | 30 |
VITE_GAME_DATA_STALE_MINUTES_PLANETS | int | 180 |
PRUNplanner is allowed to use Highcharts as it got a license certificate granted for its Core
and Stock
libraries. If you want to use this repository outside of local development, please ensure to follow the Highcharts license terms and conditions that might apply.