SvelteKit-box Svelte Themes

Sveltekit Box

The goal of this project was to create a base for building an Ethereum dapp using Truffle with a SvelteKit frontend.

SvelteKite Truffle Box

This box comes with everything you need to start using smart contracts from a SvelteKit app.

Goal

The goal of this project was to create a base for building an Ethereum dapp using Truffle with a SvelteKit frontend.

Truffle Box

Truffle Boxes are helpful boilerplates that allow you to focus on what makes your dapp unique.

SvelteKit

SvelteKit is an application framework powered by Svelte. Used for building web applications of all sizes, with a beautiful development experience and flexible filesystem-based routing.

Installation

First ensure you are in a new and empty directory.

  1. Install Truffle globally.

    npm install -g truffle
    
  2. Download the box. This also takes care of installing the necessary dependencies.

    truffle unbox kaspergff/SvelteKit-box
    
  3. Compile and migrate the smart contracts..

    truffle compile
    truffle migrate
    
  4. Run the next.js server for the front-end. Smart contract changes must be manually recompiled and migrated.

    // Change directory to the front-end folder
    cd client
    // Serves the front-end on http://localhost:3000
    npm run dev
    
  5. Truffle can run tests written in Solidity or JavaScript against your smart contracts.

    truffle test
    
  6. To build the application for production, use the build script. A production build will be in the client/build folder.

    // ensure you are inside the client directory when running this
    npm run build
    

Top categories

Loading Svelte Themes