svelte-kit-starter

Svelte Kit Starter

SvelteKit Starter

(Almost) Everything you need to build a Svelte project.

Starting a project

Make sure you have your .env file setup.

# copy from the example environment file
cp environments/local.env .env

Run Database and MinIO in Docker environment, then apply migrations to sync Database with your schema

make start

make migrate

Developing

(Optional) Before start develop the app:

# create seed data
make seed

# or drop all tables and create seed data
make reset

Once you've started docker and installed dependencies with pnpm. Run command pnpm install, then start a development server:

# this will start local development server and prisma studio
pnpm dev

To visit local development server: http://localhost:5173

To visit prisma studio server: http://localhost:5555

Migration

If you want to edit database structure, edit prisma/schema.prisma, generate new migration file:

make migrate
# Enter a name for the new migration: <migration_name>

Generate Prisma Client and generate ER Diagram into prisma/ERD.md:

make generate

Formatter & Linter

Format your code config with prettier in .prettierrc, run formatter:

pnpm format

Lint your code config with eslint in .eslintrc.cjs, run linter:

pnpm lint

Building

To create a production version of your app:

pnpm build

# preview the production build
pnpm preview

To visit local built server: http://localhost:4173

Docker

To create a production version of your app in Docker environment:

make docker-app

Ports

Environment Port
docker build 3000
local build 4173
local dev 5173
postgres 5432
prisma studio 5555
minio console 9001

Top categories

Loading Svelte Themes