{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Backend: flask run (:5001)",
      "type": "shell",
      "command": "${workspaceFolder}/venv/bin/flask run --port 5001",
      "options": {
        "cwd": "${workspaceFolder}",
        "env": { "FLASK_APP": "shopdb" }
      },
      "windows": {
        "command": "${workspaceFolder}\\venv\\Scripts\\flask.exe run --port 5001"
      },
      "isBackground": true,
      "problemMatcher": []
    },
    {
      "label": "Frontend: npm run dev (:5173)",
      "type": "shell",
      "command": "npm run dev",
      "options": { "cwd": "${workspaceFolder}/frontend" },
      "isBackground": true,
      "problemMatcher": []
    },
    {
      "label": "Dev site (backend + frontend)",
      "dependsOn": [
        "Backend: flask run (:5001)",
        "Frontend: npm run dev (:5173)"
      ],
      "dependsOrder": "parallel",
      "problemMatcher": []
    },
    {
      "label": "Check: naming + tests + build",
      "type": "shell",
      "command": "bash scripts/check-naming-and-style.sh && venv/bin/python -m pytest tests/ -q && cd frontend && npx vitest run && npm run build",
      "windows": {
        "command": "bash scripts/check-naming-and-style.sh && venv\\Scripts\\python -m pytest tests/ -q && cd frontend && npx vitest run && npm run build"
      },
      "options": { "cwd": "${workspaceFolder}" },
      "problemMatcher": []
    }
  ]
}
