$ show boxyhq/saas-starter-kit
This is a production-ready, multi-tenant SaaS starter kit built with Next.js (Pages Router), NextAuth.js, Prisma ORM (PostgreSQL), and Tailwind CSS. The system provides comprehensive enterprise features: email/password authentication, magic link, OAuth (Google, GitHub), SAML/SSO via BoxyHQ Jackson, directory sync (SCIM), webhooks via Svix, audit logging via Retraced, Stripe billing, API keys, and team-based role management (RBAC). The architecture follows a monolith with API routes under /pages/api, middleware for session validation, and a component-based frontend. Data flows center around team creation and management: users register (or SSO), create or join teams via invitations, then configure team-level SSO, directory sync, webhooks, billing, and API keys. The codebase demonstrates solid engineering practices with Zod validation, reusable UI components, and a clear separation of concerns, but shows signs of feature creep and some legacy patterns (e.g., Pages Router). It is well-suited for developers building a SaaS platform who need a jump-start on authentication, team management, and enterprise integrations.
The LLM identified 2 files worth highlighting for reuse:
A self-contained module of Zod validation schemas for common primitives: email, password (with strength rules), slug (alphanumeric+hyphen), domain, URL, phone, and hex color. Each schema includes custom error messages and refinement logic (e.g., password must have uppercase, lowercase, number). This module is isolated (depends only on 'zod'), demonstrates careful input validation, and can be extracted as a shared utility for any TypeScript project needing standard validated fields.
A generic confirmation dialog component built with React and daisyUI. It accepts configurable title, message, confirm/cancel button labels, and an onConfirm callback. It manages its own open/close state and displays a modal overlay. The component is isolated (no internal imports beyond React and daisyUI class names), follows a clean pattern for destructive or important actions, and can be easily reused in any React project with minimal adaptation.