Files
Ghost_Kitchen/package.json
T
lukasandClaude Sonnet 5 c8d1721358 Add an admin panel: orders dashboard, menu management, kitchen status
Introduces a role-gated /admin section (sidebar layout, requireAdmin
checked both in route loaders and independently in every admin server
function) with three sections:
- Orders: every order across all customers, and an admin-only order
  detail view nested under /admin so the sidebar persists and admin
  access bypasses the guest-token check.
- Menu: create/edit/delete menu items, their options, and their
  preparation steps; deleting an item with past orders is refused
  (protected by the orderItems FK) instead of crashing.
- Kitchen: read-only live view of every machine's busy/idle status and
  per-tag queue depth, with a manual refresh.

Also:
- Adds a `role` field to the user table (Better Auth additionalFields,
  input:false so it can't be self-assigned) and a db:seed-admin script
  to create/promote an admin account.
- Fixes a real bug found while building this: src/server/auth.ts's
  shared session helpers were plain exported functions using a
  server-only import, which the framework couldn't tree-shake out of
  the client bundle once shared across multiple server/*.ts modules —
  this silently broke hydration app-wide. Fixed with createServerOnlyFn.
- Removes the now-fully-unused @tanstack/devtools-vite plugin.
- Disables view transitions for in-admin navigation so the persistent
  sidebar doesn't cross-fade/shift on every click.
- Gives the "your orders" empty state the same visual treatment as the
  basket page's.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 23:14:28 +02:00

70 lines
1.8 KiB
JSON

{
"name": "ghost-kitchen",
"private": true,
"type": "module",
"imports": {
"#/*": "./src/*"
},
"scripts": {
"dev": "vite dev --port 3000",
"generate-routes": "tsr generate",
"build": "vite build",
"preview": "vite preview",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:pull": "drizzle-kit pull",
"db:studio": "drizzle-kit studio",
"db:seed": "tsx src/db/seed.ts",
"db:seed-admin": "tsx src/db/seed-admin.ts",
"auth:migrate": "better-auth migrate",
"lint": "eslint",
"format": "prettier --write . && eslint --fix",
"check": "prettier --check .",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@tanstack/react-devtools": "latest",
"@tanstack/react-router": "latest",
"@tanstack/react-router-devtools": "latest",
"@tanstack/react-start": "latest",
"better-auth": "^1.5.3",
"drizzle-kit": "^0.31.9",
"drizzle-orm": "^0.45.1",
"framer-motion": "^13.2.0",
"pg": "^8.16.3",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"stripe": "^22.6.1",
"zod": "^4.5.4"
},
"devDependencies": {
"@better-auth/cli": "^1.4.21",
"@tanstack/devtools-vite": "latest",
"@tanstack/eslint-config": "latest",
"@tanstack/router-cli": "^1.132.0",
"@testcontainers/postgresql": "^12.1.0",
"@types/node": "^22.10.2",
"@types/pg": "^8.15.6",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^6.0.1",
"dotenv": "^17.3.1",
"eslint": "^9.20.0",
"prettier": "^3.8.1",
"sass": "^1.104.0",
"tsx": "^4.21.0",
"typescript": "^6.0.2",
"vite": "^8.0.0",
"vitest": "^4.0.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"lightningcss"
]
}
}