Giter VIP home page Giter VIP logo

pevey / sveltekit-vendure-starter Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 0.0 15.9 MB

Starter project to help you create your Vendure-powered ecommerce application. This version of the starter has the client (browser) make requests to your Vendure backend server. For a SvelteKit starter that makes request to the Vendure backend through the SvelteKit app, see https://github.com/pevey/sveltekit-vendure-starter-server-side.

License: MIT License

TypeScript 73.52% JavaScript 0.38% HTML 0.06% CSS 0.32% Svelte 25.72%

sveltekit-vendure-starter's Introduction

SvelteKit eCommerce Store Starter App for Vendure

Preview

If you are not familiar with Vendure, you can learn more on the project web site. Vendure is an open-source, MIT-licensed, Node.js-based ecommerce backend with tons of flexibility. You can use it to power practically any ecommerce application you could think of.

Video

2024-03-07.12-23-40.mp4

WORK IN PROGRESS

This project is under active development. Breaking changes will frequently occur.

Creating a project

# install degit
npm install -g degit

# create a new project in my-app
degit https://github.com/pevey/sveltekit-vendure-starter.git my-app

Installing packages

cd my-app
pnpm install

Configuring a project

mv .env.example .env
  • Open .env and add any required settings

  • To make development a bit easier, you can change the urls in the EmailPlugin configuration options in vendure-config.ts to match the default SvelteKit dev url: http://localhost:5173:

vendure-config.ts

verifyEmailAddressUrl: 'http://localhost:5173/auth/verify',
passwordResetUrl: 'http://localhost:5173/auth',
changeEmailAddressUrl: 'http://localhost:5173/account'

Running the app

Make sure your Vendure backend is running first and that you configure the VENDURE_API_URL in your .env file or your shell environment.

pnpm dev

NOTE: SvelteKit uses Vite, and Vite optimizes dependencies after they are installed. After you set up your project and install all packages and then run it for the first time using pnpm dev, you will see strange behavior the first time you navigate to each page. This will include strange console errors, hung navigation, etc. If you look in the terminal where you are running pnpm dev, you will see messages that explain vite is optimizing dependencies and reloading the app several times. After visiting all pages in the app, this should not occur again unless you update/re-install packages. This does not affect builds, only dev mode.

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.