svelte-boilerplate

Svelte Boilerplate

Svelte with authentication implementation

A Svelte Starter Boilerplate

Svelte boilerplate - inspired by Hackathon Starter

Koa API repo can be found here koa-api

Example live app

Click here to view the app live.

Included

  • Used svelte-spa-router for handling routes
  • Parcel bundling done with the cero configuration
  • Bulma CSS
  • Testing with Jest (with Snapshot support) and Wallaby
  • Formatting with ESLint and Prettier
  • Transpiling with Babel
  • User authentication with JWT token
  • User profile page with gravatar if availabe else adds a defautl image
  • User forgot password
  • User roles (customer, admin etc)
  • Admin panel section
  • Email notifications settings page
  • Pagination inspired by svelte-paginate
  • Contact forms with Nodemailer on the server side and Sendgrid

Getting started

https://github.com/mylastore/svelte-boilerplate

npm install && npm start

Now head over to your favourite browser and open up localhost:1234 and you are ready to go

IMPORTANT! Start the API section and follow the instrcutions for that icluding on how to seed the sample data

Login as amind me@me.com and Password#1 to see the amid sample data

Login as customer me1@me.com Password#1

Build

To build the project run the following:

npm run build

Upload all the files inside the "dist" folder to your hosting provider ( May varry depending on your hosting )

Tests

_NOTE: Current open issue in jest-transform-svelte when adding preprocessor tests get stuck in an infinite loop (works in Wallaby though), Current issue

I prefer running my tests using Wallaby, but if you prefer plain old command line, just type the following to run your tests:

npm t

Linting

You may just check for linting or auto fix using these two options

npm run lint
npm run lint:fix

Home Page

Login

Forgot Password

User Profile

Admin Panel

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes