Skip to Content
Welcome to the official DBS Documentation! πŸ“š
Introduction

Introduction

Welcome to DBS (DB Studio Dashboard) β€” a production-ready Next.js 15 admin dashboard starter kit designed to give you a massive head start on any B2B application, internal tool, or SaaS platform.

DBS is opinionated by design. Every pattern β€” from API protection to form handling β€” has a single, recommended way to do it, so your team writes consistent code from day one.

What Is DBS?

DBS is a full-stack admin dashboard boilerplate that combines the best-in-class libraries into a cohesive, deeply integrated system. It ships with:

  • Authentication β€” Email/password, 2FA (TOTP), Passkeys (WebAuthn), and session management via Better Auth.
  • Authorization β€” A granular Role-Based Access Control (RBAC) system with dynamic permissions at both the UI and API level.
  • Real-time β€” Server-Sent Events (SSE) for live notifications, background task updates, and broadcast messages.
  • Background Tasks β€” A native async pattern (202 Accepted + webhook callback) that integrates with any queue provider.
  • Audit Logging β€” Every critical action is traceable with a built-in auditLogger.
  • Dynamic UI β€” A database-driven sidebar, permission-aware menus, and a stunning shadcn/ui + Tailwind design system.

πŸš€ Quick Navigation

Core Philosophy

Building a modern dashboard involves stitching together authentication, authorization, data fetching, form handling, real-time updates, and background jobs. DBS solves this by providing a unified, cohesive foundation:

PrincipleWhat It Means
Secure by DefaultEvery API route uses apiGuard. Every page uses RouteGuard. Security is not an afterthought.
Single Source of TruthRoles, permissions, and menus are seeded from one place and synced to the database.
Consistent PatternsOne way to fetch data (useData), one way to protect routes (apiGuard), one way to write forms.
Developer ExperienceFully typed TypeScript throughout. Auto-completing service layer. Standardized error/empty/loading states.

Tech Stack Overview

Framework & Runtime

  • Next.js 15Β  (App Router) β€” Server Components for performance, Client Components for interactivity, deployed on Vercel.

Authentication & Authorization

  • Better AuthΒ  β€” Handles sessions, email/password, 2FA, Passkeys, and OAuth.
  • Custom RBAC β€” Roles and permissions stored in PostgreSQL, checked at every API boundary and UI layer.

Database

UI & Styling

State & Data Fetching

Communication

  • ResendΒ  β€” Transactional email via src/lib/email.ts.
  • Server-Sent Events β€” Real-time push to clients via /api/stream/events.

Ready to build your next big thing?

Start the Tutorial

Last updated on