SvelteKit E-Commerce Site: Sediment Art
This is a real world e-commerce site which uses Stripe for payments and Cloudinary for image hosting. It is built with SvelteKit and TypeScript, and is currently in production!
- âī¸ SvelteKit: Full stack JS framework that handles our server and client side code
- đĻ Drizzle: Lightweight high power ORM for interfacing with our DB
- đŠī¸ Cloudinary: Image hosting and manipulation
- đŗ Stripe: Payment processing
- đŊ PlanetScale: Cloud hosted MySQL database (with data branching)
- đ Vercel: Serverless hosting
- đ¨ ShadCN for Svelte: Beautifully designed components
- đī¸ TailwindCSS: Inline styles
- đ Lucia V3: Authentication library and OAuth helpers
- đĻ Pnpm: Package manager
Getting Started
Stripe
- Create a Stripe account: https://dashboard.stripe.com/register
- Get your (TEST) public and secret keys, and add them to the
.env
:
PUBLIC_STRIPE_PUBLIC_KEY="pk_test_..."
STRIPE_SECRET_KEY="sk_test_..."
- Create your products in stripe, then add them to the
seed.ts
file where it is marked "TODO STRIPE:" (it is also a good idea to change the products, prices, and images in the seed.ts
file to match your own products)
- Install the stripe CLI and get webhook signing secret: https://stripe.com/docs/stripe-cli, then add it your your
.env
:
STRIPE_WEBHOOK_SECRET="whsec_..."
Run the project
- Install the dependencies with
pnpm i
- Run the project with
pnpm run dev