This is a starter project for building web applications with Svelte and PocketBase.
The project comes with the following libraries and tools preconfigured:
Clone the repository
git clone https://github.com/mikkelsvartveit/svelte-pocketbase-template.git
Install dependencies:
npm install -g pnpm
pnpm install
pnpm install:pocketbase
Run PocketBase and the SvelteKit development server:
pnpm run dev
You can now access the app at http://localhost:5173 and the PocketBase admin panel at http://localhost:8090/_.
The project comes with a Dockerfile, which can be used to build and deploy the app on any platform (I personally use Railway).
The Dockerfile builds the SvelteKit app, and then copies the build files to /pb/pb_public in order to serve it through PocketBase.
Make sure to mount a volume to the /pb/pb_data directory to persist PocketBase data.