67 lines
3.5 KiB
Markdown
67 lines
3.5 KiB
Markdown
Root
|
|
- .gitignore, pnpm-workspace.yaml, package.json (workspace scripts), Cargo.toml (workspace), .npmrc
|
|
|
|
rulesets/ — @campaign-manager/rulesets workspace package
|
|
- types.ts — Ruleset, SheetData, ValidationResult, DiceAction, StatBlock, VNode interfaces
|
|
- dsa5e/index.ts — DSA5e stub (typed default sheet with attributes, talents, combat, spells)
|
|
- generic/index.ts — Generic stub (name, HP, notes)
|
|
- index.ts — re-exports everything + RULESETS registry map
|
|
|
|
symbiote/ — Plain Svelte + Vite (target es2022 for top-level await support)
|
|
- vite.config.ts, tsconfig.json, index.html
|
|
- public/manifest.json — valid TaleSpire manifest with colorStyles, fonts, diceFinder, icons extras
|
|
- src/lib/ts-api.d.ts — ambient TS global (storage, dice, players, sync)
|
|
- src/lib/store.ts — accessToken, refreshToken, currentUser, currentGroup, isBoardTransition stores +
|
|
loadTokens/saveTokens/clearTokens via TS.storage
|
|
- src/lib/api.ts — auto-refresh on 401, suppresses calls during board transition
|
|
- src/App.svelte — currentView store drives view switching
|
|
- src/main.ts — board transition listeners, awaits TS.hasInitialized, mounts App
|
|
- src/views/ — Login, GroupList, GroupDetail, CharacterSheet, RollHistory stubs
|
|
|
|
web/ — SvelteKit + adapter-static
|
|
- svelte.config.js, vite.config.ts, tsconfig.json, src/app.html
|
|
- src/lib/api.ts — access token in memory, refresh via HttpOnly cookie
|
|
- src/routes/+layout.svelte — silent token refresh on mount, redirects to /login if unauthenticated
|
|
- All routes stubbed: /, /login, /groups, /groups/[id], /groups/[id]/settings, /characters, /characters/[id]
|
|
|
|
backend/ — Rust + Axum
|
|
- Cargo.toml with all specified dependencies
|
|
- src/main.rs — reads DATABASE_URL/JWT_SECRET, builds Axum router, CORS, tracing, binds :3000
|
|
- src/lib.rs — module entrypoint
|
|
|
|
Verification results: ✅ symbiote build → dist/ with index.html + manifest.json ✅ web build → SvelteKit static output
|
|
✅ cargo check → no errors
|
|
|
|
|
|
Local dev workflow is now:
|
|
|
|
# Start Postgres
|
|
docker compose up -d
|
|
|
|
# Copy and fill in secrets
|
|
cp .env.example .env
|
|
|
|
# Run backend
|
|
cd backend && cargo run
|
|
|
|
# Symbiote (build-watch mode — see below)
|
|
pnpm dev:symbiote
|
|
|
|
# Web app
|
|
pnpm dev:web Local dev workflow is now:
|
|
|
|
# Start Postgres
|
|
docker compose up -d
|
|
|
|
# Copy and fill in secrets
|
|
cp .env.example .env
|
|
|
|
# Run backend
|
|
cd backend && cargo run
|
|
|
|
# Symbiote (build-watch mode — see below)
|
|
pnpm dev:symbiote
|
|
|
|
# Web app
|
|
pnpm dev:web
|