chore(frontend): scaffold Vite + React 18 + TypeScript under frontend/

This commit is contained in:
Claude
2026-08-28 16:00:34 +00:00
parent bc56e9edf1
commit c4c650e3d0
14 changed files with 3407 additions and 0 deletions

11
.gitignore vendored
View File

@@ -12,3 +12,14 @@ obj/
## OS files
.DS_Store
# Frontend build artifacts + node modules
frontend/node_modules/
frontend/dist/
frontend/.vite/
frontend/playwright-report/
frontend/test-results/
# SPA build output — .gitkeep tracks the folder, everything inside is generated
src/VolcanicCore.Api/wwwroot/*
!src/VolcanicCore.Api/wwwroot/.gitkeep

9
frontend/.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
node_modules
dist
dist-tsconfig-node
*.tsbuildinfo
.vite
playwright-report
test-results
.env
.env.local

12
frontend/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>VolcanicCore</title>
</head>
<body class="bg-slate-950 text-slate-100">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

41
frontend/package.json Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "volcaniccore-frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"typecheck": "tsc -b",
"test": "vitest run",
"test:watch": "vitest",
"test:e2e": "playwright test"
},
"dependencies": {
"@tanstack/react-query": "^5.59.0",
"@xyflow/react": "^12.3.0",
"lucide-react": "^0.453.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.27.0"
},
"devDependencies": {
"@playwright/test": "^1.48.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^26.4.0",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"jsdom": "^25.0.1",
"msw": "^2.4.9",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2",
"vite": "^5.4.8",
"vitest": "^2.1.2"
}
}

3260
frontend/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
packages:
- .

3
frontend/src/App.tsx Normal file
View File

@@ -0,0 +1,3 @@
export default function App() {
return <div className="p-6">VolcanicCore</div>;
}

1
frontend/src/index.css Normal file
View File

@@ -0,0 +1 @@
/* replaced with Tailwind directives in Task 2 */

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

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

View File

@@ -0,0 +1 @@
import "@testing-library/jest-dom/vitest";

22
frontend/tsconfig.json Normal file
View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"types": ["vitest/globals", "@testing-library/jest-dom"]
},
"include": ["src", "e2e"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@@ -0,0 +1,14 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true,
"noEmit": false,
"outDir": "./dist-tsconfig-node",
"types": ["node", "vitest"]
},
"include": ["vite.config.ts", "playwright.config.ts", "tailwind.config.ts", "postcss.config.js"]
}

21
frontend/vite.config.ts Normal file
View File

@@ -0,0 +1,21 @@
/// <reference types="vitest" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
export default defineConfig({
plugins: [react()],
resolve: {
alias: { "@": path.resolve(__dirname, "src") },
},
build: {
outDir: path.resolve(__dirname, "../src/VolcanicCore.Api/wwwroot"),
emptyOutDir: true,
},
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./src/test-setup.ts"],
css: false,
},
});

View File