zernonia / supabase-schema

Secured & Simple Supabase Schema Visualizer
https://supabase-schema.vercel.app/
MIT License
809 stars 47 forks source link

Features/supabase-companion #21

Open moracabanas opened 1 year ago

moracabanas commented 1 year ago

supabase-companion

This changes are intended to add supabase-schema as a more confortable default tables visualizer to your supabase stack.

configuration

VITE_ variables are limited to build time so they are not valid ENV VARIABLES for static serving configuration at runtime.

The solution is exposing variables with import-meta-env
The next envitonment variables are exposed IN RUNTIME to configure default URL and ANON SUPABASE_API_URL
SUPABASE_ANON_KEY

Behaviour

If you provide those env variables the side pannel is hidden by default and automatically fetch the tables when loading the page.

image

If you don't provide those values, the app shows no changes on behaviour.

image

Extra

1.1 I placed a green button to fetch the tables without the need of showing the panel.

image

1.2 Fetch is performed automatically at page loading if SUPABASE_API_URL is set.

image

You can build and test the image with the provided docker-compose.yml or add your prebuilt image to a supabase stack:

image

Feel free to correct any mistake, rant at my changes or just reject the pull request 😅

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
supabase-schema ✅ Ready (Inspect) Visit Preview Dec 23, 2022 at 8:31AM (UTC)
moracabanas commented 1 year ago

Add "clear storage" button https://github.com/zernonia/supabase-schema/pull/21/commits/77b622e2de5570a49370594d86c89cf1f842b1bd

Animation

moracabanas commented 1 year ago

All my tests now working ok in all local, built images and production 👌