/twittr-sveltekit

Twittr, a SvelteKit demo with Prisma, Supabase & Typescript

Primary LanguageSvelte

svelte-twittr

This is a folk using SvelteKit v1.0.0 from the original SvelteKit v1.0.0-next.392 project Full Stack SvelteKit For Beginners.

Project Setup

🧑‍🤝‍🧑 Clone the project

git clone https://github.com/sytanta/twittr-sveltekit

📦️ Install dependencies

npm i

Database

Register and create a database url and shadow database url from Supabase

✏️ Update or create a .env file with the following content:

DATABASE_URL="..." # Supabase Connection string
SHADOW_DATABASE_URL="..."
PUBLIC_SUPABASE_URL="..." # Supabase Project URL
PUBLIC_SUPABASE_ANON_KEY="..."" # Supabase public anon key

🔨 Create a database from the Prisma schema

npx prisma db push

🌱 Seed the database

npx prisma db seed

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 the 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.