Takazudo Modular Docs

Type to search...

to open search from anywhere

/sub-packages/zpreorder/CLAUDE.md

CLAUDE.md at /sub-packages/zpreorder/CLAUDE.md

Path: sub-packages/zpreorder/CLAUDE.md

zpreorder — Preorder Admin Panel

Vite + React app for managing notify subscriptions and reservations. Connects to Netlify Functions API.

Start

# Mock mode (default — no network dependencies)
pnpm zpreorder:dev              # from project root (port 9876)
cd sub-packages/zpreorder && pnpm dev  # from this directory

# Dev with API (3 environments, from project root)
pnpm zpreorder:dev:full         # local Netlify Functions (port 9999, offline blobs)
pnpm zpreorder:dev:preview      # pointing to preview deploy API
pnpm zpreorder:dev:prod         # pointing to production API

Architecture

  • API client: src/utils/api-client.js — all API calls with Bearer token auth
  • Auth: Uses VITE_API_TOKEN env var for PREORDER_API_TOKEN authentication
  • Base URL: VITE_API_BASE_URL — points to production or preview Netlify site
  • Routing: React Router with pages for Dashboard, Notify, Reservations, Send, Templates
  • Styling: Tailwind CSS with project design tokens (zd-* colors, semantic spacing)

Pages

RouteComponentPurpose
/dashboard.jsxStats overview
/notifynotify-list.jsxManage notify subscriptions
/reservationsreservation-list.jsxManage reservations
/send-notificationsend-notification.jsxBatch email sending
/email-templatesemail-templates.jsxEdit auto-reply templates

Environment Variables

  • .env: Only VITE_PREORDER_API_TOKEN (auth token). Do NOT put VITE_API_BASE_URL here.
  • VITE_API_BASE_URL: Set by npm scripts (dev:remote-prod / dev:remote-prev), NOT .env.

Testing

pnpm test           # Vitest unit tests
pnpm test:e2e       # Playwright E2E tests