Template for SvelteKit project, powered by create-svelte
.
Auth.js
Playwright
Vitest
Storybook
Zod
AirBnb
standardsnpm 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
# spin-up local postgres docker container to store data
docker-compose up -d
# initialize DB using prisma schema file and start prisma studio
npx prisma migrate dev
npx prisma studio
# run storybook for UI development
npm run storybook
This template allows visitors to login via Google auth. Page administrators can assign new users as page admins via the '/admin' route. However, the first admin user must be assigned admin access via a database update through Prisma.
After starting the app login with your Google account to create your user. Then using prisma studio edit your userSettings to set 'approved' to true. Then you'll be able to access the admin page.
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. This template was inspired by the work of JS content creater 'Coding Garden'. See his repo at
listd github