sveltekit-typescript-tailwind-polyfills-template Svelte Themes

Sveltekit Typescript Tailwind Polyfills Template

a template with sveltekit, typescript , tailwind css and nodejs polyfills for the frontend out of the box.

Template

This is a template for frontend projects with sveltekit, typescript, tailwindcss and nodejs polyfills.

To reuse this template, degit is the easiest way.

degit happysalada/sveltekit-typescrypt-tailwind-polyfills-template

Developing

if you have nix and direnv installed, the dependencies required to run the project will automatically be installed for you. Otherwise, you just need pnpm or npm

pnpm run dev

# or start the server and open the app in a new browser tab
pnpm run dev -- --open

Building

To create a production version of your app:

pnpm run build

You can preview the production build with pnpm run preview.

To deploy your app, you may need to install an adapter for your target environment.

db setup with surreal

if you plan on using surrealdb, you'll likely need to create the following definition for user auth

setup sessions and permissions

DEFINE TABLE user SCHEMALESS
   PERMISSIONS 
     FOR select, update, delete WHERE id = $auth.id, 
     FOR create NONE;
DEFINE SCOPE end_user SESSION 24h
    SIGNUP ( CREATE user SET email = $email, pass = crypto::argon2::generate($pass) )
    SIGNIN ( SELECT * FROM user WHERE email = $email AND crypto::argon2::compare(pass, $pass) )
;

Top categories

Loading Svelte Themes