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:
- Go Extensions → pocketbase.io/docs/go-overview
- JavaScript Extensions → pocketbase.io/docs/js-overview
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 svpbnpm installThis will install all dependencies in the root and in the sv/ frontend workspace.
Make sure Go is installed, then run:
go install github.com/cortesi/modd/cmd/modd@latestYou may need to add $GOPATH/bin to your PATH if modd is not found after install.
npm run devRuns both the SvelteKit dev server and PocketBase backend in parallel.
npm run dev:fenpm run dev:beBy default, PocketBase will run at http://localhost:8090.
You can generate TypeScript types from your PocketBase collections for use in the frontend:
npm run typegenThis will create or update the types in sv/src/lib/pocketbase/generated-types.ts using your local PocketBase SQLite data.