feat(marketing-pages): add OttaORM marketing pages, admin builder, worker APIs, and Next.js rendering#154
Draft
feat(marketing-pages): add OttaORM marketing pages, admin builder, worker APIs, and Next.js rendering#154
Conversation
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.
Motivation
Description
pages,page_sections,page_features,page_actions) atottabase/models/MarketingPage*.tsand exported tables inottabase/db/schema.ts.MarketingPage,PageSection,PageFeature,PageAction) and registered them inworker/lib/db-utils.tsso generic OttaORM CRUD endpoints work.worker/routes/marketing-pages.tsand wired routes into the worker router (/api/blocks,/api/pages/nav,/api/pages/:slug)./admin/pageslist (AdminPagesListPage.tsx) and/admin/pages/$pageIdbuilder (AdminPageBuilderPage.tsx) with a block palette, drag/drop canvas (native DnD handlers for MVP), inline editor, features/actions creation, and duplicate/delete flows./pages/$slug(MarketingPageRenderer.tsx) for preview/live rendering and added a Next.js dynamic routeapp/[slug]/page.tsx+MarketingPageContentthat fetches the worker API for static params + preview rendering.src/hooks/marketingPageHooks.ts,src/types/marketing-pages.ts) and a small Vitest route-level test for the block registry (worker/routes/__tests__/marketing-pages.test.ts).curl -X POST http://localhost:3004/api/ottaorm/init.Testing
pnpm --filter @ottabase/ottabase-template-app-tanstack type-check, which failed due to many pre-existing workspace-wide type/import issues that are unrelated to this feature and prevented a clean type-check.pnpm --filter @ottabase/ottabase-template-app-tanstack test -- worker/routes/__tests__/marketing-pages.test.ts, but Vitest bootstrap failed early due to existing package resolution/type setup problems in the monorepo; the new test file is present and intended to pass once the workspace test bootstrap issues are resolved.apps/ottabase-template-app-tanstack/worker/routes/__tests__/marketing-pages.test.tsand the feature code is underapps/ottabase-template-app-tanstack/ottabase/models/MarketingPage*,worker/routes/marketing-pages.ts, and admin UI undersrc/pages/admin/pages/.Codex Task