MarrowStack Documentation
MarrowStack is a free, open-source library of production-ready TypeScript server actions for Next.js. Each block is a single file (or small directory) that you copy into your project, run a SQL migration, set env vars, and wire up. No custom framework, no SDK lock-in. Sign in to copy any block instantly.
How it works
- Sign in at marrowstack.dev (GitHub OAuth or Solana wallet).
- Browse the block library and open any block.
- Click Copy all files — all blocks are free.
- Paste the file(s) into your Next.js project.
- Run the included SQL migration in your Supabase project.
- Set the env vars, mount the API routes, and you're live.
Guides
Getting Access
Sign in, copy any block for free, and integrate it into your Next.js app in minutes.
Getting Started
Prerequisites, env setup, Supabase wiring, and running a block in an existing Next.js app.
Security Model
What the blocks guarantee, what is the developer's responsibility, and the verify-before-deliver rule.
FAQ
Licensing, Solana cluster questions, and ORM compatibility.
Integration guides
Auth & Users
Auth System
Full authentication with email/password, GitHub and Google OAuth, email verification, password reset, account lockout, and role-based access control — all wired to Supabase.
~20 min setup
User Profile
Profile editing form with avatar upload to Supabase Storage, Zod validation, notification preferences, and soft-delete account removal.
~4 min setup
Team Workspaces
Multi-tenant workspace management with RBAC, member invitations, role management, and a full dashboard UI — backed by Supabase with row-level security.
~4 min setup
Admin Dashboard
Responsive admin dashboard UI with sidebar nav, KPI stat cards, user table, security activity feed, and quick-action buttons — drop into any Next.js app.
~4 min setup
Monetization
Billing & Subscriptions
PayPal REST API integration for one-time orders, monthly and yearly subscriptions, refunds, webhook verification, usage tracking, and invoice generation — wired to Supabase.
~3 min setup
Payments
PayPal Checkout v2 for one-time payments — order creation, capture, refunds, webhook verification, and INR display helpers with a module-level token cache.
~3 min setup
Communication
Email System
Transactional email via Resend — welcome, verify, password reset, purchase receipt, refund, team invite, affiliate payout, and newsletter templates sharing one branded HTML layout.
~3 min setup
Notifications
Real-time in-app notifications via Supabase Realtime — unread badge, mark-as-read, archive, bulk ops, Web Push subscribe/unsubscribe, and a bell dropdown component.
~4 min setup
Content
Internationalization
Locale routing, RTL support, and currency/date/number formatting for Next.js 14 using next-intl 3.x — ships with message files for English, French, German, Hindi, and Arabic.
~7 min setup
SEO Toolkit
Metadata, JSON-LD schemas, sitemap, and robots helpers for Next.js 14 — covers product pages, articles, breadcrumbs, OG images, Twitter Cards, hreflang, and noindex.
~3 min setup
Form Validation
Typed form primitives and three pre-built forms for Next.js 14+ — built on React Hook Form and Zod, with server-side validation and a multi-step form hook.
~2 min setup
Utility
Analytics Tracker
PostHog wrapper with auto page-view hook, user identification, a Supabase self-hosted fallback, and six pre-written SQL queries for DAU, WAU, funnel, revenue, and retention.
~4 min setup
File Upload
Drag-and-drop file uploader — Supabase Storage with signed URLs, type and size validation, simulated progress bar, image previews, multi-file support, and a file-list component.
~3 min setup
Full-Text Search
PostgreSQL FTS via Supabase — weighted tsvector search, websearch query format, autocomplete, facet counts, highlight extraction, recent searches, and a debounced React hook with pagination.
~3 min setup
Rate Limiting
Sliding-window rate limiting for Next.js 14 API routes — in-memory for dev, drop-in Upstash Redis upgrade for production, with per-IP and per-user strategies and standard headers.
~3 min setup
Error Handling
Structured logging, typed custom errors, a React Error Boundary, and API route wrappers — gives every thrown error a consistent shape and HTTP status code.
~3 min setup