sveltekit-tailwind-prisma-authjs-template

Sveltekit Tailwind Prisma Authjs Template

A SvelteKit template that uses Tailwind, Auth.js, and Prisma

SvelteKit + TailwindCSS + Prisma + Auth.js Template

This is a template for SvelteKit with TailwindCSS, Prisma, and Auth.js.

This template assumes that you understand the various technologies used in it. This template was created to help me build out these applications faster. It is very opinionated, and that is on purpose. I like these technologies and this stack. If you don't have a lot experience with these technologies, I would recommend learning them individually before trying to use this template.

Getting Started

This repository is a template repository, so you can click the "Use this template" button to create a new repository with this template.

Environment Variables

The environment variables are outlined in the .env.example file. You can copy this file to .env and fill in the values.

Authentication

The authentication is handled by Auth.js. The configuration for it lies in the hooks.server.ts file in the src directory.

The auth providers used in this template are Google and GitHub. You can create OAuth apps for these providers at the following links:

You can also remove these providers and add your own. See the Auth.js documentation for more information.

Database

This template uses Prisma for the database. The configuration for it lies in the prisma/schema.prisma file. The default database is SQLite, but you can change that to a database of your choice in the datasource block of the schema.prisma file.

Build and Run

Install dependencies

npm install

Run the development server

npm run dev

Build for production

npm run build

Top categories

Loading Svelte Themes