Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/supabase-companion #21

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

moracabanas
Copy link

@moracabanas moracabanas commented Dec 19, 2022

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
Copy link

vercel bot commented Dec 19, 2022

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)

Import-meta-env replaces ENV variables on buildtime to use ENV variables on built static sites.
DO NOT EXPOSE SECRETS on public or unprotected sites
@moracabanas
Copy link
Author

Add "clear storage" button 77b622e

Animation

@moracabanas
Copy link
Author

moracabanas commented Dec 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant