Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.88 KB

README.md

File metadata and controls

63 lines (38 loc) · 1.88 KB

Demo

While this project is in development phase, you can freely create an account and post listings. Try it out at https://supportlocal-sg.pages.dev/biz/signup

Documentation

Access control

Visibility of created listings and data are implemented through PostgreSQL row-level policies. This reduces the need to write custom buiness logic and ensures data privacy at the database level.

Authentication

Sign up/login with @supabase/auth-helpers-sveltekit and magic links

Supabse server client instantiated in hooks.server.ts and browser client in routes/biz/+layout.ts.

Auth flow

  • supabase.auth.signInWithOtp called on client side, which sends verification email
  • link redirects to biz/logging-in, which receives session data from routes/biz/+layout.server.ts
  • cookie is set by browser Supabase client
  • user is redirected /biz/dashboard

Auth flow is identical for sign up and login, except that signup will create a new user in Supabase.

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.