svpb Svelte Themes

Svpb

A minimal starter template for building full-stack applications with SvelteKit and PocketBase. Clean, lightweight, and easy to extend.

SvelteKit + PocketBase Starter

This is a fullstack starter template that combines SvelteKit for the frontend and PocketBase as the backend framework.

PocketBase here is not just used as a database, but as a complete backend framework. You can easily extend it to fit your needs:

๐Ÿ“ Project Structure

The project is organized with a clear separation between frontend and backend:

.
โ”œโ”€โ”€ pb/                 # PocketBase backend (Go &/ JavaScript)
โ”œโ”€โ”€ sv/                 # SvelteKit frontend (TypeScript)
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ””โ”€โ”€ README.md

๐Ÿš€ Getting Started

1. Clone the repository

git clone https://github.com/kimmyxpow/svpb.git
cd svpb

2. Install dependencies

npm install

This will install all dependencies in the root and in the sv/ frontend workspace.

3. Install modd (used for backend auto-reloading)

Make sure Go is installed, then run:

go install github.com/cortesi/modd/cmd/modd@latest

You may need to add $GOPATH/bin to your PATH if modd is not found after install.

๐Ÿงช Development

Run both frontend and backend together

npm run dev

Runs both the SvelteKit dev server and PocketBase backend in parallel.

Run only the frontend (SvelteKit)

npm run dev:fe

Run only the backend (PocketBase)

npm run dev:be

By default, PocketBase will run at http://localhost:8090.

๐Ÿ› ๏ธ Generate PocketBase Types

You can generate TypeScript types from your PocketBase collections for use in the frontend:

npm run typegen

This will create or update the types in sv/src/lib/pocketbase/generated-types.ts using your local PocketBase SQLite data.

Top categories

Loading Svelte Themes