jonshipman / sveltekit-pb-boilerplate

84 stars 7 forks source link

Tips on usage #1

Closed stefandanzl closed 6 months ago

stefandanzl commented 9 months ago

This repo was a great idea! But I would need some pointers on how to actually implement it with respect to auth, API etc. Do you have some resources that can be used as a guide? Have you already used it in some project?

jonshipman commented 8 months ago

Yeah I've used it in a few. I think I've added a few more files since your comment. Now you can run "./setup" and it will init the whole thing for you and leave you with a fresh repo at the end.

jonshipman commented 6 months ago

The most recent update converted the project into a npx executable. Simply run npx svelte-pb@latest your-project and it will create a project for you. Bootstraps the stock sveltekit process. Cd into your-project and run npm run dev. It will start a pocketbase instance at the default location (which you will need to login @ localhost:8090/_ to setup) and sveltekit @ localhost:5173. http://localhost:5173/login will provide the login screen (uses the users collection, so once you setup an admin account you can create a user). Alternatively, you can register @ http://localhost:5173/register but will need SMTP setup within Pocketbase's webmin.