diff --git a/CLAUDE.md b/CLAUDE.md index af4921c..2332ca3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,7 @@ LTCG-v2/ │ ├── lunchtable-tcg-match/ # Convex component: event-sourced matches │ └── lunchtable-tcg-story/ # Convex component: story mode progression ├── apps/web-tanstack/ # Frontend (TanStack Start + React 19) -├── apps/web/ # Legacy archive (excluded from default flows) +│ └── src/legacy/ # Legacy React Router compatibility modules ├── reference/frontend/ # Reference frontend (patterns only) └── docs/ # Architecture + agent docs ``` @@ -105,7 +105,7 @@ import { apiAny, useConvexMutation, useConvexQuery } from "@/lib/convexHelpers"; ## Theming: Zine Aesthetic -Source of truth: original LTCG at `/Users/home/Desktop/LTCG/apps/web/app/globals.css` +Source of truth: `apps/web-tanstack/src/styles/legacy.css` ### Core Design System diff --git a/README.md b/README.md index b1b296c..cb0cf32 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ curl -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setWebhook" \ LTCG-v2/ ├── convex/ # Convex backend (host layer) ├── apps/web-tanstack/ # Primary frontend (TanStack Start) -├── apps/web/ # Legacy archive (React Router; excluded from default flows) +│ └── src/legacy/ # Legacy React Router compatibility modules ├── packages/ │ ├── engine/ # Pure TS game engine │ ├── plugin-ltcg/ # ElizaOS plugin diff --git a/docs/VERCEL_BLOB_SETUP.md b/docs/VERCEL_BLOB_SETUP.md index 7bb08de..5ed6ddd 100644 --- a/docs/VERCEL_BLOB_SETUP.md +++ b/docs/VERCEL_BLOB_SETUP.md @@ -49,7 +49,7 @@ This Vercel Function handles image uploads: ## Upload Component -**File:** `apps/web/src/components/ImageUpload.tsx` (legacy client) +**File:** `apps/web-tanstack/src/legacy/components/ImageUpload.tsx` (legacy compatibility client) Usage: @@ -121,9 +121,9 @@ Or use the component with automatic URL handling. api/ └── blob-upload.ts # Vercel Function for uploads -apps/web/ # Legacy React Router client (optional uploader UI) +apps/web-tanstack/ ├── src/ -│ ├── components/ +│ ├── legacy/components/ │ │ └── ImageUpload.tsx # React upload component │ └── ... └── public/ diff --git a/docs/architecture/VICE_SYSTEM.md b/docs/architecture/VICE_SYSTEM.md index 5dad50c..ac26838 100644 --- a/docs/architecture/VICE_SYSTEM.md +++ b/docs/architecture/VICE_SYSTEM.md @@ -113,38 +113,38 @@ Additionally, `CARD_DESTROYED` fires with `reason: "breakdown"` when the card is ## The 10 Canonical Vice Types -![The Ten-Fold Curse](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_master_splash_landscape_1771172852490.png) +![The Ten-Fold Curse](../../apps/web-tanstack/public/lunchtable/vices/vice-splash.png) Defined in `GAME_CONFIG.VICE_TYPES`. Each vice is a character flaw that can trigger a breakdown. -### 1. Gambling ::: ![Gambling](/Users/home/Desktop/LTCG-v2/apps/web/public/lunchtable/vices/gambling.png) +### 1. Gambling ::: ![Gambling](../../apps/web-tanstack/public/lunchtable/vices/gambling.png) **Description:** Can't stop betting -- doubles down even when losing. -### 2. Alcohol ::: ![Alcohol](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_alcohol_comic_1771172385924.png) +### 2. Alcohol ::: ![Alcohol](../../apps/web-tanstack/public/lunchtable/vices/alcohol.png) **Description:** Party lifestyle that spirals out of control. -### 3. Social Media ::: ![Social Media](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_social_media_comic_1771172400411.png) +### 3. Social Media ::: ![Social Media](../../apps/web-tanstack/public/lunchtable/vices/social-media.png) **Description:** Addicted to likes, shares, and online validation. -### 4. Crypto ::: ![Crypto](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_crypto_comic_1771172423409.png) +### 4. Crypto ::: ![Crypto](../../apps/web-tanstack/public/lunchtable/vices/crypto.png) **Description:** All-in on digital assets, blind to risk. -### 5. Validation ::: ![Validation](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_validation_comic_retry_1771172446648.png) +### 5. Validation ::: ![Validation](../../apps/web-tanstack/public/lunchtable/vices/validation.png) **Description:** Desperate need for approval and recognition. -### 6. Conspiracy ::: ![Conspiracy](/Users/home/Desktop/LTCG-v2/apps/web/public/lunchtable/vices/conspiracy.png) +### 6. Conspiracy ::: ![Conspiracy](../../apps/web-tanstack/public/lunchtable/vices/conspiracy.png) **Description:** Lost in paranoid theories, disconnected from reality. -### 7. Narcissism ::: ![Narcissism](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_narcissism_comic_1771172480416.png) +### 7. Narcissism ::: ![Narcissism](../../apps/web-tanstack/public/lunchtable/vices/narcissism.png) **Description:** Self-obsession that alienates everyone. -### 8. Adderall ::: ![Adderall](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_adderall_comic_1771172503606.png) +### 8. Adderall ::: ![Adderall](../../apps/web-tanstack/public/lunchtable/vices/adderall.png) **Description:** Stimulant dependency, burnout from hyperfocus. -### 9. MLM ::: ![MLM](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_mlm_comic_1771172520609.png) +### 9. MLM ::: ![MLM](../../apps/web-tanstack/public/lunchtable/vices/mlm.png) **Description:** Multi-level marketing delusion, hustle culture. -### 10. Rage ::: ![Rage](/Users/home/.gemini/antigravity/brain/e67c5c5b-7a39-4849-ab1d-cb7bc6e34507/vice_rage_comic_1771172538190.png) +### 10. Rage ::: ![Rage](../../apps/web-tanstack/public/lunchtable/vices/rage.png) **Description:** Uncontrolled anger that destroys relationships. --- diff --git a/docs/plans/2026-02-15-card-balance-plan.md b/docs/plans/2026-02-15-card-balance-plan.md index 60e9579..de136ee 100644 --- a/docs/plans/2026-02-15-card-balance-plan.md +++ b/docs/plans/2026-02-15-card-balance-plan.md @@ -967,7 +967,7 @@ git commit -m "feat(backend): update match creation and AI for new resource syst ## Task 12: Update Frontend PlayerView Usage **Files:** -- Modify: `apps/web/src/pages/Play.tsx` +- Modify: `apps/web-tanstack/src/legacy/pages/Play.tsx` **Step 1: Replace LP display with Reputation/Stability/Clout** @@ -981,7 +981,7 @@ Replace all `lifePoints` / `opponentLifePoints` references. **Step 2: Commit** ```bash -git add apps/web/src/pages/Play.tsx +git add apps/web-tanstack/src/legacy/pages/Play.tsx git commit -m "feat(frontend): display reputation/stability/clout on game board" ``` diff --git a/docs/plans/2026-02-15-ltcg-v2-implementation.md b/docs/plans/2026-02-15-ltcg-v2-implementation.md index c1627b7..821e69f 100644 --- a/docs/plans/2026-02-15-ltcg-v2-implementation.md +++ b/docs/plans/2026-02-15-ltcg-v2-implementation.md @@ -580,9 +580,9 @@ git commit -m "feat: seed module — card definitions, starter decks, story chap ### Task 5: Update frontend to point at new API **Files:** -- Modify: `apps/web/src/lib/convexHelpers.ts` -- Modify: `apps/web/src/hooks/story/useStoryMode.ts` -- Modify: `apps/web/src/hooks/story/useStoryChapter.ts` +- Modify: `apps/web-tanstack/src/legacy/lib/convexHelpers.ts` +- Modify: `apps/web-tanstack/src/legacy/hooks/story/useStoryMode.ts` +- Modify: `apps/web-tanstack/src/legacy/hooks/story/useStoryChapter.ts` - Modify: frontend game board hooks to use new match-based API The frontend hooks currently reference `typedApi.progression.story.*` and `typedApi.progression.storyBattle.*`. The new API is flat: `api.game.getChapters`, `api.game.startStoryBattle`, etc. @@ -609,7 +609,7 @@ The PlayerView type from the engine defines the shape of the response. **Step 4: Commit** ```bash -git add apps/web/src/ +git add apps/web-tanstack/src/legacy/ git commit -m "feat: update frontend hooks to use new flat game API" ``` @@ -621,7 +621,7 @@ git commit -m "feat: update frontend hooks to use new flat game API" ```bash bunx convex dev & -cd apps/web && bun dev +cd apps/web-tanstack && bun dev ``` **Step 2: Test flow** diff --git a/docs/plans/2026-02-15-playable-game-design.md b/docs/plans/2026-02-15-playable-game-design.md index 2600d69..58b1814 100644 --- a/docs/plans/2026-02-15-playable-game-design.md +++ b/docs/plans/2026-02-15-playable-game-design.md @@ -313,7 +313,7 @@ Implement `legalMoves(state, seat)` in engine to return all valid commands: ### New Files ``` -apps/web/src/components/game/ +apps/web-tanstack/src/legacy/components/game/ GameBoard.tsx # Root board layout PlayerHand.tsx # Fan hand container HandCard.tsx # Individual hand card @@ -352,7 +352,7 @@ packages/engine/src/ convex/ game.ts # Replace AI stub with heuristic logic -apps/web/src/ +apps/web-tanstack/src/legacy/ pages/Play.tsx # Replace skeleton with GameBoard ``` diff --git a/docs/plans/2026-02-15-playable-game.md b/docs/plans/2026-02-15-playable-game.md index 0e8df62..2e051eb 100644 --- a/docs/plans/2026-02-15-playable-game.md +++ b/docs/plans/2026-02-15-playable-game.md @@ -697,7 +697,7 @@ git commit -m "feat(engine): wire card effects into spell/trap activation + new ### Task 4: Create useGameState hook **Files:** -- Create: `apps/web/src/components/game/hooks/useGameState.ts` +- Create: `apps/web-tanstack/src/legacy/components/game/hooks/useGameState.ts` ```typescript import { useMemo } from "react"; @@ -853,7 +853,7 @@ export function useGameState(matchId: string | undefined) { **Step 2: Commit** ```bash -git add apps/web/src/components/game/hooks/useGameState.ts +git add apps/web-tanstack/src/legacy/components/game/hooks/useGameState.ts git commit -m "feat(ui): add useGameState hook with valid action derivation" ``` @@ -862,7 +862,7 @@ git commit -m "feat(ui): add useGameState hook with valid action derivation" ### Task 5: Create useGameActions hook **Files:** -- Create: `apps/web/src/components/game/hooks/useGameActions.ts` +- Create: `apps/web-tanstack/src/legacy/components/game/hooks/useGameActions.ts` ```typescript import { useState, useCallback } from "react"; @@ -923,7 +923,7 @@ export function useGameActions(matchId: string | undefined) { **Commit:** ```bash -git add apps/web/src/components/game/hooks/useGameActions.ts +git add apps/web-tanstack/src/legacy/components/game/hooks/useGameActions.ts git commit -m "feat(ui): add useGameActions hook wrapping all command types" ``` @@ -932,12 +932,12 @@ git commit -m "feat(ui): add useGameActions hook wrapping all command types" ### Task 6: Build core game board components **Files:** -- Create: `apps/web/src/components/game/LPBar.tsx` -- Create: `apps/web/src/components/game/PhaseBar.tsx` -- Create: `apps/web/src/components/game/BoardSlot.tsx` -- Create: `apps/web/src/components/game/FieldRow.tsx` -- Create: `apps/web/src/components/game/HandCard.tsx` -- Create: `apps/web/src/components/game/PlayerHand.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/LPBar.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/PhaseBar.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/BoardSlot.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/FieldRow.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/HandCard.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/PlayerHand.tsx` Each component should use the zine aesthetic (paper-panel, ink borders, Special Elite font, #121212 ink, #ffcc00 accent). Use Framer Motion for hover/tap animations. Use `cardLookup` to resolve card names and stats from IDs. @@ -960,7 +960,7 @@ These are UI-only components — no game logic, just rendering + click callbacks **Commit after creating all 6:** ```bash -git add apps/web/src/components/game/ +git add apps/web-tanstack/src/legacy/components/game/ git commit -m "feat(ui): add core board components — LPBar, PhaseBar, BoardSlot, FieldRow, HandCard, PlayerHand" ``` @@ -969,10 +969,10 @@ git commit -m "feat(ui): add core board components — LPBar, PhaseBar, BoardSlo ### Task 7: Build action sheets and selectors **Files:** -- Create: `apps/web/src/components/game/ActionSheet.tsx` -- Create: `apps/web/src/components/game/TributeSelector.tsx` -- Create: `apps/web/src/components/game/AttackTargetSelector.tsx` -- Create: `apps/web/src/components/game/GraveyardBrowser.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/ActionSheet.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/TributeSelector.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/AttackTargetSelector.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/GraveyardBrowser.tsx` **ActionSheet**: Bottom sheet modal (Framer Motion slide-up). Shows card name + options based on card type: - Monster in hand: "Summon ATK" / "Summon DEF" / "Set Face-Down" / Cancel @@ -990,10 +990,10 @@ git commit -m "feat(ui): add core board components — LPBar, PhaseBar, BoardSlo **Commit:** ```bash -git add apps/web/src/components/game/ActionSheet.tsx -git add apps/web/src/components/game/TributeSelector.tsx -git add apps/web/src/components/game/AttackTargetSelector.tsx -git add apps/web/src/components/game/GraveyardBrowser.tsx +git add apps/web-tanstack/src/legacy/components/game/ActionSheet.tsx +git add apps/web-tanstack/src/legacy/components/game/TributeSelector.tsx +git add apps/web-tanstack/src/legacy/components/game/AttackTargetSelector.tsx +git add apps/web-tanstack/src/legacy/components/game/GraveyardBrowser.tsx git commit -m "feat(ui): add ActionSheet, TributeSelector, AttackTargetSelector, GraveyardBrowser" ``` @@ -1002,8 +1002,8 @@ git commit -m "feat(ui): add ActionSheet, TributeSelector, AttackTargetSelector, ### Task 8: Build GameBoard root component and wire into Play page **Files:** -- Create: `apps/web/src/components/game/GameBoard.tsx` -- Modify: `apps/web/src/pages/Play.tsx` — replace skeleton with GameBoard +- Create: `apps/web-tanstack/src/legacy/components/game/GameBoard.tsx` +- Modify: `apps/web-tanstack/src/legacy/pages/Play.tsx` — replace skeleton with GameBoard **GameBoard.tsx**: The root layout component. Manages selection state: - `selectedHandCard: string | null` @@ -1030,7 +1030,7 @@ ActionSheet callbacks route to appropriate `useGameActions` methods. **Commit:** ```bash -git add apps/web/src/components/game/GameBoard.tsx apps/web/src/pages/Play.tsx +git add apps/web-tanstack/src/legacy/components/game/GameBoard.tsx apps/web-tanstack/src/legacy/pages/Play.tsx git commit -m "feat(ui): build GameBoard root component and wire into Play page" ``` @@ -1310,14 +1310,14 @@ git commit -m "feat(engine): add chain/priority system with LIFO resolution" ### Task 11: Build ChainPrompt frontend component **Files:** -- Create: `apps/web/src/components/game/ChainPrompt.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/ChainPrompt.tsx` Bottom-overlay prompt shown when opponent activates something and player has activatable traps. Shows: "Opponent activated [card]! Respond?" with list of activatable traps and a "Pass" button. 5-second auto-pass timer (countdown shown). Calls `chainResponse()` from useGameActions. **Commit:** ```bash -git add apps/web/src/components/game/ChainPrompt.tsx +git add apps/web-tanstack/src/legacy/components/game/ChainPrompt.tsx git commit -m "feat(ui): add ChainPrompt component for trap response window" ``` @@ -1326,14 +1326,14 @@ git commit -m "feat(ui): add ChainPrompt component for trap response window" ### Task 12: Build GameOverOverlay **Files:** -- Create: `apps/web/src/components/game/GameOverOverlay.tsx` +- Create: `apps/web-tanstack/src/legacy/components/game/GameOverOverlay.tsx` Full-screen overlay with victory/defeat result. Shows stars, rewards (for story mode), and navigation buttons. Reuses existing VictoryScreen for story mode, adds a simpler overlay for non-story matches. **Commit:** ```bash -git add apps/web/src/components/game/GameOverOverlay.tsx +git add apps/web-tanstack/src/legacy/components/game/GameOverOverlay.tsx git commit -m "feat(ui): add GameOverOverlay component" ``` @@ -1385,21 +1385,21 @@ packages/engine/src/effects/interpreter.ts packages/engine/src/effects/operations.ts packages/engine/src/rules/chain.ts packages/engine/src/__tests__/effects.test.ts -apps/web/src/components/game/hooks/useGameState.ts -apps/web/src/components/game/hooks/useGameActions.ts -apps/web/src/components/game/GameBoard.tsx -apps/web/src/components/game/PlayerHand.tsx -apps/web/src/components/game/HandCard.tsx -apps/web/src/components/game/FieldRow.tsx -apps/web/src/components/game/BoardSlot.tsx -apps/web/src/components/game/PhaseBar.tsx -apps/web/src/components/game/LPBar.tsx -apps/web/src/components/game/ActionSheet.tsx -apps/web/src/components/game/TributeSelector.tsx -apps/web/src/components/game/AttackTargetSelector.tsx -apps/web/src/components/game/GraveyardBrowser.tsx -apps/web/src/components/game/ChainPrompt.tsx -apps/web/src/components/game/GameOverOverlay.tsx +apps/web-tanstack/src/legacy/components/game/hooks/useGameState.ts +apps/web-tanstack/src/legacy/components/game/hooks/useGameActions.ts +apps/web-tanstack/src/legacy/components/game/GameBoard.tsx +apps/web-tanstack/src/legacy/components/game/PlayerHand.tsx +apps/web-tanstack/src/legacy/components/game/HandCard.tsx +apps/web-tanstack/src/legacy/components/game/FieldRow.tsx +apps/web-tanstack/src/legacy/components/game/BoardSlot.tsx +apps/web-tanstack/src/legacy/components/game/PhaseBar.tsx +apps/web-tanstack/src/legacy/components/game/LPBar.tsx +apps/web-tanstack/src/legacy/components/game/ActionSheet.tsx +apps/web-tanstack/src/legacy/components/game/TributeSelector.tsx +apps/web-tanstack/src/legacy/components/game/AttackTargetSelector.tsx +apps/web-tanstack/src/legacy/components/game/GraveyardBrowser.tsx +apps/web-tanstack/src/legacy/components/game/ChainPrompt.tsx +apps/web-tanstack/src/legacy/components/game/GameOverOverlay.tsx ``` ### Modified Files (4) @@ -1409,5 +1409,5 @@ packages/engine/src/engine.ts — legalMoves() + new evolve handlers packages/engine/src/rules/spellsTraps.ts — wire effects into activation packages/engine/src/__tests__/engine.test.ts — legalMoves tests convex/game.ts — AI heuristic logic -apps/web/src/pages/Play.tsx — wire in GameBoard +apps/web-tanstack/src/legacy/pages/Play.tsx — wire in GameBoard ``` diff --git a/docs/plans/2026-02-15-story-mode-implementation.md b/docs/plans/2026-02-15-story-mode-implementation.md index ac9ab10..9888ca1 100644 --- a/docs/plans/2026-02-15-story-mode-implementation.md +++ b/docs/plans/2026-02-15-story-mode-implementation.md @@ -15,7 +15,7 @@ The foundation. All other components consume this context. **Files:** -- Create: `apps/web/src/components/story/StoryProvider.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/StoryProvider.tsx` **Step 1: Create the provider** @@ -193,7 +193,7 @@ Expected: No TypeScript errors (unused export warnings OK) **Step 3: Commit** ```bash -git add apps/web/src/components/story/StoryProvider.tsx +git add apps/web-tanstack/src/legacy/components/story/StoryProvider.tsx git commit -m "feat(story): add StoryProvider context with cutscene queue and progression helpers" ``` @@ -202,7 +202,7 @@ git commit -m "feat(story): add StoryProvider context with cutscene queue and pr ### Task 2: DialogueBox — Typewriter Animated Dialogue **Files:** -- Create: `apps/web/src/components/story/DialogueBox.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/DialogueBox.tsx` **Step 1: Create the component** @@ -395,7 +395,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 3: Commit** ```bash -git add apps/web/src/components/story/DialogueBox.tsx +git add apps/web-tanstack/src/legacy/components/story/DialogueBox.tsx git commit -m "feat(story): add DialogueBox with typewriter animation and milunchlady avatars" ``` @@ -404,7 +404,7 @@ git commit -m "feat(story): add DialogueBox with typewriter animation and milunc ### Task 3: StoryIntro — Video Cutscene Player **Files:** -- Create: `apps/web/src/components/story/StoryIntro.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/StoryIntro.tsx` **Step 1: Create the component** @@ -524,7 +524,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 3: Commit** ```bash -git add apps/web/src/components/story/StoryIntro.tsx +git add apps/web-tanstack/src/legacy/components/story/StoryIntro.tsx git commit -m "feat(story): add StoryIntro video cutscene player with skip and graceful fallback" ``` @@ -533,8 +533,8 @@ git commit -m "feat(story): add StoryIntro video cutscene player with skip and g ### Task 4: ChapterMap — Comic Panel Grid **Files:** -- Create: `apps/web/src/components/story/ChapterMap.tsx` -- Modify: `apps/web/src/globals.css` (add comic panel CSS) +- Create: `apps/web-tanstack/src/legacy/components/story/ChapterMap.tsx` +- Modify: `apps/web-tanstack/src/styles/legacy.css` (add comic panel CSS) **Step 1: Create the component** @@ -710,7 +710,7 @@ export function ChapterMap() { **Step 2: Add CSS for comic panels to globals.css** -Append to `apps/web/src/globals.css` after the existing `.shadow-zine-lg` block (after line 438): +Append to `apps/web-tanstack/src/styles/legacy.css` after the existing `.shadow-zine-lg` block (after line 438): ```css /* Comic Panel Grid */ @@ -756,7 +756,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 4: Commit** ```bash -git add apps/web/src/components/story/ChapterMap.tsx apps/web/src/globals.css +git add apps/web-tanstack/src/legacy/components/story/ChapterMap.tsx apps/web-tanstack/src/styles/legacy.css git commit -m "feat(story): add ChapterMap comic panel grid with stagger animation" ``` @@ -765,7 +765,7 @@ git commit -m "feat(story): add ChapterMap comic panel grid with stagger animati ### Task 5: StagePanel — Individual Stage Card **Files:** -- Create: `apps/web/src/components/story/StagePanel.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/StagePanel.tsx` **Step 1: Create the component** @@ -901,7 +901,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 3: Commit** ```bash -git add apps/web/src/components/story/StagePanel.tsx +git add apps/web-tanstack/src/legacy/components/story/StagePanel.tsx git commit -m "feat(story): add StagePanel with stars, rewards preview, and difficulty badges" ``` @@ -910,7 +910,7 @@ git commit -m "feat(story): add StagePanel with stars, rewards preview, and diff ### Task 6: BattleTransition — Screen Transition Animations **Files:** -- Create: `apps/web/src/components/story/BattleTransition.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/BattleTransition.tsx` **Step 1: Create the component** @@ -1023,7 +1023,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 3: Commit** ```bash -git add apps/web/src/components/story/BattleTransition.tsx +git add apps/web-tanstack/src/legacy/components/story/BattleTransition.tsx git commit -m "feat(story): add BattleTransition with ink-splash, victory star, and defeat animations" ``` @@ -1032,7 +1032,7 @@ git commit -m "feat(story): add BattleTransition with ink-splash, victory star, ### Task 7: VictoryScreen — Post-Match Results **Files:** -- Create: `apps/web/src/components/story/VictoryScreen.tsx` +- Create: `apps/web-tanstack/src/legacy/components/story/VictoryScreen.tsx` **Step 1: Create the component** @@ -1222,7 +1222,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 3: Commit** ```bash -git add apps/web/src/components/story/VictoryScreen.tsx +git add apps/web-tanstack/src/legacy/components/story/VictoryScreen.tsx git commit -m "feat(story): add VictoryScreen with animated stars, reward counters, and next-stage flow" ``` @@ -1231,10 +1231,10 @@ git commit -m "feat(story): add VictoryScreen with animated stars, reward counte ### Task 8: Barrel Export + Wire Pages to Components **Files:** -- Create: `apps/web/src/components/story/index.ts` -- Modify: `apps/web/src/pages/Story.tsx` (replace with thin shell) -- Modify: `apps/web/src/pages/StoryChapter.tsx` (replace with thin shell) -- Modify: `apps/web/src/pages/Play.tsx` (add story overlay layer) +- Create: `apps/web-tanstack/src/legacy/components/story/index.ts` +- Modify: `apps/web-tanstack/src/legacy/pages/Story.tsx` (replace with thin shell) +- Modify: `apps/web-tanstack/src/legacy/pages/StoryChapter.tsx` (replace with thin shell) +- Modify: `apps/web-tanstack/src/legacy/pages/Play.tsx` (add story overlay layer) **Step 1: Create barrel export** @@ -1251,7 +1251,7 @@ export { VictoryScreen } from "./VictoryScreen"; **Step 2: Rewrite Story.tsx as thin shell** -Replace entire file `apps/web/src/pages/Story.tsx`: +Replace entire file `apps/web-tanstack/src/legacy/pages/Story.tsx`: ```tsx import { StoryProvider, ChapterMap, StoryIntro, DialogueBox } from "@/components/story"; @@ -1271,7 +1271,7 @@ export function Story() { **Step 3: Rewrite StoryChapter.tsx as thin shell with StagePanel** -Replace entire file `apps/web/src/pages/StoryChapter.tsx`: +Replace entire file `apps/web-tanstack/src/legacy/pages/StoryChapter.tsx`: ```tsx import { useState } from "react"; @@ -1399,7 +1399,7 @@ function StoryChapterInner() { **Step 4: Add story overlay layer to Play.tsx** -Add imports at top of `apps/web/src/pages/Play.tsx` (line 1-3), then wrap the game-over section with VictoryScreen. Replace lines 1-96 with: +Add imports at top of `apps/web-tanstack/src/legacy/pages/Play.tsx` (line 1-3), then wrap the game-over section with VictoryScreen. Replace lines 1-96 with: ```tsx import { useState, useCallback } from "react"; @@ -1524,7 +1524,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 6: Commit** ```bash -git add apps/web/src/components/story/index.ts apps/web/src/pages/Story.tsx apps/web/src/pages/StoryChapter.tsx apps/web/src/pages/Play.tsx +git add apps/web-tanstack/src/legacy/components/story/index.ts apps/web-tanstack/src/legacy/pages/Story.tsx apps/web-tanstack/src/legacy/pages/StoryChapter.tsx apps/web-tanstack/src/legacy/pages/Play.tsx git commit -m "feat(story): wire components into pages — Story, StoryChapter, and Play now use story components" ``` @@ -1535,7 +1535,7 @@ git commit -m "feat(story): wire components into pages — Story, StoryChapter, **Files:** - Modify: `convex/game.ts` (add `getStageWithNarrative` query) - Modify: `convex/http.ts` (add story progress + narrative endpoints) -- Modify: `apps/web/src/lib/iframe.ts` (add story postMessage types) +- Modify: `apps/web-tanstack/src/legacy/lib/iframe.ts` (add story postMessage types) **Step 1: Add narrative query to game.ts** @@ -1629,7 +1629,7 @@ cors.route({ **Step 3: Add story postMessage types to iframe.ts** -Add to the `GameToHost` type union in `apps/web/src/lib/iframe.ts` (after line 13): +Add to the `GameToHost` type union in `apps/web-tanstack/src/legacy/lib/iframe.ts` (after line 13): ```typescript | { type: "STORY_CUTSCENE"; cutsceneId: string; src: string } @@ -1650,7 +1650,7 @@ Run: `cd /Users/home/Desktop/LTCG-v2 && bun run --filter web build 2>&1 | head - **Step 5: Commit** ```bash -git add convex/game.ts convex/http.ts apps/web/src/lib/iframe.ts +git add convex/game.ts convex/http.ts apps/web-tanstack/src/legacy/lib/iframe.ts git commit -m "feat(story): add agent story API endpoints with JSON narrative payloads and iframe story messages" ``` @@ -1689,23 +1689,23 @@ git commit -m "fix(story): address smoke test issues" ### New files (8) ``` -apps/web/src/components/story/StoryProvider.tsx -apps/web/src/components/story/DialogueBox.tsx -apps/web/src/components/story/StoryIntro.tsx -apps/web/src/components/story/ChapterMap.tsx -apps/web/src/components/story/StagePanel.tsx -apps/web/src/components/story/BattleTransition.tsx -apps/web/src/components/story/VictoryScreen.tsx -apps/web/src/components/story/index.ts +apps/web-tanstack/src/legacy/components/story/StoryProvider.tsx +apps/web-tanstack/src/legacy/components/story/DialogueBox.tsx +apps/web-tanstack/src/legacy/components/story/StoryIntro.tsx +apps/web-tanstack/src/legacy/components/story/ChapterMap.tsx +apps/web-tanstack/src/legacy/components/story/StagePanel.tsx +apps/web-tanstack/src/legacy/components/story/BattleTransition.tsx +apps/web-tanstack/src/legacy/components/story/VictoryScreen.tsx +apps/web-tanstack/src/legacy/components/story/index.ts ``` ### Modified files (5) ``` -apps/web/src/pages/Story.tsx → thin shell -apps/web/src/pages/StoryChapter.tsx → thin shell + StagePanel -apps/web/src/pages/Play.tsx → VictoryScreen integration -apps/web/src/globals.css → comic panel + stamp CSS +apps/web-tanstack/src/legacy/pages/Story.tsx → thin shell +apps/web-tanstack/src/legacy/pages/StoryChapter.tsx → thin shell + StagePanel +apps/web-tanstack/src/legacy/pages/Play.tsx → VictoryScreen integration +apps/web-tanstack/src/styles/legacy.css → comic panel + stamp CSS convex/game.ts → narrative queries convex/http.ts → agent story endpoints -apps/web/src/lib/iframe.ts → story postMessage types +apps/web-tanstack/src/legacy/lib/iframe.ts → story postMessage types ``` diff --git a/docs/plans/2026-02-15-story-mode-refactor-design.md b/docs/plans/2026-02-15-story-mode-refactor-design.md index 6af1843..015ebaa 100644 --- a/docs/plans/2026-02-15-story-mode-refactor-design.md +++ b/docs/plans/2026-02-15-story-mode-refactor-design.md @@ -368,23 +368,23 @@ useEffect(() => { ### New files ``` -apps/web/src/components/story/StoryProvider.tsx -apps/web/src/components/story/StoryIntro.tsx -apps/web/src/components/story/DialogueBox.tsx -apps/web/src/components/story/ChapterMap.tsx -apps/web/src/components/story/StagePanel.tsx -apps/web/src/components/story/BattleTransition.tsx -apps/web/src/components/story/VictoryScreen.tsx -apps/web/src/components/story/index.ts # barrel export +apps/web-tanstack/src/legacy/components/story/StoryProvider.tsx +apps/web-tanstack/src/legacy/components/story/StoryIntro.tsx +apps/web-tanstack/src/legacy/components/story/DialogueBox.tsx +apps/web-tanstack/src/legacy/components/story/ChapterMap.tsx +apps/web-tanstack/src/legacy/components/story/StagePanel.tsx +apps/web-tanstack/src/legacy/components/story/BattleTransition.tsx +apps/web-tanstack/src/legacy/components/story/VictoryScreen.tsx +apps/web-tanstack/src/legacy/components/story/index.ts # barrel export ``` ### Modified files ``` -apps/web/src/pages/Story.tsx # Thin shell using ChapterMap -apps/web/src/pages/StoryChapter.tsx # Thin shell using StagePanel list -apps/web/src/pages/Play.tsx # Add story overlay layer -apps/web/src/globals.css # Cutscene + dialogue CSS -apps/web/src/lib/iframe.ts # New postMessage types +apps/web-tanstack/src/legacy/pages/Story.tsx # Thin shell using ChapterMap +apps/web-tanstack/src/legacy/pages/StoryChapter.tsx # Thin shell using StagePanel list +apps/web-tanstack/src/legacy/pages/Play.tsx # Add story overlay layer +apps/web-tanstack/src/styles/legacy.css # Cutscene + dialogue CSS +apps/web-tanstack/src/legacy/lib/iframe.ts # New postMessage types convex/http.ts # New agent story endpoints convex/game.ts # Enhanced queries with narrative data ``` diff --git a/docs/product/ROLL20_AI_STUDIO_RESEARCH.md b/docs/product/ROLL20_AI_STUDIO_RESEARCH.md index 52c14f7..1a76b3d 100644 --- a/docs/product/ROLL20_AI_STUDIO_RESEARCH.md +++ b/docs/product/ROLL20_AI_STUDIO_RESEARCH.md @@ -1,6 +1,9 @@ # Roll20-Inspired LunchTable TTG Research Date: February 18, 2026 +> Status (February 23, 2026): The in-repo studio runtime described here was removed from active product flows. +> This document is retained as product research history; code path references in section 4 are archival. + ## 1) What Roll20 still does well - Roll20 keeps onboarding simple with a fast game-lobby creation flow and campaign setup defaults. - Roll20's `Pro` tier supports Mod Scripts (API), which validates demand for creator-side automation and extensibility. @@ -22,15 +25,15 @@ Date: February 18, 2026 - Event loop: weekly world mutations and limited-time district/season states drive urgency. ## 4) Product architecture for this repo -- `apps/web/src/lib/ttrpgStudio/types.ts` defines the full creator data model: +- `apps/web-tanstack/src/legacy/lib/ttrpgStudio/types.ts` defines the full creator data model: rulesets, dice moves, archetypes, agent profiles, maps, dungeons, campaign arcs, and creation kits. -- `apps/web/src/lib/ttrpgStudio/generatorAssets.ts` defines reusable AI prompt recipes and export contracts. -- `apps/web/src/lib/ttrpgStudio/worlds.ts` ships three complete worlds with playable campaign scaffolds and asset manifests. -- `apps/web/src/pages/Studio.tsx` is the user-facing world library + creator panel. +- `apps/web-tanstack/src/legacy/lib/ttrpgStudio/generatorAssets.ts` defines reusable AI prompt recipes and export contracts. +- `apps/web-tanstack/src/legacy/lib/ttrpgStudio/worlds.ts` ships three complete worlds with playable campaign scaffolds and asset manifests. +- `apps/web-tanstack/src/legacy/pages/Studio.tsx` is the user-facing world library + creator panel. - Routing/nav integration: - - `apps/web/src/App.tsx` - - `apps/web/src/pages/Home.tsx` - - `apps/web/src/components/layout/TrayNav.tsx` + - `apps/web-tanstack/src/legacy/App.tsx` + - `apps/web-tanstack/src/legacy/pages/Home.tsx` + - `apps/web-tanstack/src/legacy/components/layout/TrayNav.tsx` ## 5) Three completed worlds included - `Neon Borough: Vice Circuit` (cyberpunk urban fantasy) diff --git a/progress.md b/progress.md index 66b889b..517720c 100644 --- a/progress.md +++ b/progress.md @@ -1,7 +1,7 @@ Original prompt: research roll20.net and then research what a truly viral modern rpg with elizaOS/milaidyAI agents playing along as narrator/dungeon master, and players. with awesome 3d graphics and game designing, build a roll20 game creation platform as well with ai, and the character generation, the story mode generation, the dice, rules, maps, dungeons, everything imaginable to be a full featured table top game creator, and game library where users can play already completley crafted worlds with their agents, or the hosted agents we have as well. it needs 3 completed worlds and games, along with everything used to create them ## Progress Log -- Added a new Lunchtable TTG TTG studio domain model and three complete world definitions under `apps/web/src/lib/ttrpgStudio/`. +- Added a new Lunchtable TTG TTG studio domain model and three complete world definitions under `apps/web-tanstack/src/legacy/lib/ttrpgStudio/`. - Added a new `Studio` page and route (`/studio`) to browse worlds and inspect all creation artifacts, prompt packs, maps, dungeons, and campaign arcs. - Wired navigation entries from home and tray menu to the studio. - Updated branding label from "RPG Studio"/"Agent RPG Studio" to "Lunchtable TTG TTG" in core UI and research doc headings. diff --git a/reference/frontend/components/game/effects/README.md b/reference/frontend/components/game/effects/README.md index 56f98c2..b943645 100644 --- a/reference/frontend/components/game/effects/README.md +++ b/reference/frontend/components/game/effects/README.md @@ -16,7 +16,7 @@ This system provides clear visual indicators when effects trigger and resolve, h ### 1. EffectFeedback Component -Location: `apps/web/src/components/game/effects/EffectFeedback.tsx` +Location: `apps/web-tanstack/src/legacy/components/game/effects/EffectFeedback.tsx` Main component providing floating numbers and card animations. @@ -84,7 +84,7 @@ function GameBoard() { ### 2. EffectQueueWidget Component -Location: `apps/web/src/components/game/effects/EffectQueueWidget.tsx` +Location: `apps/web-tanstack/src/legacy/components/game/effects/EffectQueueWidget.tsx` Displays pending effects waiting to resolve in order. @@ -117,7 +117,7 @@ function GameBoard() { ### 3. Enhanced Toast Notifications -Location: `apps/web/src/lib/effectToasts.ts` +Location: `apps/web-tanstack/src/legacy/lib/effectToasts.ts` Categorized toast system with icons and colors for different effect types. @@ -168,7 +168,7 @@ showStatBoost("Dark Magician", "ATK", 500); ### 4. BoardCard Enhancements -Location: `apps/web/src/components/game/board/cards/BoardCard.tsx` +Location: `apps/web-tanstack/src/legacy/components/game/board/cards/BoardCard.tsx` Added indicators for card states: @@ -253,7 +253,7 @@ return ( ### CSS Animations -Location: `apps/web/app/globals.css` +Location: `apps/web-tanstack/src/styles/legacy.css` New animations added: