Загрузить файлы в «frontend»

This commit is contained in:
Gregory Bednov 2026-06-20 13:28:03 +03:00
commit a5ce5a58de
5 changed files with 1915 additions and 0 deletions

1839
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

29
frontend/package.json Normal file
View file

@ -0,0 +1,29 @@
{
"name": "simpy-terns-graph-frontend",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite --host 127.0.0.1",
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.node.json",
"build": "npm run typecheck && vite build",
"preview": "vite preview --host 127.0.0.1"
},
"dependencies": {
"@vitejs/plugin-react": "^5.0.4",
"cytoscape": "^3.33.1",
"cytoscape-dagre": "^2.5.0",
"dagre": "^0.8.5",
"lucide-react": "^0.468.0",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"vite": "^7.1.11"
},
"devDependencies": {
"@types/cytoscape-dagre": "^2.3.4",
"@types/node": "^25.9.1",
"@types/react": "^19.1.16",
"@types/react-dom": "^19.1.9",
"typescript": "^5.9.3"
}
}

21
frontend/tsconfig.json Normal file
View file

@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ES2022",
"useDefineForClassFields": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"types": ["vite/client"],
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}

View file

@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"module": "ESNext",
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"noEmit": true,
"types": ["node"]
},
"include": ["vite.config.ts"]
}

14
frontend/vite.config.ts Normal file
View file

@ -0,0 +1,14 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
server: {
proxy: {
"/api": {
target: process.env.VITE_GRAPH_API_URL ?? "http://127.0.0.1:8765",
changeOrigin: true,
},
},
},
});