Web Storefront
The primary Next.js 15 (App Router) application powering skamcards.store. Located in apps/web
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 Componentsactions/Server Actions for all data mutationslib/Business logic, Shopier integration, Supabase clientscomponents/App-specific UI (shared components live in @skam/ui)e2e/Playwright end-to-end test specstests/Vitest unit and integration testsDevelopment Rules
RSC only, no useEffect for data. Fetch directly from Supabase in Server Components.
Server Actions in actions/, never API routes for form submissions.
"use client" only when hooks or event listeners are required. Keep leaf nodes client-side.
Never expose SUPABASE_SERVICE_ROLE_KEY in client-side code.
All inputs validated with Zod before any database interaction.
Running Locally
# Start just the web app on port 3000
pnpm dev:web
# Or start the full dev environment
pnpm dev