For developing full-stack applications with SvelteKit, PocketBase, and Tailwind. Security is not guaranteed; further measures should be taken to ensure authentication and database function properly.
If you are already familiar with working with PocketBase, simply ignore the below configuration.
Inspired by https://github.com/fireship-io/pocketchat-tutorial.
Create a new PocketBase instance and get logged in. At least for testing purposes, pockethost.io is a great resource.
In Pocketbase, edit the API Rules of the existing "users" collection to match the following:
Create a new "messages" collection, and set up the two following fields:
Edit the API Rules of the "messages" collection to match the following:
Back in your code, create a .env file and set PUBLIC_POCKETBASE_URL to the base URL of your PocketBase instance.
Your full-stack application should now be functional!