This project is a starter template for authentication using SvelteKit, Lucia, Prisma, and MySQL.
git clone https://github.com/your-username/svelte-auth-starter.git
cd svelte-auth-starter
npm install
Create a .env file in the root:
DATABASE_URL="mysql://root:password@localhost:3306/svelte_auth"
Make sure:
Run the following command to apply schema and generate the Prisma client:
npx prisma migrate dev --name init
npx prisma generate
This will automatically create the svelte_auth database (if it doesn't already exist) and apply the schema.
If you're connecting to an existing database with tables:
npx prisma db pull
npm run dev -- --open