The open-source developer platform for building modern web applications and SaaS products.
Building a SaaS product from scratch requires months of work on authentication, billing, multi-tenancy, notifications, and dozens of other features. Plinth gives you all of this out of the box — production-ready, modular, and provider-agnostic.
- Ship in days, not months — Pre-built auth, billing, RBAC, notifications, audit logs, and more
- Provider-agnostic — Swap Stripe for Chapa, Resend for SMTP, S3 for local storage — no vendor lock-in
- Type-safe everywhere — Full TypeScript with Zod validation and Drizzle ORM
- Production-ready — Security headers, rate limiting, Docker support, CI/CD included
- Modular architecture — Use only what you need, extend what you want
| Feature | Description |
|---|---|
| Authentication | Better Auth with OAuth, 2FA, magic links, and session management |
| Authorization | RBAC with Owner/Admin/Member/Viewer roles + granular permissions |
| Billing | Stripe + Chapa adapters, plans, subscriptions, feature gates, usage limits |
| Multi-tenancy | Organization-based isolation with membership management |
| Notifications | In-app notification system with read/unread tracking |
| Audit Logging | Complete audit trail for all user and admin actions |
| API Keys | Prefix-based key management with scoping and expiration |
| Webhooks | Outgoing webhooks with HMAC-SHA256 signatures and delivery logging |
| Feature Flags | Global, user-specific, and org-specific overrides |
| React Email templates + Resend + SMTP adapters | |
| Storage | UploadThing + S3/R2 + local adapters with file validation |
| Rate Limiting | Sliding window algorithm with response headers |
| Admin Panel | User management, org management, system stats |
| Background Jobs | Inngest for async task processing |
| Analytics | PostHog integration for user analytics |
| AI Integration | Vercel AI SDK for chat and completions |
| i18n | next-intl for internationalization (10 languages) |
| Blog/Docs | MDX-powered content management |
| E2E Tests | Playwright for end-to-end testing |
| Error Monitoring | Sentry integration for error tracking |
| Credits System | Usage-based billing with credit management |
| Waitlist | Launch waitlist with referral tracking |
| User Impersonation | Admin can login as user for support |
| Onboarding | Multi-step onboarding flow |
| Health Checks | Database latency monitoring and status endpoints |
| CLI | Project scaffolding and module generation |
| Layer | Technology |
|---|---|
| Framework | Next.js 15 + React 19 |
| Language | TypeScript 5 (strict mode) |
| Styling | Tailwind CSS v4 + shadcn/ui |
| Database | PostgreSQL + Drizzle ORM |
| Auth | Better Auth (OAuth, 2FA, magic links) |
| Payments | Stripe + Chapa |
| React Email + Resend + SMTP | |
| Storage | UploadThing + AWS S3 |
| Analytics | PostHog |
| AI | Vercel AI SDK |
| Background Jobs | Inngest |
| Error Monitoring | Sentry |
| i18n | next-intl |
| Testing | Vitest + Playwright |
| Deployment | Docker + Vercel |
- Node.js 22+
- pnpm 9+
- PostgreSQL 16+
# Clone the repository
git clone https://github.com/yoni-crypto/plinth.git
cd plinth
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Initialize database
pnpm db:push
# Seed with demo data
pnpm db:seed
# Start development server
pnpm devVisit http://localhost:3000
| Password | Role | |
|---|---|---|
| admin@plinth.dev | password123 | Super Admin |
| member@plinth.dev | password123 | Member |
DATABASE_URL=postgresql://user:password@localhost:5432/plinth
AUTH_SECRET=your-secret-key-at-least-32-chars# OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Auth
AUTH_EXPIRES_IN=7d
# Email (default: log)
EMAIL_PROVIDER=resend|smtp|log
EMAIL_FROM=noreply@example.com
# Storage (default: local)
STORAGE_PROVIDER=uploadthing|s3|local
STORAGE_BUCKET=uploads
# Payments (default: stripe)
PAYMENT_PROVIDER=stripe|chapa
# UploadThing
UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=
# PostHog Analytics
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
# Sentry
NEXT_PUBLIC_SENTRY_DSN=
SENTRY_AUTH_TOKEN=
# AI
OPENAI_API_KEY=
# Inngest
INNGEST_EVENT_KEY=
INNGEST_SIGNING_KEY=
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000See .env.example for all available options.
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm typecheck |
Run TypeScript type checking |
pnpm test |
Run Vitest tests |
pnpm test:e2e |
Run Playwright E2E tests |
pnpm db:push |
Push schema to database |
pnpm db:generate |
Generate migration files |
pnpm db:migrate |
Run migrations |
pnpm db:studio |
Open Drizzle Studio |
pnpm db:seed |
Seed database with demo data |
# Start with Docker Compose
docker compose up -d
# Run migrations
docker compose exec app pnpm db:push
# Seed database
docker compose exec app pnpm db:seedplinth/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Login, Register, 2FA, etc.
│ │ ├── (dashboard)/ # Dashboard, Settings, Admin, Onboarding
│ │ ├── (marketing)/ # Blog, Docs
│ │ └── api/ # API routes
│ ├── components/ # UI components
│ │ ├── ui/ # shadcn primitives (50+ components)
│ │ ├── layout/ # AppShell, Sidebar, Header
│ │ ├── forms/ # FormField, FormSection
│ │ ├── data/ # DataTable, SearchInput
│ │ └── shared/ # EmptyState, ErrorState, Loading
│ ├── config/ # Environment validation (Zod)
│ ├── lib/ # Utilities, DB client, schema
│ │ ├── auth/ # Better Auth configuration
│ │ ├── analytics/ # PostHog integration
│ │ ├── jobs/ # Inngest background jobs
│ │ └── ai/ # Vercel AI SDK
│ ├── hooks/ # Custom React hooks
│ ├── i18n/ # Internationalization config
│ ├── messages/ # Translation files (10 languages)
│ └── modules/ # Feature modules
│ ├── auth/ # Authentication & sessions
│ ├── billing/ # Plans, subscriptions, gates, credits
│ ├── rbac/ # Roles & permissions
│ ├── organizations/ # Multi-tenancy
│ ├── notifications/ # In-app notifications
│ ├── audit/ # Audit logging
│ ├── api-keys/ # API key management
│ ├── webhooks/ # Outgoing webhooks
│ ├── payments/ # Stripe & Chapa adapters
│ ├── email/ # React Email + Resend + SMTP
│ ├── storage/ # UploadThing + S3 & local storage
│ ├── feature-flags/ # Feature flag system
│ ├── admin/ # Admin module + impersonation
│ ├── rate-limit/ # Rate limiting
│ ├── waitlist/ # Launch waitlist system
│ └── module-system/ # Plugin architecture
├── packages/
│ └── cli/ # CLI tool for scaffolding
├── content/ # MDX blog posts
├── docs/ # Documentation site
├── scripts/ # Seed & utility scripts
├── tests/ # E2E tests (Playwright)
└── sentry.client.config.ts # Sentry configuration
- Push to GitHub
- Import repository in Vercel
- Configure environment variables
- Deploy
docker compose -f docker-compose.yml up -dpnpm build
pnpm startContributions are welcome! Please read our Contributing Guide first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
Built with ❤️ by yoni-crypto
If you find Plinth useful, please give it a ⭐ on GitHub!