feat(marquee): Phase 1 portable catalog on live Supabase + Convex - #51
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of the Marquee dogfood: the portable catalog, built on the
@baas/corestore port and proven green on both live Supabase and live Convex.
What this adds
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.
makeBackendlive branches fromVITE_env; the header switcher enablesSupabase/Convex when their env is present.
insert/get/list/patch/remove:src/lib/movies.ts, a UI-free portable data layer (allwhere/order/cursortranslation lives here).
eqonprimaryGenre) + year-range filters, three indexedsorts (recent / year / title), and cursor pagination across the page boundary.
get), create + edit (insert/patch), minimal view-staterouting (no router dependency).
Verification (two gates, both backends)
test/catalog.live.test.ts): 20/20 green onSupabase 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.
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. Nopackages/*changes, so no changeset. Phase 1 found no portability gap requiring anSDK change (the first gap, joins + aggregation, is the Phase 2 trigger); it did
reconfirm the
WithId<T>ergonomics papercut, worked around locally.