Skip to content

feat(marquee): Phase 1 portable catalog on live Supabase + Convex - #51

Merged
2bTwist merged 1 commit into
mainfrom
app/marquee-phase1
Jun 20, 2026
Merged

2bTwist merged 1 commit into
mainfrom
app/marquee-phase1

Conversation

@2bTwist

@2bTwist 2bTwist commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Phase 1 of the Marquee dogfood: the portable catalog, built on the @baas/core
store port and proven green on both live Supabase and live Convex.

What this adds

  • Marquee's own backends. A local Supabase project (apps/marquee/supabase,
    port-offset +1000 so it runs alongside the adapter's conformance DB) with
    movies/genres/movieGenres, and a local Convex app (apps/marquee/convex)
    with the same schema. Domain columns are camelCase and quoted on Postgres so
    they are byte-identical to the Convex field names: the same movie object flows
    through the portable store to either backend with zero per-backend mapping.
  • makeBackend live branches from VITE_ env; the header switcher enables
    Supabase/Convex when their env is present.
  • The catalog, all through insert/get/list/patch/remove:
    • src/lib/movies.ts, a UI-free portable data layer (all where/order/cursor
      translation lives here).
    • list with genre (eq on primaryGenre) + year-range filters, three indexed
      sorts (recent / year / title), and cursor pagination across the page boundary.
    • movie detail (get), create + edit (insert/patch), minimal view-state
      routing (no router dependency).
  • Deterministic dev seed (16 genres, 300 movies, 600 join rows), runs on both.

Verification (two gates, both backends)

  • Data-layer integration test (test/catalog.live.test.ts): 20/20 green on
    Supabase and Convex. Covers genre/year/combined filters, all three sorts,
    pagination across the page boundary both unfiltered (34) and filtered (28 scifi),
    CRUD round-trips, and the non-throwing missing-id guarantee. Self-skips per
    backend without env.
  • Playwright UI smoke: catalog render, detail, genre filter, create-through-the-form,
    and the live Supabase->Convex switch, all with 0 console errors on both backends.

CI covers the app via turbo run typecheck build; biome + knip are green. No
packages/* changes, so no changeset. Phase 1 found no portability gap requiring an
SDK change (the first gap, joins + aggregation, is the Phase 2 trigger); it did
reconfirm the WithId<T> ergonomics papercut, worked around locally.

Stand up Marquee's own backends and build the portable catalog: list with
genre + year filtering, three indexed sorts, cursor pagination, movie detail,
and create/edit, all through the @baas/core store port and proven green on
BOTH live backends.

- Supabase project (apps/marquee/supabase) with movies/genres/movieGenres;
  camelCase columns quoted so they are byte-identical to the Convex field
  names the portable store reads and writes.
- Convex app (apps/marquee/convex) with the same schema, by_year/by_title
  indexes for portable field-ordering, and the adapter's deployable CRUD
  helpers re-exported via baas.ts.
- makeBackend wires the live Supabase/Convex branches from VITE_ env;
  switcher entries enable when their env is present.
- src/lib/movies.ts: the UI-free portable data layer; Catalog/MovieDetail/
  MovieForm components; minimal view-state routing (no router dep).
- Deterministic dev seed (16 genres, 300 movies, 600 join rows), runs on both.
- test/catalog.live.test.ts: data-layer integration gate, 20/20 green on both
  backends (genre/year/combined filters, 3 sorts, pagination across the page
  boundary unfiltered and filtered, CRUD, non-throwing missing-id). A
  Playwright UI smoke separately verified catalog/detail/filter/create and the
  live backend switch on both Supabase and Convex.
@2bTwist
2bTwist merged commit 92a8a0f into main Jun 20, 2026
11 checks passed
@2bTwist
2bTwist deleted the app/marquee-phase1 branch June 20, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant