Before: settings in source code
My resume already has seven theme packages and an independent light/dark setting. Changing the site-wide default or menu order previously required a source edit and deployment.
Design Technologist · App Engineering Showcases
A small, live Supabase integration turns site defaults into managed data while preserving local themes, visitor choices, and Cloudflare delivery.
Add a data service without rebuilding the website or depending on the network to render.
My resume already has seven theme packages and an independent light/dark setting. Changing the site-wide default or menu order previously required a source edit and deployment.
Supabase stores the default theme, mode, and menu order. Cloudflare still delivers the website. The browser validates configuration and reuses the existing theme controller.
Actors & non-goals. The site owner manages public defaults; visitors choose their own appearance. This prototype reads configuration only. It does not add visitor accounts, an administration screen, remote theme-code delivery, or a new hosting layer.
Six concepts explain the connection, data ownership, and failure behavior.
Fetch configuration while the browser retains rendering ownership.
A relational database persists the record; a REST service exposes permitted queries.
Grants permit reads; policies restrict which configuration is visible.
Saved style and mode remain independent from site-wide defaults.
Requests time out; newer reloads supersede older requests.
Existing packages still own CSS, textures, icons, and visual tokens.
System Architecture · Three boundaries, separate responsibilities, one local renderer.
Website delivery, configuration data, and browser preferences have separate responsibilities. This explanatory diagram is not connection telemetry; live observations belong to the Working System panel.
Hosts and delivers static bundle files to the visitor's browser. Does not proxy API calls or talk to PostgreSQL.
Runs the portfolio. Validates incoming configuration, resolves explicit preferences against defaults, and renders available local theme packages.
Serves configuration JSON from public.portfolio_theme_settings. Operation grants allow SELECT; the RLS SELECT policy restricts the visible row. INSERT, UPDATE, and DELETE are denied for browser roles (anon/authenticated), not all PostgreSQL users: administrative edits remain possible. The publishable key is not a privileged secret.
Three execution and trust boundaries, not a trace of a live request:
public.portfolio_theme_settings. SELECT operation grants and an RLS SELECT policy allow the portfolio row to be read. INSERT, UPDATE, and DELETE are denied for browser roles; administrative edits remain possible. RLS does not replace operation grants.Review → plan → build → verify. Use AI in small steps, then inspect the result.
Give AI the current files and ask what must stay unchanged.
Review the attached portfolio files before editing.
Identify the theme controller, local theme packages,
navigation, and existing showcases.
Explain which parts run in the browser and which
settings could come from a remote service.
List the files that must remain unchanged.
Do not write code yet.Ask for a small, read-only design with clear ownership.
Using the review above, plan a read-only Supabase
connection for theme defaults and menu order.
Show Cloudflare delivery, a direct browser GET,
PostgREST, PostgreSQL, SELECT grants, and RLS.
Keep CSS and assets in the local theme packages.
Explain visitor preferences, validation, timeout,
and cache or bundled fallback. No browser writes.
Return a focused plan before implementation.Use the implementation prompt alongside these steps, then inspect the changed files.
Return real test results to AI and request focused corrections.
Test the implementation against its requirements.
Check a real read when reachable, independent
style/mode choices, reload, reset, offline fallback,
restricted storage, search, and keyboard access.
Check installed themes and narrow layouts.
Separate live observations from controlled tests.
Report failures and blocked checks honestly.
Fix only demonstrated defects; preserve the layout.
Never invent a successful response or test result.Add cloud configuration to the existing static
portfolio without replacing its local rendering
system.
1. Preserve the portfolio. Existing pages,
showcases, theme packages, and navigation remain
usable independently of the configuration
request.
2. Verify the architecture. PostgreSQL stores one
public settings record; the Supabase Data API
exposes permitted reads through PostgREST. The
record controls the default theme, color mode,
and menu order, not CSS or assets.
3. Restrict access. Use a publishable browser key
with SELECT grants and a row-level SELECT policy.
Browser roles cannot insert, update, or delete
settings. Keep database passwords and privileged
keys out of the frontend.
4. Reuse the renderer. Validate remote values
against installed local theme IDs. The shared
theme controller applies local CSS and assets;
remote configuration cannot execute code or
supply arbitrary asset paths.
5. Handle failure and preferences. Render
immediately. Use validated cache or bundled
settings when a request fails. Override defaults
only in dimensions the visitor explicitly
selects, including choices made while requests or
metadata loads are pending. Save choices when
browser storage is available; otherwise keep them
for the current page session.
6. Verify observable behavior. Show actual request
status, duration, and returned settings. Label
offline simulation. Exercise reads, permission
checks, independent preferences, malformed data,
failure recovery, keyboard access, responsive
layouts, and Chromium/Firefox behavior. Keep
executed results separate from explanatory
diagrams and pending deployment checks.Check the generated code against the boundaries that matter.
alter table public.portfolio_theme_settings
enable row level security;
revoke all on table public.portfolio_theme_settings
from public, anon, authenticated;
grant select on table public.portfolio_theme_settings
to anon, authenticated;
-- Add a SELECT-only policy for id = 'portfolio'.
-- Full rerunnable migration: setup.sqlSELECT grants and RLS allow the public record to be read. Browser roles cannot write; administrative edits remain possible.
Accept only known theme IDs from the local whitelist and supported modes—not remote CSS or executable code.
Resolve style and mode independently. If storage is blocked, choices last the current page session.
Use validated cache or bundled defaults on failure. Label simulations and show the actual configuration source.
This panel and the connected resume read the same public configuration record. The diagram explains service responsibilities; request metrics come from this browser.
APPLICATION STRUCTURES · SUPABASE
One database record. Seven local design systems.
Live browser observation · Read the current metrics below. Section 03 explains the architecture; it does not report connection health.
Previews keep your choice for the current page session and save it for later visits when browser storage is available. “Use cloud defaults” removes current-page style/mode overrides and removes saved choices when browser storage permits. If removal is blocked, existing saved choices can return on reload. Offline simulation skips the request; it does not change Supabase.
Waiting for the first request.
An empty search shows all themes. Up to 80 characters.
No themes match. Clear your search to show all themes.
Cloudflare delivers the static application. Supabase supplies configuration. Local theme packages render the result, and visitor choices override site defaults.
Open the connected resume · Database setup SQL · Setup, disclosure, and QA notes
Try the feature, inspect the evidence, and refine only what fails.
Cloud settings choose defaults; local packages render the result. The useful trade-off is flexibility without handing rendering ownership to the backend.