Restructure project as Worldshaper
This commit is contained in:
parent
ab891a315c
commit
b4dbd4ee8e
583 changed files with 279 additions and 189269 deletions
28
README.md
28
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# New RPG Content Editor V2.1
|
||||
# Worldshaper
|
||||
|
||||
Canonical React + TypeScript content editor and API for New RPG (V2.1 branch).
|
||||
Canonical React + TypeScript worldbuilding studio and API for New RPG.
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -8,21 +8,20 @@ Canonical React + TypeScript content editor and API for New RPG (V2.1 branch).
|
|||
- Load selected content payload from `/api/content/:type`.
|
||||
- Edit raw JSON.
|
||||
- Save JSON back to `/api/content/:type`.
|
||||
- Serve wiki at `/wiki`.
|
||||
|
||||
## Runtime
|
||||
|
||||
- Vite dev server runs on `http://localhost:4170`.
|
||||
- API/app server runs on `http://localhost:5180` from `server.js` in this folder.
|
||||
- `vite.config.ts` proxies `/api` and `/wiki` to `http://localhost:5180`.
|
||||
- `vite.config.ts` proxies `/api` to `http://localhost:5180`.
|
||||
- Override the API/app port with `PORT=<port>` when needed.
|
||||
|
||||
## Content Location
|
||||
|
||||
- Preferred: place content beside `server.js` at `tools/content-editor-v2/content/`.
|
||||
- Required image folder for `/api/images`: `tools/content-editor-v2/content/Images/` (capital `I`).
|
||||
- Preferred: place content beside `server.js` at `tools/worldshaper/content/`.
|
||||
- Required image folder for `/api/images`: `tools/worldshaper/content/Images/` (capital `I`).
|
||||
- Optional override: set `CONTENT_ROOT=/absolute/path/to/content` before starting the API.
|
||||
- Fallbacks remain for legacy layouts, but local `tools/content-editor-v2/content` is checked first.
|
||||
- Fallbacks remain for legacy layouts, but local `tools/worldshaper/content` is checked first.
|
||||
|
||||
## Local development
|
||||
|
||||
|
|
@ -35,10 +34,23 @@ From this folder:
|
|||
## Build
|
||||
|
||||
- `npm run build`
|
||||
- `npm run clean:workspace` removes generated bundles/logs and trims backup history to a small recent set.
|
||||
- `npm run clean:workspace` removes generated bundles, logs, and disposable local artifacts.
|
||||
|
||||
## Project Structure
|
||||
|
||||
This repo is easiest to manage when the root stays limited to the live app and its source-of-truth assets:
|
||||
|
||||
- `src/` React, TypeScript, and editor code
|
||||
- `content/` canonical game content, schemas, worlds, and images metadata
|
||||
- `data/` editor metadata and local settings payloads
|
||||
- `scripts/` maintenance, validation, and deployment helpers
|
||||
- `public/` static assets copied by Vite
|
||||
|
||||
Generated or disposable folders such as `dist/`, `output/`, `backups/`, and `Release/` should not be treated as source-of-truth project files.
|
||||
|
||||
## Scope guardrails
|
||||
|
||||
- Keep files small and modular.
|
||||
- No cross-file autofix/migration tooling in V2.1.
|
||||
- Finish core CRUD + validation workflows before adding advanced UX.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue