GithubHelp home page GithubHelp logo

muellercornelius / pocketkit Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 264 KB

A SvelteKit starter template with TailwindCSS and Pocketbase.

JavaScript 49.12% HTML 1.94% CSS 0.62% Svelte 48.32%
daisyui lucide-icons pocketbase sveltekit sveltekit-template tailwindcss vite

pocketkit's Introduction

Pocketkit

Pocketkit is a simple SvelteKit starter template to get quickly up and running with PocketBase. It has all neccessary auth features without being complicated or bloated.

Features:

  • Full Auth Functionality (Password forgot, Password/E-Mail Change, Login, Register...)
  • OAuth2 with all PocketBase Providers
  • Tailwind CSS with DaisyUi
  • Svelte French Toast for displaying Toast Notifications
  • Lucide Icons

Get Started

  1. Download Pocketbase here and serve it.
  2. Import collections in PocketBase

Open the Pocketbase Settings and paste the following schema in "Import collections".

[
    {
        "id": "_pb_users_auth_",
        "name": "users",
        "type": "auth",
        "system": false,
        "schema": [
            {
                "id": "users_name",
                "name": "name",
                "type": "text",
                "system": false,
                "required": false,
                "options": {
                    "min": null,
                    "max": null,
                    "pattern": ""
                }
            },
            {
                "id": "oAuthIndicator",
                "name": "isOAuth",
                "type": "bool",
                "system": false,
                "required": false,
                "options": {}
            }
        ],
        "indexes": [],
        "listRule": "id = @request.auth.id",
        "viewRule": "id = @request.auth.id",
        "createRule": "",
        "updateRule": "id = @request.auth.id",
        "deleteRule": "id = @request.auth.id",
        "options": {
            "allowEmailAuth": true,
            "allowOAuth2Auth": true,
            "allowUsernameAuth": true,
            "exceptEmailDomains": null,
            "manageRule": null,
            "minPasswordLength": 8,
            "onlyEmailDomains": null,
            "requireEmail": false
        }
    }
]
  1. Start using the template.
  2. Create an .env file in the root folder with the following content:
PUBLIC_POCKETBASE="http://127.0.0.1:8090"
  1. npm i
  2. npm run dev and enjoy ;)

OAuth2

Pocketkit is ready for OAuth2. Simply configure the OAuth Providers you want to use in the PocketBase Dashboard and it will show up in the Login UI.

pocketkit's People

Contributors

dependabot[bot] avatar muellercornelius avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.