farbe-svelte Svelte Themes

Farbe Svelte

A 3D eCommerce website template powered by SvelteKit and Prismic

šŸŽØ Farbe – SvelteKit 3D eCommerce website

A SvelteKit website integrated with Prismic CMS, inspired by the official Nuxt starter template:

Inspired by: https://github.com/prismicio-community/nuxt-starter-prismic-farbe

This project demonstrates how to build a content-driven website using SvelteKit while managing all content through Prismic.


✨ Features

  • ⚔ Built with SvelteKit
  • 🧠 Headless CMS using Prismic
  • 🧩 Dynamic pages powered by Prismic UIDs
  • šŸ” Preview mode support
  • šŸ— Clean and scalable project structure
  • šŸš€ Ready for production deployment

šŸ›  Tech Stack

Category Technology
Framework SvelteKit
CMS Prismic
Build Tool Vite
Language TypeScript / JavaScript
Package Manager pnpm / npm
Content Modeling Prismic Slice Machine

šŸ“ Project Structure

farbe-svelte/
ā”œā”€ customtypes/                # Prismic custom content models
ā”œā”€ src/
│   ā”œā”€ lib/
│   │   └─ prismicio.ts        # Prismic client configuration
│   ā”œā”€ routes/
│   │   ā”œā”€ +layout.svelte      # Global layout
│   │   ā”œā”€ [[preview=preview]]/
│   │   │   └─ +page.svelte    # Homepage with preview support
│   │   └─ [uid]/+page.svelte  # Dynamic pages (UID-based)
│   └─ app.html                # Base HTML template
ā”œā”€ static/                     # Static assets
ā”œā”€ slicemachine.config.json    # Prismic Slice Machine config
ā”œā”€ svelte.config.js
ā”œā”€ vite.config.ts
ā”œā”€ package.json
└─ README.md

šŸš€ Getting Started

1ļøāƒ£ Install dependencies

Using pnpm (recommended):

pnpm install

Or with npm:

npm install

2ļøāƒ£ Run development server

pnpm dev
# or
npm run dev

The site will be available at:

http://localhost:5173

3ļøāƒ£ Build for production

pnpm build
# or
npm run build

🧠 Prismic Integration

This project uses Prismic as a headless CMS.

  • Content is created and managed in the Prismic dashboard
  • Pages fetch content using @prismicio/client
  • Rendering helpers come from @prismicio/svelte
  • Preview mode is supported via route parameters

Key configuration file:

src / lib / prismicio.ts;

This file initializes and exports the Prismic client used across the app.


šŸ“„ Routing & Pages

SvelteKit routing is filesystem-based:

Route Description
/ Homepage (Prismic document)
/[uid] Dynamic pages fetched by UID
[[preview=preview]] Enables Prismic preview mode

This allows creating unlimited pages directly from Prismic without manual route definitions.


🧩 Slice Machine

The customtypes/ directory contains Prismic content models.

Slice Machine enables:

  • Modular content blocks
  • Flexible page layouts
  • Easy collaboration between developers and content editors

šŸ“ Inspiration & Credits

This project is inspired by the official Nuxt + Prismic Farbe starter:

šŸ”— https://github.com/prismicio-community/nuxt-starter-prismic-farbe

The goal of this repository is to provide a SvelteKit equivalent of that architecture and workflow.


šŸ“Œ Notes & Recommendations

  • Add environment variables for Prismic repository & access tokens
  • Extend slices for more dynamic layouts
  • Deploy easily on Vercel, Netlify, or similar platforms
  • Consider adding SEO metadata per page via Prismic

šŸ“œ License

This project is open-source and intended for educational and experimental use.

Top categories

Loading Svelte Themes