From 0f891fa0132a6ffa5d7beb8d240d6557b5dfa02b Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Thu, 16 Apr 2026 15:54:32 -0600 Subject: [PATCH] feat(chess): scaffold Vite + React app (P3.9) --- packages/chess/index.html | 12 +++++++++ packages/chess/package.json | 5 +++- packages/chess/src/app/App.tsx | 46 ++++++++++++++++++++++++++++++++ packages/chess/src/app/index.css | 1 + packages/chess/src/app/main.tsx | 17 ++++++++++++ packages/chess/vite.config.ts | 10 +++++++ 6 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 packages/chess/index.html create mode 100644 packages/chess/src/app/App.tsx create mode 100644 packages/chess/src/app/index.css create mode 100644 packages/chess/src/app/main.tsx create mode 100644 packages/chess/vite.config.ts diff --git a/packages/chess/index.html b/packages/chess/index.html new file mode 100644 index 0000000..519fe47 --- /dev/null +++ b/packages/chess/index.html @@ -0,0 +1,12 @@ + + + + + + Chess App + + +
+ + + diff --git a/packages/chess/package.json b/packages/chess/package.json index 68159a2..74a5e61 100644 --- a/packages/chess/package.json +++ b/packages/chess/package.json @@ -8,7 +8,10 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@paratype/rete": "workspace:*" + "@paratype/rete": "workspace:*", + "@tailwindcss/vite": "^4.2.2", + "react-router-dom": "^7.14.1", + "tailwindcss": "^4.2.2" }, "devDependencies": { "vite": "^6.0.0", diff --git a/packages/chess/src/app/App.tsx b/packages/chess/src/app/App.tsx new file mode 100644 index 0000000..e67e411 --- /dev/null +++ b/packages/chess/src/app/App.tsx @@ -0,0 +1,46 @@ +import { Routes, Route } from 'react-router-dom' + +export function App() { + return ( +
+ + } /> + } /> + } /> + } /> + +
+ ) +} + +function Home() { + return ( +
+

Home

+
+ ) +} + +function Game() { + return ( +
+

Game

+
+ ) +} + +function Rules() { + return ( +
+

Rules

+
+ ) +} + +function Save() { + return ( +
+

Save

+
+ ) +} diff --git a/packages/chess/src/app/index.css b/packages/chess/src/app/index.css new file mode 100644 index 0000000..f1d8c73 --- /dev/null +++ b/packages/chess/src/app/index.css @@ -0,0 +1 @@ +@import "tailwindcss"; diff --git a/packages/chess/src/app/main.tsx b/packages/chess/src/app/main.tsx new file mode 100644 index 0000000..573ed1c --- /dev/null +++ b/packages/chess/src/app/main.tsx @@ -0,0 +1,17 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { BrowserRouter } from 'react-router-dom' +import './index.css' +import { App } from './App' + +const container = document.getElementById('root') +if (!container) throw new Error('Failed to find the root element') + +const root = createRoot(container) +root.render( + + + + + +) diff --git a/packages/chess/vite.config.ts b/packages/chess/vite.config.ts new file mode 100644 index 0000000..a94a568 --- /dev/null +++ b/packages/chess/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' + +export default defineConfig({ + plugins: [ + tailwindcss(), + react() + ], +})