diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/frontend/commander-ai-lab-ui/.gitignore b/frontend/commander-ai-lab-ui/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/frontend/commander-ai-lab-ui/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/frontend/commander-ai-lab-ui/README.md b/frontend/commander-ai-lab-ui/README.md deleted file mode 100644 index d2e7761..0000000 --- a/frontend/commander-ai-lab-ui/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# React + TypeScript + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## React Compiler - -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: - -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` - -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: - -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) -``` diff --git a/frontend/commander-ai-lab-ui/eslint.config.js b/frontend/commander-ai-lab-ui/eslint.config.js deleted file mode 100644 index 5e6b472..0000000 --- a/frontend/commander-ai-lab-ui/eslint.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' -import { defineConfig, globalIgnores } from 'eslint/config' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - js.configs.recommended, - tseslint.configs.recommended, - reactHooks.configs.flat.recommended, - reactRefresh.configs.vite, - ], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - }, -]) diff --git a/frontend/commander-ai-lab-ui/index.html b/frontend/commander-ai-lab-ui/index.html deleted file mode 100644 index b3a1613..0000000 --- a/frontend/commander-ai-lab-ui/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - -
- - - -{description}
} - {action} -{result.commander.type_line}
-{result.commander.oracle_text}
-| Card | -Category | -Role | -Mana | -Price | -Status | -
|---|---|---|---|---|---|
| - {card.quantity}x {card.name} - {card.is_substitute && ( - sub for {card.original_name} - )} - | -{card.category} | -{card.role} | -{card.tcg_price != null ? `$${card.tcg_price.toFixed(2)}` : '—'} | -- - {card.owned ? `Owned (${card.owned_qty})` : 'Missing'} - - | -
{selectedCard.type_line}
-{selectedCard.reason}
-AI-powered deck generation with Perplexity
-{commander.name}
-{commander.type_line}
-No decks available. Import or install precons.
- ) : ( -Run mass simulations between decks
-Selected: {selected.size} decks
-| Deck | -Wins | -Games | -Win Rate | -Avg Turns | -
|---|---|---|---|---|
|
- {i === 0 && |
- {d.wins} | -{d.games} | -{(d.win_rate * 100).toFixed(1)}% | -{d.avg_turns.toFixed(1)} | -
{h.decks.join(' vs ')}
-{new Date(h.timestamp).toLocaleString()} · {h.total_games} games
-- {new Date(session.timestamp).toLocaleString()} · {session.modelUsed} - {session.promptTokens > 0 && ` · ${session.promptTokens + session.completionTokens} tokens`} -
-{session.summary}
-{session.manaBaseAdvice}
-{cut.cardName}
-{cut.reason}
- {cut.replacementOptions?.length > 0 && ( -- Replace with: {cut.replacementOptions.join(', ')} -
- )} -{add.cardName}
- {add.role && ( - - {add.role} - - )} -{add.reason}
- {add.synergyWith?.length > 0 && ( -- Synergy: {add.synergyWith.join(', ')} -
- )} -- {applyResult.total_cuts > 0 && `Removed ${applyResult.total_cuts} card(s). `} - {applyResult.total_adds > 0 && `Added ${applyResult.total_adds} card(s). `} - {applyResult.errors.length > 0 && `${applyResult.errors.length} error(s).`} -
- {applyResult.errors.length > 0 && ( -- {session.rawTextExplanation} -
-{card.name}
- - {(card.similarity * 100).toFixed(0)}% - -{card.types}
- {card.text && ( -{card.text}
- )} -- {goals.metaFocus && `${goals.metaFocus} · `} - {goals.targetPowerLevel && `Power ${goals.targetPowerLevel} · `} - {goals.budget && `${goals.budget}`} -
-Ask your coach anything about this deck.
-- AI-powered deck analysis, coaching, and live chat -
-{deck.commander}
-- Find similar cards using AI embeddings. Search by card name to discover alternatives. -
-{card.type_line}
-{card.oracle_text}
-{card.set_name} ({card.set_code.toUpperCase()})
-{card.rarity}
-{card.cmc}
-{card.edhrec_rank ?? 'N/A'}
-{card.quantity} (+ {card.foil_quantity} foil)
-- ${card.tcg_price?.toFixed(2) ?? '—'} - {card.foil_price ? Foil: ${card.foil_price.toFixed(2)} : null} -
-{m.name}
-{m.set_name} — {(m.confidence * 100).toFixed(0)}%
-{total.toLocaleString()} cards in your collection
-{card.name}
-| Card | -Type | -Mana | -Set | -Qty | -Price | -
|---|---|---|---|---|---|
| - {card.name} - | -{card.type_line} | -{card.set_code.toUpperCase()} | -{card.quantity} | -{card.tcg_price != null ? `$${card.tcg_price.toFixed(2)}` : '—'} | -
{error}
- -{rec.name}
-{error}
- -Deck needs more:
-{rec.name}
-{stat.label}
-{stat.value}
-{decks.length} deck{decks.length !== 1 ? 's' : ''}
-{deck.commander}
-Run head-to-head deck simulations
-Simulation running...
- {simStatus && ( -- {simStatus.games_completed ?? 0} / {simStatus.total_games ?? games} games -
- )} -{d.name}
-Wins
-{d.wins}
-Win Rate
-{(d.win_rate * 100).toFixed(1)}%
-Avg Turn
-{d.avg_turn.toFixed(1)}
-{label}
-{value}
-Collect data, train models, and evaluate performance
-- Run batch simulations with ML logging enabled to collect decision data. -
- -{split}
- {ds ? ( - <> -{ds.samples.toLocaleString()}
-{ds.features} features
- > - ) : ( -Not built
- )} -No dataset built yet. Training will build it automatically.
- )} -No checkpoints yet. Train a model to generate them.
- )} -- Fine-tune the supervised model using PPO self-play against an opponent policy. -
- - {/* Config */} -Train a supervised model first (Phase 3) before running PPO.
- )} - - - {/* ═══ Phase 5: Tournament Evaluation ═══ */} - } color="text-accent-amber" defaultOpen={false}> -- Pit the trained model against heuristic, random, and other policy variants. -
- -| # | -Policy | -Wins | -Games | -Win Rate | -
|---|---|---|---|---|
|
- {i === 0 ? |
- - {p.name} - | -{p.wins} | -{p.games} | -- {(p.win_rate * 100).toFixed(1)}% - | -
{reason}
-Loading...
- ) : rooms.length === 0 ? ( -No rooms available. Create one!
- ) : ( -- Run N-player Monte Carlo simulations with your decks. -
- - {/* Deck Selection */} -Loading decks...
- )} -| Seat | -Deck | -Wins | -Win% | -Avg Turns | -Avg Dmg | -Avg Spells | -Avg Creatures | -Avg Removal | -
|---|---|---|---|---|---|---|---|---|
| - P{p.seat + 1} - | -{p.deckName} | -{p.wins} | -{p.winRate}% | -{p.avgTurns} | -{p.avgDamageDealt} | -{p.avgSpellsCast} | -{p.avgCreaturesPlayed} | -{p.avgRemovalUsed} | -