version: 1
id: tech_stack
title: Technology Stack Baseline
sources:
  project_md:
    path: openspec/project.md
    lines: "6-38"
  package_json:
    path: package.json

runtime:
  language: TypeScript
  module_system: ESM
  evidence:
    - package.json:5

frontend:
  framework:
    name: react
    version: "18.x"
  router:
    name: react-router-dom
    version: "6.x"
  build_tool:
    name: vite
    version: "4.x"
  ui:
    - name: antd
      version: "5.x"
    - name: tailwindcss
      version: "3.x"
    - name: tailwind-merge
      version: "3.x"
  state:
    - name: zustand
      version: "4.x"
  http_client:
    - name: axios
      version: "1.x"

backend:
  platform: nodejs
  framework:
    name: express
    version: "4.x"
  dev_runtime:
    - name: tsx
      purpose: "运行 TypeScript 后端入口"
    - name: nodemon
      purpose: "热重载"
  middlewares:
    - name: cors
    - name: multer
      purpose: "文件上传"
  data:
    database:
      engine: sqlite3
      mode: "file-based"
  utilities:
    - name: dotenv
    - name: uuid

file_processing:
  excel:
    - name: xlsx
      purpose: "Excel 导入/导出"

dev_workflow:
  scripts:
    dev: "concurrently \"npm run dev:api\" \"npm run dev:frontend\""
    dev_api: "nodemon --exec tsx api/server.ts"
    dev_frontend: "vite"
    check: "tsc --noEmit"
    build: "tsc && vite build"
    start: "node dist/api/server.js"
  ports:
    frontend_dev_default: 5173
    backend_dev_default: 3001
  proxy:
    frontend_to_backend:
      path_prefix: /api
      target: "http://localhost:3001"
      evidence:
        - openspec/project.md:29

build_output:
  directory: dist
  notes: "前后端构建产物共享 dist 目录（见 project.md 约定）。"

environment_variables:
  PORT:
    description: "后端监听端口"
    default: 3001
  DB_PATH:
    description: "SQLite 数据库文件路径"
    default: "data/survey.db"

