This is a starter project for using SvelteKit with JWT auth.
It has everything you need to have JWT authentication working with Prisma and SqlLite.
Tailwind CSS is also setup and is used for styling.
Here's how to make this project work!
# from the root directory
npm install
# from the root directory
npx prisma db push
# from the root directory
npx prisma studio
In the .env file add the VITE_JWT_ACCESS_SECRET. Google JWT token generator if you need help with this.
Note: the .env file should be in your gitignore file. You don't want to save it to your repository for everyone to see.
DATABASE_URL="file:./dev.db"
VITE_JWT_ACCESS_SECRET="<your jwt access secret>"
Once you've done the above steps, run the project.
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build