chore: initial project scaffold with Fastify server and Vite React app

Set up monorepo structure with server/ (Fastify + TypeScript) and web/ (React + Vite + TypeScript).
Includes package configs, dev proxy setup, and mobile-first CSS foundation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bas van Rossem
2026-02-19 16:14:30 +01:00
commit 6d60d714d0
17 changed files with 6102 additions and 0 deletions

12
web/index.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spelljammer Ship Tracker</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

3164
web/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

26
web/package.json Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "spelljammer-web",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^7.2.0",
"zustand": "^5.0.3",
"socket.io-client": "^4.8.1",
"react-markdown": "^9.0.3"
},
"devDependencies": {
"typescript": "^5.7.3",
"vite": "^6.1.0",
"@vitejs/plugin-react": "^4.3.4",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0"
}
}

10
web/src/App.tsx Normal file
View File

@@ -0,0 +1,10 @@
function App() {
return (
<div className="app">
<h1>Spelljammer Ship Tracker</h1>
<p>App is running. Routes coming soon.</p>
</div>
);
}
export default App;

90
web/src/index.css Normal file
View File

@@ -0,0 +1,90 @@
:root {
--color-bg: #1a1a2e;
--color-surface: #16213e;
--color-surface-hover: #1a2744;
--color-primary: #e94560;
--color-primary-hover: #c73a52;
--color-accent: #0f3460;
--color-text: #eee;
--color-text-muted: #999;
--color-border: #2a2a4a;
--color-success: #4caf50;
--color-warning: #ff9800;
--color-danger: #f44336;
--radius: 8px;
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
--max-width: 600px;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 16px;
-webkit-text-size-adjust: 100%;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
background-color: var(--color-bg);
color: var(--color-text);
line-height: 1.5;
min-height: 100dvh;
}
#root {
min-height: 100dvh;
}
.app {
max-width: var(--max-width);
margin: 0 auto;
padding: var(--spacing-md);
}
button {
font: inherit;
cursor: pointer;
border: none;
border-radius: var(--radius);
padding: var(--spacing-sm) var(--spacing-md);
transition: background-color 0.15s;
}
input,
select,
textarea {
font: inherit;
color: var(--color-text);
background-color: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: var(--spacing-sm) var(--spacing-md);
width: 100%;
}
input:focus,
select:focus,
textarea:focus {
outline: 2px solid var(--color-primary);
outline-offset: -1px;
}
a {
color: var(--color-primary);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}

10
web/src/main.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';
import './index.css';
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);

21
web/tsconfig.json Normal file
View File

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
}

16
web/vite.config.ts Normal file
View File

@@ -0,0 +1,16 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/api': 'http://localhost:3000',
'/socket.io': {
target: 'http://localhost:3000',
ws: true,
},
},
},
});