Studio Admin

repository·main·Indexed 25 days ago

https://github.com/arhamkhnz/next-shadcn-admin-dashboard

A modern Next.js 16 admin dashboard template built with TypeScript, Tailwind CSS v4, and Shadcn UI. It features a modular colocation-based architecture, customizable theme presets (Tangerine, Neo Brutalism, Soft Pop), and prebuilt layouts for CRM, Finance, Analytics, and Logistics. The toolkit includes Zod for validation, React Hook Form, Zustand, TanStack Table, and Biome for linting and formatting.

Tokens
6.2K
Snippets
16
Records
34
Agent score
84%

What's inside studio-admin

  1. Overview of Studio Admin features and tech stack

    main

    Studio Admin is a Next.js 16 admin template designed for flexibility and modern design.

    Key Features:

    • Responsive layouts with collapsible sidebars.
    • Customizable theme presets (e.g., Tangerine, Neo Brutalism, Soft Pop).
    • Prebuilt dashboards for CRM, Finance, Analytics, and more.
    • Authentication flows and role-based UI structures.

    Tech Stack:

    • Framework: Next.js 16 (App Router), TypeScript, Tailwind CSS v4
    • UI: Shadcn UI
    • Validation: Zod
    • State/Forms: React Hook Form, Zustand
    • Data: TanStack Table
    • Tooling: Biome, Husky
  2. Run Studio Admin locally

    main

    To set up the development environment on your local machine, clone the repository, install the dependencies using npm, and start the development server. The application will be accessible at http://localhost:3000.

    git clone https://github.com/arhamkhnz/next-shadcn-admin-dashboard.git
    cd next-shadcn-admin-dashboard
    npm install
    npm run dev
  3. Understand the Colocation File System Architecture

    main
    The project utilizes a colocation-based architecture. In this pattern, each feature maintains its own pages, components, and logic within its specific route folder. Shared UI components, hooks, and global configurations are kept at the top level of the project. This modular approach ensures scalability and easier maintenance as the application grows.
  4. Define sidebar navigation structure

    main

    The sidebar navigation is structured as an array of NavGroup objects. Each group can have an optional label and a list of items. Items can be direct links (NavMainLinkItem) or parent items containing sub-menus (NavMainParentItem).

    Key Types

    • NavGroup: A collection of navigation items, optionally categorized by a label.
    • NavMainItem: A union type representing either a single link or a parent item with subItems.
    • NavSubItem: The structure for items nested within a parent menu.
    • NavBadge: Visual indicators for items, accepting values `
  5. Define Mail and Recipient data types

    main

    When building or extending mail-related features, use these TypeScript types to ensure data consistency for recipients, attachments, and mail messages.

    • Recipient: Represents a person with a name and email.
    • Attachment: Represents a file attached to a mail, including id, name, size, and an icon (from simple-icons).
    • Mail: The core message object containing id, accountId, from, to (array), cc (optional array), subject, body, receivedAt (ISO string), folder (one of inbox, drafts, sent, archive, trash), and status flags like isRead, isPinned, and isPriority.
    export type Recipient = {
      name: string;
      email: string;
    };
    
    export type Attachment = {
      id: string;
      name: string;
      size: string;
      icon: typeof siFigma;
    };
    
    export type Mail = {
      id: string;
      accountId: number;
      from: Recipient;
      to: Recipient[];
      cc?: Recipient[];
      subject: string;
      body: string;
      receivedAt: string;
      folder: "inbox" | "drafts" | "sent" | "archive" | "trash";
      isRead: boolean;
      isPinned: boolean;
      isPriority: boolean;
      labels: string[];
      attachments?: Attachment[];
      messageCount?: number;
    };
  6. Define Shipment and Logistics Data Types

    main

    The logistics module provides TypeScript types for managing shipment data, including status, transport modes, customer tiers, and geographic coordinates. Use these types to ensure data consistency when building logistics-related dashboard components.

    export type ShipmentStatus =
      | "Scheduled"
      | "In Transit"
      | "Out for Delivery"
      | "Delivered"
      | "Delayed"
      | "On Hold"
      | "Customs Hold";
    
    export type TransportMode = "land" | "air" | "sea";
    export type RouteType = "road" | "flight" | "ship";
    export type CustomerTier = "Priority" | "Standard" | "Non-priority";
    
    export type GeoCoordinate = [longitude: number, latitude: number];
    
    export type ShipmentLocation = {
      coordinates: GeoCoordinate;
      display: string;
      country: string;
      countryCode: string;
    };
    
    export type ShipmentCustomer = {
      name: string;
      initials: string;
      id: string;
      tier: CustomerTier;
      tierLabel: string;
    };
    
    export type HandlingTag = {
      label: string;
      icon: LucideIcon;
    };
    
    export type ShipmentHandling = {
      label: string;
      note: string;
      tags: HandlingTag[];
    };
    
    export type Shipment = {
      id: string;
      customer: ShipmentCustomer;
      origin: ShipmentLocation;
      destination: ShipmentLocation;
      cargo: string;
      handling: ShipmentHandling;
      weight: string;
      eta: string;
      etaMeta: string;
      status: ShipmentStatus;
      progress: number;
      mode: TransportMode;
      routeType: RouteType;
      transportNumber: string;
    };
  7. Define Mail Navigation structure

    main

    The mail navigation system is structured into three distinct sections: navMain, folders, and navFooter. Each item in these sections follows the MailNavItem type.

    • MailNavItem: Contains id, title, an optional label (e.g., for unread counts), a LucideIcon, and an isActive boolean.
    • MailNavigation: A container object holding arrays for navMain, folders, and navFooter.
    export type MailNavItem = {
      id: string;
      title: string;
      label?: string;
      icon: LucideIcon;
      isActive: boolean;
    };
    
    type MailNavigation = {
      navMain: MailNavItem[];
      folders: MailNavItem[];
      navFooter: MailNavItem[];
    };