Pattern Library

Discover and implement production-ready patterns for your SeanStack applications. Each pattern is designed to be customizable while maintaining best practices.

How Patterns Work

1. Copy

Patterns are copied directly into your project, not installed as dependencies.

2. Customize

Modify the code to match your needs. It's your code now, change anything.

3. Evolve

Optionally contribute improvements back or update with AI assistance.

Available Patterns

Authentication Form

Complete authentication UI with sign in, sign up, and password reset

UI
Auth
Form validationError handlingSocial loginTypeScript
seanstack add auth-form

Dashboard Layout

Responsive dashboard shell with sidebar, header, and content area

UI
Layout
Mobile responsiveDark modeCollapsible sidebarBreadcrumbs
seanstack add dashboard-layout

Data Table

Advanced data table with sorting, filtering, and pagination

UI
Data
Server-side operationsColumn visibilityExport functionalityRow selection
seanstack add data-table

Settings Page

User settings page with profile, preferences, and account management

Features
UI
Profile editingTheme preferencesNotification settingsDanger zone
seanstack add settings-page

API Route Handler

Next.js API route with authentication, validation, and error handling

API
Backend
Type-safe handlersMiddleware chainError boundariesRate limiting
seanstack add api-handler

Working with Patterns

Adding a Pattern

Use the CLI to add patterns to your project:

seanstack add [pattern-name]

This will copy the pattern files into your project and install any required dependencies.

Updating Patterns

Use AI assistance to intelligently merge updates:

seanstack update [pattern-name] --ai-merge

Contributing Patterns

Share your improvements with the community:

seanstack contribute [pattern-name] --enhancement "description"

Your enhancement will be reviewed and potentially included in the pattern library.

Pattern Principles

Own Your Code

Patterns become your code. No external dependencies means no breaking changes from updates you didn't choose.

AI-Enhanced

Every pattern includes metadata that helps AI tools understand and work with your code effectively.

Best Practices

Patterns are built following industry best practices for security, performance, and accessibility.

Minimal Dependencies

Patterns use only essential, well-maintained dependencies to minimize security risks and maintenance burden.

Create Your Own Patterns

Have a pattern that could benefit others? Learn how to create and share patterns:

Pattern Creation Guide