| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An open-source URL shortener with a simple dashboard, auth, and basic analytics — built with Astro + Supabase and deployed on Vercel.
Create a Supabase project → copy Project URL and anon key.
Add a .env file (or set in Vercel):
PUBLIC_SUPABASE_URL=your_supabase_url PUBLIC_SUPABASE_ANON_KEY=your_anon_key PUBLIC_SITE_URL=https://your-domain.tld # for production # PUBLIC_SITE_URL=http://localhost:4321 # for local dev
In Supabase → SQL Editor: run the SQL from supabase-setup.sql.
Deploy Edge Functions (requires Docker running locally):
supabase link --project-ref <your_project_ref> supabase functions deploy get-user-count --project-ref <your_project_ref> supabase functions deploy update-user-count-metric --project-ref <your_project_ref>
supabase secrets set SUPABASE_SERVICE_ROLE_KEY=<your_service_role_key> --project-ref <your_project_ref>
pnpm install pnpm dev
Visit http://localhost:4321
NotShort is a tiny, batteries-included URL shortener:
Key folders/files:
Create .env in the repo root (or set these in Vercel):
PUBLIC_SUPABASE_URL=your_supabase_url PUBLIC_SUPABASE_ANON_KEY=your_anon_key PUBLIC_SITE_URL=https://your-domain.tld # PUBLIC_SITE_URL=http://localhost:4321 # Optional GA_MEASUREMENT_ID=G-XXXXXXXXXX GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # only if you want GitHub stats hydrated server-side
Note: Do NOT put your Supabase service role key in .env. Keep it as a Supabase function secret:
supabase secrets set SUPABASE_SERVICE_ROLE_KEY=<your_service_role_key> --project-ref <your_project_ref>
Ensure Docker Desktop is running locally, then:
supabase link --project-ref <your_project_ref> supabase functions deploy get-user-count --project-ref <your_project_ref> supabase functions deploy update-user-count-metric --project-ref <your_project_ref>
Optionally add a schedule in the Supabase Dashboard for update-user-count-metric (e.g., every 10 minutes) to refresh the cached app_metrics.total_user_count.
pnpm install pnpm dev
Visit http://localhost:4321
Note: astro.config.mjs contains site (currently set to a placeholder). Update it to your real domain when ready.
pnpm dev # start dev server pnpm build # build pnpm preview # run the built app locally
Redirect after login goes to localhost on production
get-user-count 404 or errors
This project is licensed under the terms of the MIT License. See LICENSE.
| Back | FazBrowse Home | New Git URL |