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:
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
git clone https://github.com/kimmyxpow/svpb.git
cd svpb
npm install
This will install all dependencies in the root and in the sv/
frontend workspace.
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.
npm run dev
Runs both the SvelteKit dev server and PocketBase backend in parallel.
npm run dev:fe
npm run dev:be
By default, PocketBase will run at http://localhost:8090.
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.