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, seed db with initial data, and start prisma studio
npx prisma migrate dev
npx prisma db seed
npx prisma studio
# run storybook for UI development
npm run storybook
This template allows visitors to login via Google auth. Users have two possible roles: 1. Approved users that are able to edit the app, and 2) User managers that are able to edit approved user permissions. User managers can assign new users as page admins via the '/admin' route. However, the first admin user must be assigned as a user manager 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' and 'manager' to true. Then you'll be able to access the admin page, and approve other new users.
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.
To create a production version of your app:
make build-production
make start-production
This template was inspired by the work of JS content creater 'Coding Garden'. See his repo at listd github