Skam Docs

Web Storefront

The primary Next.js 15 (App Router) application powering skamcards.store. Located in apps/web

Live Production Site
skamcards.store

Key Features

Multi-Tenant Storefront

Dynamic subdomain routing with per-tenant theming, SEO metadata, and PWA manifests.

Shopier Integration

Full e-commerce pipeline: product catalog, cart, checkout, and order tracking via the Shopier API.

RAG Chat Widget

AI-powered customer support using the @skam/ai package and Supabase vector search.

Instagram Stories

Story-style content feed with media uploads via Supabase Storage.

Push Notifications

Web push via VAPID keys and service workers for order updates and promotions.

Theme System

Dark/light mode with next-themes, plus dynamic color themes per tenant brand.

Directory Structure

app/Routing and page-level React Server Components
actions/Server Actions for all data mutations
lib/Business logic, Shopier integration, Supabase clients
components/App-specific UI (shared components live in @skam/ui)
e2e/Playwright end-to-end test specs
tests/Vitest unit and integration tests

Development Rules

Data Fetching

RSC only, no useEffect for data. Fetch directly from Supabase in Server Components.

Mutations

Server Actions in actions/, never API routes for form submissions.

Client Components

"use client" only when hooks or event listeners are required. Keep leaf nodes client-side.

Security

Never expose SUPABASE_SERVICE_ROLE_KEY in client-side code.

Validation

All inputs validated with Zod before any database interaction.

Running Locally

Terminal
# Start just the web app on port 3000
pnpm dev:web

# Or start the full dev environment
pnpm dev