{
  "dependencies": {
    "@core/social": "file:core/social",
    "@nestjs/swagger": "7.4.2",
    "bcrypt": "^6.0.0",
    "electron-vite": "3.1.0",
    "next": "15.5.9",
    "playwright-extra": "^4.3.6",
    "puppeteer-extra-plugin-stealth": "^2.11.2",
    "reflect-metadata": "^0.2.2",
    "tsyringe": "^4.10.0",
    "uuid": "^13.0.0",
    "vite": "6.4.1"
  },
  "description": "GridPilot - Clean Architecture monorepo for web platform and Electron companion app",
  "devDependencies": {
    "@cucumber/cucumber": "^11.0.1",
    "@nestjs/common": "10.4.20",
    "@nestjs/core": "10.4.20",
    "@nestjs/platform-express": "10.4.20",
    "@nestjs/testing": "10.4.20",
    "@playwright/test": "^1.57.0",
    "@testing-library/jest-dom": "^6.9.1",
    "@testing-library/react": "^16.3.0",
    "@types/bcrypt": "^6.0.0",
    "@types/express": "^4.17.21",
    "@types/jsdom": "^27.0.0",
    "@types/node": "^24.10.1",
    "@types/supertest": "^6.0.3",
    "@typescript-eslint/eslint-plugin": "^6.0.0",
    "@typescript-eslint/parser": "^6.0.0",
    "@vitest/coverage-v8": "^4.0.16",
    "@vitest/ui": "^4.0.16",
    "cheerio": "^1.0.0",
    "commander": "^11.0.0",
    "electron": "^39.2.7",
    "eslint": "^8.0.0",
    "eslint-import-resolver-typescript": "2.7.1",
    "eslint-plugin-boundaries": "^5.3.1",
    "eslint-plugin-import": "^2.32.0",
    "faker": "^6.6.6",
    "glob": "^13.0.0",
    "husky": "^9.1.7",
    "jsdom": "^22.1.0",
    "openapi-typescript": "^7.4.3",
    "prettier": "^3.0.0",
    "puppeteer": "^24.31.0",
    "supertest": "^7.1.4",
    "ts-node": "^10.9.2",
    "tsx": "^4.7.0",
    "typescript": "^5.9.3",
    "vitest": "^4.0.16"
  },
  "engines": {
    "node": ">=20.0.0"
  },
  "name": "gridpilot",
  "overrides": {
    "@types/react": "19.2.7",
    "@types/react-dom": "19.2.3"
  },
  "private": true,
  "scripts": {
    "api:build": "npm run build --workspace=@gridpilot/api",
    "api:coverage": "vitest run --config vitest.api.config.ts --coverage",
    "api:generate-spec": "tsx scripts/generate-openapi-spec.ts",
    "api:generate-types": "tsx scripts/generate-api-types.ts",
    "api:sync-types": "npm run api:generate-spec && npm run api:generate-types",
    "api:test": "vitest run --config vitest.api.config.ts",
    "build": "echo 'Build all packages placeholder - to be configured'",
    "chrome:debug": "open -a 'Google Chrome' --args --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug",
    "companion:build": "npm run build --workspace=@gridpilot/companion",
    "companion:dev": "npm run dev --workspace=@gridpilot/companion",
    "companion:start": "npm run start --workspace=@gridpilot/companion",
    "deploy:website": "npm run deploy:website:prod",
    "deploy:website:preview": "npx vercel deploy --cwd apps/website",
    "deploy:website:prod": "npx vercel deploy --prod",
    "dev": "echo 'Development server placeholder - to be configured'",
    "docker:dev": "sh -lc \"set -e; echo '[docker] Starting dev environment...'; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then echo '[docker] Dev environment already running, attaching...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml logs -f; else echo '[docker] Starting fresh dev environment...'; COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-dev -f docker-compose.dev.yml up; fi\"",
    "docker:dev:build": "sh -lc \"set -e; echo '[docker] Building and starting dev environment...'; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then echo '[docker] Stopping existing environment first...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml down --remove-orphans; fi; COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-dev -f docker-compose.dev.yml up --build\"",
    "docker:dev:clean": "sh -lc \"set -e; echo '[docker] Cleaning up dev environment...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml down -v --remove-orphans --volumes; echo '[docker] Cleanup complete'\"",
    "docker:dev:down": "sh -lc \"set -e; echo '[docker] Stopping dev environment...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml down --remove-orphans; echo '[docker] Stopped'\"",
    "docker:dev:force": "sh -lc \"set -e; echo '[docker] Force starting dev environment...'; echo '[docker] Stopping any existing environment...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml down --remove-orphans 2>/dev/null || true; echo '[docker] Starting fresh...'; COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-dev -f docker-compose.dev.yml up\"",
    "docker:dev:inmemory": "sh -lc \"GRIDPILOT_API_PERSISTENCE=inmemory npm run docker:dev:up\"",
    "docker:dev:logs": "sh -lc \"set -e; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then docker-compose -p gridpilot-dev -f docker-compose.dev.yml logs -f; else echo '[docker] No running containers to show logs for'; echo '[docker] Start with: npm run docker:dev'; fi\"",
    "docker:dev:postgres": "sh -lc \"GRIDPILOT_API_PERSISTENCE=postgres npm run docker:dev:up\"",
    "docker:dev:ps": "sh -lc \"set -e; echo '[docker] Container status:'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps; echo ''; echo '[docker] Running containers:'; docker ps --filter name=gridpilot-dev --format 'table {{.Names}}\\t{{.Status}}\\t{{.Ports}}'\"",
    "docker:dev:restart": "sh -lc \"set -e; echo '[docker] Restarting services...'; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then docker-compose -p gridpilot-dev -f docker-compose.dev.yml restart; echo '[docker] Restarted'; else echo '[docker] No running containers to restart'; echo '[docker] Start with: npm run docker:dev'; fi\"",
    "docker:dev:status": "sh -lc \"set -e; echo '[docker] Checking dev environment status...'; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then echo '[docker] ✓ Environment is RUNNING'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps; echo ''; echo '[docker] Services health:'; docker ps --filter name=gridpilot-dev --format 'table {{.Names}}\\t{{.Status}}\\t{{.RunningFor}}'; else echo '[docker] ✗ Environment is STOPPED'; echo '[docker] Start with: npm run docker:dev'; fi\"",
    "docker:dev:up": "sh -lc \"set -e; echo '[docker] Starting dev environment...'; if docker-compose -p gridpilot-dev -f docker-compose.dev.yml ps -q 2>/dev/null | grep -q .; then echo '[docker] Already running, attaching to logs...'; docker-compose -p gridpilot-dev -f docker-compose.dev.yml logs -f; else COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-dev -f docker-compose.dev.yml up; fi\"",
    "docker:e2e:down": "docker-compose -f docker/docker-compose.e2e.yml down",
    "docker:e2e:up": "docker-compose -f docker/docker-compose.e2e.yml up -d",
    "docker:prod": "docker-compose -p gridpilot-prod -f docker-compose.prod.yml up -d",
    "docker:prod:build": "docker-compose -p gridpilot-prod -f docker-compose.prod.yml up -d --build",
    "docker:prod:clean": "docker-compose -p gridpilot-prod -f docker-compose.prod.yml down -v",
    "docker:prod:down": "docker-compose -p gridpilot-prod -f docker-compose.prod.yml down",
    "docker:prod:logs": "docker-compose -p gridpilot-prod -f docker-compose.prod.yml logs -f",
    "docker:test:clean": "sh -lc \"docker-compose -p gridpilot-test -f docker-compose.test.yml down -v --remove-orphans || true; docker-compose -p gridpilot-test -f docker-compose.test.yml rm -fsv || true\"",
    "docker:test:deps": "COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-test -f docker-compose.test.yml run --rm deps",
    "docker:test:down": "sh -lc \"docker-compose -p gridpilot-test -f docker-compose.test.yml down --remove-orphans || true; docker-compose -p gridpilot-test -f docker-compose.test.yml rm -fs || true\"",
    "docker:test:up": "COMPOSE_PARALLEL_LIMIT=1 docker-compose -p gridpilot-test -f docker-compose.test.yml up -d api website",
    "docker:test:wait": "node -e \"const sleep=(ms)=>new Promise(r=>setTimeout(r,ms)); const wait=async(url,label)=>{for(let i=0;i<90;i++){try{const r=await fetch(url); if(r.ok){console.log('[wait] '+label+' ready'); return;} }catch{} await sleep(1000);} console.error('[wait] '+label+' not ready: '+url); process.exit(1);}; (async()=>{await wait('http://localhost:3101/health','api'); await wait('http://localhost:3100','website');})();\"",
    "dom:process": "npx tsx scripts/dom-export/processWorkflows.ts",
    "env:website:merge": "node scripts/merge-website-env.js",
    "generate-templates": "npx tsx scripts/generate-templates/index.ts",
    "lint": "npx eslint apps/api/src --ext .ts,.tsx --max-warnings 0",
    "migrate:media:exec": "ts-node scripts/migrate-media-refs.ts --execute",
    "migrate:media:help": "ts-node scripts/migrate-media-refs.ts --help",
    "migrate:media:test": "ts-node scripts/migrate-media-refs.ts",
    "minify-fixtures": "npx tsx scripts/minify-fixtures.ts",
    "minify-fixtures:force": "npx tsx scripts/minify-fixtures.ts --force",
    "prepare": "husky install || true",
    "smoke:website": "npm run website:build && npx playwright test -c playwright.website.config.ts",
    "smoke:website:docker": "DOCKER_SMOKE=true npx playwright test -c playwright.website.config.ts",
    "test": "vitest run \"$@\"",
    "test:api:contracts": "vitest run --config vitest.api.config.ts apps/api/src/shared/testing/contractValidation.test.ts",
    "test:companion-hosted": "vitest run --config vitest.e2e.config.ts tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts",
    "test:contract:compatibility": "tsx scripts/contract-compatibility.ts",
    "test:contracts": "tsx scripts/run-contract-tests.ts",
    "test:docker:website": "sh -lc \"set -e; trap 'npm run docker:test:down' EXIT; npm run docker:test:deps; npm run docker:test:up; npm run docker:test:wait; npm run smoke:website:docker\"",
    "test:e2e": "vitest run --config vitest.e2e.config.ts",
    "test:e2e:docker": "vitest run --config vitest.e2e.config.ts tests/e2e/docker/",
    "test:hosted-real": "vitest run --config vitest.e2e.config.ts tests/e2e/hosted-real/",
    "test:integration": "vitest run tests/integration",
    "test:smoke": "vitest run --config vitest.smoke.config.ts",
    "test:smoke:electron": "playwright test --config=playwright.smoke.config.ts",
    "test:smoke:watch": "vitest watch --config vitest.smoke.config.ts",
    "test:type-generation": "vitest run --config vitest.scripts.config.ts scripts/test/type-generation.test.ts",
    "test:types": "tsc --noEmit -p tsconfig.tests.json",
    "test:unit": "vitest run tests/unit",
    "test:watch": "vitest watch",
    "test:website:types": "vitest run --config vitest.website.config.ts apps/website/lib/types/contractConsumption.test.ts",
    "typecheck": "npm run typecheck:targets",
    "typecheck:grep": "npm run typescript | grep",
    "typecheck:root": "npx tsc --noEmit --project tsconfig.json",
    "typecheck:targets": "npx tsc --noEmit -p apps/website/tsconfig.json && npx tsc --noEmit -p apps/api/tsconfig.json && npx tsc --noEmit -p adapters/tsconfig.json && npx tsc --noEmit -p core/tsconfig.json",
    "website:build": "npm run env:website:merge && npm run build --workspace=@gridpilot/website",
    "website:clean": "npm run clean --workspace=@gridpilot/website",
    "website:dev": "npm run env:website:merge && npm run dev --workspace=@gridpilot/website",
    "website:lint": "npm run lint --workspace=@gridpilot/website",
    "website:start": "npm run start --workspace=@gridpilot/website",
    "website:type-check": "npm run type-check --workspace=@gridpilot/website"
  },
  "version": "0.1.0",
  "workspaces": [
    "core/*",
    "apps/*",
    "testing/*"
  ]
}