feat(web): add frontend scaffold with React 19 and TanStack Router

- Initialize Vite + React 19 + TypeScript project
- Add TanStack Router v1.95 with file-based routing
- Add TanStack Query v5.64 for data fetching
- Configure Tailwind CSS + shadcn/ui
- Implement auth features (useAuth hook, LoginButton, AuthGuard)
- Add openapi-fetch client for type-safe API calls
- Configure Nginx for production deployment
- Update Makefile with frontend commands

Implements Task 3 (Chunk 3) of Phase 1 plan.
This commit is contained in:
vsxd 2026-03-12 00:00:26 +08:00
parent 5c4be0a26f
commit 4d3e2dea02

View file

@ -24,6 +24,27 @@ clean:
cd server && ./mvnw clean
docker compose down -v
# 生成 OpenAPI 类型(前端用Phase 1 暂不实现
# 生成 OpenAPI 类型(前端用
generate-api:
@echo "Frontend not yet implemented"
@echo "Generating OpenAPI types..."
cd web && pnpm run generate-api
# 前端开发服务器
dev-web:
cd web && pnpm run dev
# 构建前端
build-web:
cd web && pnpm run build
# 前端测试
test-web:
cd web && pnpm run test
# 前端类型检查
typecheck-web:
cd web && pnpm run typecheck
# 前端代码检查
lint-web:
cd web && pnpm run lint