Shared Core
Common logic, TypeScript interfaces, and global constants used by all apps and bots.
Located in packages/shared
Why a Shared Package?
In a large monorepo, duplicating types like User or Order across the Dashboard, Web Store, and Bots leads to drift and bugs. Isolating shared code into a single package guarantees:
If the database schema changes, the types update here once.
The storefront and the bots format currency exactly the same way.
Strict TypeScript interfaces catch drift before it reaches production.
What It Contains
Database row types generated from Supabase, internal DTOs, and strict Zod schemas for validation.
Enums for order statuses, role definitions, and default configuration values.
Pure JavaScript functions for data manipulation, formatting, and mathematical operations. No React code lives here.
Shared authentication logic used by both the web storefront and admin dashboard.
Usage
import { type User } from "@skam/shared"
import { ORDER_STATUS } from "@skam/shared"
import { formatCurrency } from "@skam/shared"