sveltekit-supabase Svelte Themes

Sveltekit Supabase

A minimal starter template using Svelte 5, Supabase, shadcn-svelte, GitHub auth, iconify, and Zod.

sveltekit-supabase

Description

A simple SvelteKit app that uses Supabase for authentication via GitHub authentication.

Features

  • Sign in with GitHub
  • Sign out
  • Display user information
  • Update user information

Technologies

  • SvelteKit: A framework for building web applications with Svelte
  • TypeScript: A typed superset of JavaScript that compiles to plain JavaScript
  • Supabase: An open-source Firebase alternative
  • shadcn-svelte: A Tailwind CSS component library for Svelte, based on shadcn
  • Tailwind CSS: A utility-first CSS framework
  • Iconify: A unified icon framework using icons from icones.js
  • Zod: A TypeScript-first schema declaration and validation library

Getting Started

Running Locally

Prerequisites

  1. Clone the repo
git clone https://github.com/engageintellect/sveltekit-supabase
cd sveltekit-supabase
  1. Install dependencies
pnpm i
  1. Create a .env.local based on .env.example and fill in your own credentials
cp .env.example .env.local
  1. Start your supabase server with
supabase start

Note: You need to have the Supabase CLI installed to run the above command.

  1. Supabase console will be available at http://localhost:54323

  2. Start your app

pnpm run dev
  1. Navigate to localhost:5173 to see your app running.

Deploying to Vercel

The easiest way to deploy this app is to use Vercel. You can deploy this app with the following steps:

Database

  1. Create a new project in the Supabase dashboard

  2. Login to supabase using the console

supabase login
  1. Link your project to the supabase cli
supabase link --project-ref <YOUR_PROJECT_ID>
  1. Deploy your database
supabase db push

Client

  1. Create a new project on Vercel
  2. Connect your GitHub repository
  3. Add a new github OAuth app in the Github developer settings
  4. Configure your environment variables, make sure you are using updated values from your newly-created Supabase project and Github OAuth app
  5. Deploy

Contributing

Contributions are welcome! Please feel free to submit a PR or open an issue.

Thanks

Shout out to Davis Media for building the base template for this project! 🤙

Top categories

Loading Svelte Themes