~ Add dynamic Marketing Pages system with worker API, Next.js renderer, and admin builder#156
Draft
~ Add dynamic Marketing Pages system with worker API, Next.js renderer, and admin builder#156
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
/api/blocks,/api/pages/nav, and/api/pages/:slugwith full section/feature/action payloads inworker/routes/marketing-pages.ts.MarketingPage.schema.ts, modelsMarketingPage.ts, RLS policiesmarketingPagesPolicy.ts, and register them in schema helpers and DB init flow.AdminPagesListPage,AdminPageBuilderPage), a client renderer (MarketingPageRenderer), hooks (marketingPageHooks.ts) and types under the TanStack app, plus router entries to surface admin and public page routes.app/[slug]/page.tsxandmarketing-page-content.tsxpluslib/api.tsto fetch pages/nav from the worker API, updateREADME.mdfor dynamic pages, and adjust navbar imports to the new shared@ottabase/ui-componentsexport.--webpackinpackage.jsonscripts, add monorepowebpackaliases innext.config.js, extendtsconfig.jsonpath mappings, and settypescript.ignoreBuildErrorstotrueto avoid sibling-package type errors during Next builds.ottaorm-crudto auto-runautoInitmigrations in development on missing-table/column errors to recover from local schema drift.worker/routes/__tests__/marketing-pages.test.tsvalidating the blocks registry and handler.Testing
pnpm test(Vitest), including the newmarketing-pages.test.ts, and they succeeded.autoInitenabled for schema drift, and requests to/api/blocks,/api/pages/nav, and/api/pages/:slugreturned expected payload shapes during local testing.Codex Task