- character-builder/: Vue 3 + NestJS + Valkey app for planning house, class, character XP, 5 spec tracks, faction standing, and skill trees. Shareable via short link (POST /api/builds → 8-char nanoid). - character-builder/data/: parsed JSON tables (character XP through L200, 5 specs to L100, 2 faction standing tables, 5 class skill trees). - character-builder/scripts/extract.py: parser that regenerates data/*.json from the gitignored sample-data/*.html snapshots. - Dockerfile + docker-compose.yml: two-container deploy (app + Valkey). - specialization-calculator/: pre-existing single-file XP/quest calculator, carried into the repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
# Dune Awakening — Character Builder
|
|
|
|
Plan your character across House, Class, Character XP, Specializations, Faction
|
|
Standing, and Skill Trees. Shareable via short link.
|
|
|
|
## Stack
|
|
|
|
- **Frontend**: Vue 3 + Vite + TypeScript
|
|
- **Backend**: NestJS (Node 22, TypeScript)
|
|
- **Storage**: Valkey (Redis-compatible) for build sharing
|
|
- **Data**: extracted from `../sample-data/*.html` into `./data/*.json` via `scripts/extract.py`
|
|
|
|
Two containers: `app` (NestJS serving the SPA + API) and `valkey`. Wire-up in
|
|
`docker-compose.yml`.
|
|
|
|
## Run
|
|
|
|
```sh
|
|
docker compose up --build
|
|
```
|
|
|
|
Then open <http://localhost:8080>.
|
|
|
|
## Update data
|
|
|
|
If you save new HTML snapshots into `../sample-data/`, re-run the extractor:
|
|
|
|
```sh
|
|
uv run python3 scripts/extract.py
|
|
```
|
|
|
|
This regenerates `./data/*.json`, which the container picks up on next build.
|
|
|
|
## API
|
|
|
|
- `POST /api/builds` — body is a build payload (any JSON ≤16 KB). Returns
|
|
`{ code }` (8-char URL-safe id).
|
|
- `GET /api/builds/:code` — returns `{ code, build }`.
|
|
- `GET /api/data/:file` — serves the static JSON tables (allow-listed).
|
|
|
|
Builds are stored in Valkey with a rolling 1-year TTL (refreshed on each
|
|
fetch), so popular shared builds don't expire.
|
|
|
|
## Dev (without Docker)
|
|
|
|
In two terminals:
|
|
|
|
```sh
|
|
# backend
|
|
cd backend && npm install && VALKEY_URL=redis://localhost:6379 npm run start:dev
|
|
|
|
# frontend
|
|
cd frontend && npm install && npm run dev
|
|
```
|
|
|
|
The Vite dev server proxies `/api/*` to `localhost:3000`.
|