Shadboard Documentation
repository·main·Indexed 20 days ago
https://github.com/qualiora/shadboardAn open-source admin dashboard template built with Next.js 15, React 19, and Shadcn/UI. It features a production-ready foundation with Tailwind CSS 4, NextAuth.js for authentication, and a built-in theme customizer. The template includes pre-built productivity apps (Email, Chat, Calendar, Kanban), business pages, and a comprehensive authentication flow.
What's inside Shadboard
- Shadboard is an open-source admin dashboard template designed for building scalable, user-friendly web applications. It is built on a modern stack featuring Next.js 15 and React 19, utilizing Shadcn/ui and Radix UI for accessible, high-quality components. The template is highly customizable, supports internationalization (I18n), and includes integrated authentication and a theme customizer.
Overview of Shadboard features and technology stack
mainShadboard is an open-source admin dashboard template designed for building scalable web applications. It is built on a modern stack including Next.js 15, React 19, and Tailwind CSS 4.
Core Capabilities
- Theming & Layout: Supports Light/Dark mode, responsive design, and multiple layout options (Horizontal/Vertical).
- Localization: Built-in support for LTR (Left-to-Right) and RTL (Right-to-Left) text directions, along with Internationalization (I18n) support.
- Form & Auth: Integrates React Hook Form for state management/validation and NextAuth.js for secure authentication.
- Component System: Uses Shadcn/ui for a highly customizable and modern UI component library.
- Language Support: Compatible with both TypeScript and JavaScript.
Core Technologies in Shadboard
mainShadboard utilizes the following technology stack:
- Frameworks: React 19, Next.js 15 (App Router support)
- Styling & UI: Tailwind CSS 4, Radix UI, shadcn/ui
- Authentication: NextAuth.js
- Form & Validation: Zod, React Hook Form
- Icons: Lucide, React Icons
- Data Visualization & Tables: Recharts, TanStack Table
- Components: Embla Carousel, FullCalendar
Configure Route Protection via `routeMap`
mainRoute protection is managed in
src/configs/auth-routes.tsusing arouteMap. The middleware checks the currentpathnameagainst this map to determine access.Route Types
"guest": Accessible only to unauthenticated users. Authenticated users are redirected away (e.g., to the dashboard)."public": Accessible to both authenticated and unauthenticated users."protected"(Default): Any route not explicitly defined in the map is considered protected and requires authentication.
Exceptions
For
"public"routes, you can define anexceptionsarray to protect specific sub-paths within that route.Example Configuration
import type { RouteType } from "@/types" export const routeMap = new Map<string, RouteType>([ ["/sign-in", { type: "guest" }], ["/home", { type: "public", exceptions: ["/home/items"] }], ["/docs", { type: "public" }], ])import type { RouteType } from "@/types" export const routeMap = new Map<string, RouteType>([ ["/sign-in", { type: "guest" }], // Only unauthenticated users can access sign-in ["/register", { type: "guest" }], // Only unauthenticated users can access register ["/forgot-password", { type: "guest" }], // Only unauthenticated users can access forgot-password ["/verify-email", { type: "guest" }], // Only unauthenticated users can access verify-email ["/new-password", { type: "guest" }], // Only unauthenticated users can access new-password ["/home", { type: "public", exceptions: ["/home/items"] }], // Home is public, but /home/items is protected ["/docs", { type: "public" }], // Docs page is public ])Add a new navigation section (root item)
mainTo add a new top-level section to the sidebar, append a new object to the
navigationsDataarray insrc/data/navigation.ts. Ensure you include atitleand anitemsarray. Root items should include aniconNameto display the icon in the main menu.export const navigationsData: NavigationType[] = [ { title: "Support", items: [], }, ]Run the Shadboard starter-kit development server
mainTo start the development server for the Shadboard starter-kit, use your preferred package manager to run the
devscript. Once running, the application will be available athttp://localhost:3000.npm run dev # or yarn dev # or pnpm dev # or bun devUpdate Providers and Package Scripts
mainAfter adding authentication files, perform these final setup steps:
- Update Providers: In
src/providers/index.tsx, ensure theNextAuthprovider is included and that you pass thesessionprop. - Update
package.json: Add the following scripts to handle Prisma migrations and client generation:"scripts": { "migrate": "pnpm exec prisma migrate dev", "postinstall": "pnpm exec prisma generate" } - Generate Prisma Client: Run
pnpm exec prisma generateto initialize the client.
"scripts": { "migrate": "pnpm exec prisma migrate dev", "postinstall": "pnpm exec prisma generate" }- Update Providers: In
Install Shadboard Full Kit or Starter Kit
mainFollow these steps to set up your Shadboard project. You can choose between the Full Kit (includes all features, apps, and pages) or the Starter Kit (minimal setup for easy customization).
1. Prerequisites
Ensure your system meets these requirements:
- Node.js: version 18.18 or later.
- pnpm: The preferred package manager. Install it globally via npm:
npm install -g pnpm - Operating System: macOS, Windows (including WSL), or Linux.
- Code Editor: VSCode is recommended.
2. Download and Extract
- Download the zipped project file.
- Extract the zip file. You will see
typescript-versionandjavascript-versionfolders. - Choose your preferred version (Full Kit or Starter Kit) and language (TypeScript or JavaScript).
- Open the selected folder in your code editor.
3. Install and Run
Navigate to your project directory in the terminal and execute the following commands:
Install dependencies:
pnpm installLaunch the development server:
pnpm run devThe application will be available at
http://localhost:3000by default.pnpm install pnpm run devAdd a new navigation item
mainTo add a link under an existing section, insert a new object into the
itemsarray of that section. The item must contain either anhrefor a nesteditemsarray.export const navigationsData: NavigationType[] = [ { title: "Dashboards", items: [ { title: "Dashboard", href: "/dashboard", iconName: "ChartPie", }, ], }, ]Modify the dashboard landing page
mainThe main entry point for the application's UI is located atapp/page.tsx. Editing this file will trigger an automatic hot-reload in the browser to reflect your changes.Deploy Shadboard to Vercel
mainThe Shadboard starter-kit is optimized for deployment on the Vercel Platform. You can deploy by connecting your repository to Vercel or following the official Next.js deployment documentation.Install Authentication Dependencies
mainTo set up authentication using NextAuth.js and Prisma, install the following packages via
pnpm:pnpm install next-auth @auth/prisma-adapter @prisma/client prisma pnpm install --save-dev @types/picomatch