Adds the scheduling core to Prisma (Shop, Location, Method enum, SlotTemplate, SlotOverride, BlackoutDate — IMPLEMENTATION_PLAN.md §4) and Polaris admin screens to manage them: - /app/locations: list/create/edit/delete locations, one-click vertical template seeding (bakery/florist/grocer) - /app/slots: weekly slot template editor, scoped per location - /app/blackouts: blackout dates, scoped to one location or all of them services/templates.server.ts keeps the vertical presets as a pure, unit-tested function (getVerticalTemplate) separate from the thin I/O wrapper (seedVerticalTemplate) that does the actual Prisma writes, per CLAUDE.md's "pure functions, inject data, no I/O in the math" rule. Switched dev DB from SQLite to Postgres (docker-compose.yml, ports 5433/6380 to avoid clashing with other local projects already on 5432/6379): SQLite doesn't support Prisma enums at all, and IMPLEMENTATION_PLAN.md's schema relies on them (Method) plus Postgres-only array fields in later phases (Zone.postalCodes, ProductRule.allowedLocationIds). Only one throwaway migration existed, so switching now avoids compounding the rework later. Also fixed a Remix/Polaris integration issue hit while building these forms: this Polaris version's TextField/Checkbox are fully controlled (no defaultValue/defaultChecked), and `data()` imported from `@remix-run/react` (rather than `@remix-run/node`) breaks useActionData's type inference — both are now handled correctly across the new routes. Verified: lint, typecheck, unit tests (incl. template-seeding fixtures), build, and a live end-to-end run of seedVerticalTemplate against the Postgres container all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Delivery Date & Time
Shopify app: scheduling for Shipping / Local Delivery / Store Pickup, with date-time slots, capacity intelligence, and all-plan checkout enforcement via Cart/Checkout Validation Functions.
Read PRODUCT_STRATEGY.md (why) and IMPLEMENTATION_PLAN.md (how, phased build order) before making changes. CLAUDE.md holds the non-negotiables for AI-assisted work in this repo.
Getting started
npm install
cp .env.example .env # fill in Shopify app credentials after linking
npx prisma migrate dev # creates prisma/dev.sqlite locally
npm run dev # shopify app dev — requires `shopify auth login` first
Redis must be running locally for slot-holds/BullMQ (Phase 4+):
redis-server # or: docker run -p 6379:6379 redis
npm run worker # BullMQ worker (jobs/worker.ts)
Commands
| Command | Purpose |
|---|---|
npm run dev |
shopify app dev — local dev against a dev store |
npm test |
Vitest unit tests |
npm run test:e2e |
Playwright E2E |
npm run lint / npm run typecheck |
ESLint / tsc --noEmit |
npx prisma migrate dev |
DB migrations |
npm run deploy |
shopify app deploy — deploy extensions/functions |
npm run worker |
BullMQ worker (hold-expiry, notifications) |
Status
Greenfield — Phase 0 (scaffold & CI) complete. See §6 of
IMPLEMENTATION_PLAN.md for the phased build order and acceptance criteria.
Description
Languages
TypeScript
86.7%
JavaScript
9.2%
Liquid
3%
CSS
1%
Dockerfile
0.1%