Repository navigation
feat(dx): Supabase seed.sql for a populated local dashboard - #75
Merged
Merged
Conversation
Closes #71. Fresh `supabase db reset` now lands the contributor on a working dashboard without provisioning provider API keys or running a tracking job. The fixture seeds: - A demo auth user ([email protected] / demo123) wired to a self_hosted org with subscription_status='active' - One demo brand, two topics, six prompts spread across both topics - ~127 prompt_results across all eight tracked engines, nine model_used values, and five regions, time-stamped across the last 30 days so charts have a curve to draw - Four competitors, three content opportunities, six AI traffic rows Every row uses a fixed UUID and `ON CONFLICT DO NOTHING`, so `supabase db reset` is idempotent — re-running produces the same DB, not duplicates. The seed only flows through the CLI; hosted projects are never touched. Updates README.md and docs/self-host/supabase-setup.mdx with the demo credentials.
auth.identities.email is GENERATED ALWAYS from identity_data->>'email'; inserting it explicitly aborts the seed with SQLSTATE 428C9. Removing the column lets the seed apply cleanly on a fresh local stack.
GoTrue scans confirmation_token, recovery_token, email_change*, phone_change* and reauthentication_token into Go strings; leaving them NULL aborts every password login with "converting NULL to string is unsupported" (HTTP 500). Seeding them as '' lets the demo user sign in on a fresh local stack.
- Add prompt_volumes rows for all six demo prompts (keyword search volumes, intents, AI-volume estimates) so the Prompts page renders fully once the backend serves them — contributors can't generate these without paid DataForSEO/AI keys. - Enrich content_opportunities source_data with promptText, estAiVolume, visibilityScore, competitorGap, intent, keywords and competitorsCited so the opportunity detail page's Source Data panel is populated. - Fix invalid enum values that rendered as raw i18n keys: status 'reviewing' -> 'in_progress', type 'gap' -> 'owned'.
Note that supabase/seed.sql populates a local dashboard via 'supabase db reset', the demo sign-in, and that the Prompts and Content pages need the backend server running (they fetch through the API, not Supabase directly).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Merged
This branch had an error being deployed
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.
Summary
Adds
supabase/seed.sql— an idempotent demo fixture that gives contributors a fully populated local dashboard out of the box, plus the fixes needed for it to apply and render cleanly.Closes #71
What's included
[email protected]/demo123.emailcolumn from theauth.identitiesinsert (was aborting the seed).auth.userstoken columns as empty strings — NULL aborted every login with a GoTrue scan error (converting NULL to string is unsupported).prompt_volumesso the Prompts page renders (these normally come from paid DataForSEO/AI analysis a contributor won't have keys for).status/type(previously rendered as raw i18n keys).CONTRIBUTING.mdand the self-host guide note the demo data, the demo sign-in, and that the Prompts/Content pages need the backend server running (they fetch through the API, not Supabase directly).Safety
supabase/seed.sql+ docs — noweb/orserver/code changes.supabase db reset); hosted/production projects are never touched.ON CONFLICT DO NOTHING).How to test
npx supabase db reset # then start BOTH dev servers (web + server)Sign in with
[email protected]/demo123and confirm the dashboard, Prompts, and Content pages are populated.