feat: pivot config to Sanity singletons (Phase A)#607
Merged
codercatdev merged 1 commit intodevfrom Mar 5, 2026
Merged
Conversation
- 6 singleton schemas (pipelineConfig, remotionConfig, contentConfig, sponsorConfig, distributionConfig, gcsConfig) - Rewrite lib/config.ts to use writeClient.fetch instead of Supabase - Update lib/types/config.ts to camelCase field names - Remove Supabase migration SQL and invalidate endpoint - Register all singletons in sanity.config.ts Co-authored-by: content <content@miriad.systems>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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 A: Pivot Config to Sanity Singletons
Replaces the Supabase config tables approach with Sanity singleton documents. Alex already lives in Sanity Studio — config editing is free, changes propagate instantly via Live Content API, and no new infrastructure needed.
Changes (+519 / -487, 11 files)
6 new Sanity singleton schemas in
sanity/schemas/singletons/:pipelineConfigremotionConfigcontentConfigsponsorConfigdistributionConfiggcsConfigRewrote
lib/config.ts— SanitywriteClient.fetchinstead of Supabase. Same API surface (getConfig,getConfigValue,invalidateConfig), same 5-min stale-while-revalidate caching.Updated
lib/types/config.ts— camelCase field names,_id/_type/_updatedAtinstead ofid/updated_at.Registered all 6 singletons in
sanity.config.tsschema.types +singletonPlugin().Removed:
supabase/migrations/003_config_tables.sql(no longer needed)app/api/dashboard/config/invalidate/route.ts(Sanity handles propagation)Type check
Zero new TS errors. Only pre-existing:
sanity-plugin-media,@vercel/analytics,@vercel/speed-insights.Why Sanity over Supabase
dashboardSettingssingleton patternCloses Phase A task for spec
MBYYpe5Y.