TECHNICAL DOCUMENTATION v1.0.0

MTS SaaS Admin Dashboard UI Kit

Complete Technical Architecture & Implementation Guide

1.0.0
Version
54
Pages
62
JS Modules
20
SCSS Files

MageTech Solutions • License: MIT • August 2026

Overview

What is MTS SaaS Admin Dashboard UI Kit?

A premium enterprise-ready SaaS Admin Dashboard UI Kit designed for modern web applications. It provides a complete, production-quality admin panel with 8 persona-specific dashboards, 100+ UI components, and support for light, dark, and high-contrast themes.

📈

8 Dashboards

Persona-specific views for every role in your organization

🛠

100+ Components

Buttons, cards, tables, forms, modals, and more

🌐

3 Themes

Light, dark, and high-contrast modes

No Framework

Pure vanilla JS with ES Modules

Technology Foundation

Built with a carefully selected modern stack optimized for performance, maintainability, and developer experience:

ℹ️
This UI Kit uses pure vanilla JavaScript with ES Modules. Each component is a function that returns an HTML string. No virtual DOM, no compilation step for JS — just clean, readable, maintainable code.

Tech Stack

A detailed breakdown of every technology in the stack, its version, and its role in the architecture.

TechnologyVersionPurpose
Vite8.2.2Build tool, dev server with HMR, asset bundling, multi-page app configuration
Bootstrap5.3CSS framework, responsive grid system, utility classes, base components
SCSS1.103.1CSS preprocessing, design tokens, mixins, theme system, variables
Chart.js4.5.1Interactive data visualizations (line, bar, doughnut, radar charts)
Font Awesome7.3.1Icon library with 2,000+ icons for UI elements and navigation
JavaScriptES ModulesVanilla JS, no framework — component functions returning HTML strings
InterGoogle FontsPrimary sans-serif typeface for all UI text
JetBrains MonoGoogle FontsMonospace typeface for code blocks and technical content

Project Structure

The complete directory tree showing every file and folder in the project.

mtssasadmindashboarduikit/
└── public/ # Static assets (FA CSS, webfonts, favicon)
└── src/
  ├── scss/ # 20 SCSS files
  │  ├── app.scss # Main entry, imports all partials
  │  ├── _variables.scss # Design tokens
  │  ├── _mixins.scss # Reusable mixins (223 lines)
  │  ├── _bootstrap.scss # Bootstrap 5 import
  │  ├── _theme.scss # Theme base styles
  │  ├── _theme-light.scss # Light theme CSS custom properties
  │  ├── _theme-dark.scss # Dark + high-contrast themes
  │  ├── _layout.scss # App shell, grids
  │  ├── _sidebar.scss # Sidebar styles
  │  ├── _header.scss # Header styles
  │  ├── _cards.scss # KPI cards
  │  ├── _badges.scss # Badges, avatars
  │  ├── _skeleton.scss # Loading states
  │  ├── _modals.scss # Toasts, modals
  │  ├── _command-palette.scss
  │  ├── _forms.scss # Form components
  │  ├── _tables.scss # Table components
  │  ├── _auth.scss # Auth page layouts
  │  ├── _errors.scss # Error pages
  │  └── _utilities.scss # Utility classes
  ├── js/ # 6 core modules
  │  ├── app.js # Main entry (90 lines)
  │  ├── config.js # APP_CONFIG object
  │  ├── theme.js # Theme toggle/persistence (56 lines)
  │  ├── sidebar.js # Sidebar behavior (79 lines)
  │  ├── utils.js # Utility functions (103 lines)
  │  └── demo-data.js # Mock data (97 lines)
  ├── components/ # 3 layout components
  │  ├── layout.js # renderAppLayout, renderAuthLayout, renderErrorLayout
  │  ├── sidebar-content.js # Sidebar navigation HTML
  │  └── header-content.js # Header with search, profile, theme toggle
  └── pages/ # 54 HTML pages + 54 JS modules
    ├── auth/ # 9 pages
    ├── dashboard/ # 10 pages (8 personas + index + user)
    ├── users/ # 4 pages (CRUD)
    ├── roles/ # 4 pages (CRUD)
    ├── customers/ # 2 pages
    ├── subscriptions/ # 3 pages
    ├── billing/ # 3 pages
    ├── reports/ # 3 pages
    ├── settings/ # 7 pages
    ├── notifications/ # 1 page
    ├── activity/ # 1 page
    ├── profile/ # 1 page
    ├── onboarding/ # 1 page
    ├── components/ # 1 page (showcase)
    └── errors/ # 4 pages (401,403,404,500)
└── dist/ # Production build output
└── package.json
└── vite.config.js
└── README.md

SCSS Architecture

The stylesheet layer consists of 19 partials plus 1 main entry file, totaling 20 SCSS files. Bootstrap is imported via SCSS for full theme integration.

Import Chain

The import order is critical — each file depends on variables and mixins defined in earlier files:

// app.scss — Main entry point
@import 'variables';      // 1. Design tokens & SCSS variables
@import 'mixins';         // 2. Reusable mixins (223 lines)
@import 'bootstrap';      // 3. Bootstrap 5 full import
@import 'theme';          // 4. Theme base styles
@import 'theme-light';    // 5. Light theme custom properties
@import 'theme-dark';     // 6. Dark + high-contrast themes
@import 'layout';         // 7. App shell, grid system
@import 'sidebar';        // 8. Sidebar component
@import 'header';         // 9. Header component
@import 'cards';          // 10. KPI & stat cards
@import 'badges';         // 11. Badges & avatars
@import 'skeleton';       // 12. Skeleton loading states
@import 'modals';         // 13. Toasts & modals
@import 'command-palette';// 14. Command palette
@import 'forms';          // 15. Form components
@import 'tables';         // 16. Table components
@import 'auth';           // 17. Auth page layouts
@import 'errors';         // 18. Error page styles
@import 'utilities';      // 19. Custom utility classes

Key Design Decisions

ℹ️
Bootstrap is imported via @import 'bootstrap/scss/bootstrap' which provides full SCSS variable override capability. Font Awesome is loaded via <link> tag in HTML (not SCSS import) for proper bundling and caching.

Design Tokens

All design decisions are centralized in SCSS variables and CSS custom properties. These tokens ensure visual consistency across the entire application.

Color Palette

Brand Colors

VariableValuePreviewUsage
$brand-orange#E67E22Primary brand accent
$brand-orange-light#F39C12Hover states, highlights
$brand-orange-dark#D35400Active states, emphasis
$brand-charcoal#2C3E50Sidebar, dark surfaces
$brand-dark#1a1d23Deepest dark backgrounds

Blue Scale

VariableValuePreview
$blue-50#EFF6FF
$blue-100#DBEAFE
$blue-200#BFDBFE
$blue-300#93C5FD
$blue-400#60A5FA
$blue-500#3B82F6
$blue-600#2563EB
$blue-700#1D4ED8

Green Scale

VariableValuePreview
$green-50#F0FDF4
$green-100#DCFCE7
$green-200#BBF7D0
$green-300#86EFAC
$green-400#4ADE80
$green-500#22C55E
$green-600#16A34A
$green-700#15803D

Red Scale

VariableValuePreview
$red-50#FEF2F2
$red-100#FEE2E2
$red-200#FECACA
$red-300#FCA5A5
$red-400#F87171
$red-500#EF4444
$red-600#DC2626
$red-700#B91C1C

Yellow, Purple, Teal Scales

VariableValuePreview
$yellow-50#FEFCE8
$yellow-300#FDE047
$yellow-500#EAB308
$yellow-600#CA8A04
$purple-50#FAF5FF
$purple-300#D8B4FE
$purple-500#A855F7
$purple-600#9333EA
$teal-50#F0FDFA
$teal-300#5EEAD4
$teal-500#14B8A6
$teal-600#0D9488

Gray Scale

VariableValuePreview
$gray-25#FCFCFD
$gray-50#F9FAFB
$gray-100#F2F4F7
$gray-200#EAECF0
$gray-300#D0D5DD
$gray-400#98A2B3
$gray-500#667085
$gray-600#475467
$gray-700#344054
$gray-800#1D2939
$gray-900#101828

Spacing Scale

Based on a 4px base unit, providing consistent spatial rhythm throughout the UI.

VariableValuePixels
$space-000px
$space-0.50.125rem2px
$space-10.25rem4px
$space-1.50.375rem6px
$space-20.5rem8px
$space-30.75rem12px
$space-41rem16px
$space-51.25rem20px
$space-61.5rem24px
$space-82rem32px
$space-102.5rem40px
$space-123rem48px
$space-164rem64px
$space-205rem80px

Typography

CategoryTokenValue
Font Families$font-family-sans'Inter', system-ui, -apple-system, sans-serif
$font-family-mono'JetBrains Mono', 'Fira Code', monospace
Font Sizes$font-size-xs12px (0.75rem)
$font-size-sm13px (0.8125rem)
$font-size-base14px (0.875rem)
$font-size-md16px (1rem)
$font-size-lg18px (1.125rem)
$font-size-xl20px (1.25rem)
Extended Sizes$font-size-2xl24px (1.5rem)
$font-size-3xl / 4xl30px / 36px
Font Weights$font-weight-regular400
$font-weight-medium500
$font-weight-semibold600
$font-weight-bold700
Line Heights$line-height-tight1.25
$line-height-snug1.375
$line-height-normal1.5
$line-height-relaxed1.625

Border Radius

VariableValueUsage
$radius-none0No rounding
$radius-sm4pxButtons, inputs
$radius-md6pxCards, dropdowns
$radius-lg8pxModals, panels
$radius-xl12pxLarge cards, containers
$radius-2xl16pxFeature cards
$radius-full9999pxPill shape, avatars

Shadows

VariableCSS Value
$shadow-xs0 1px 2px rgba(0,0,0,.05)
$shadow-sm0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06)
$shadow-md0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06)
$shadow-lg0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05)
$shadow-xl0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04)

Z-Index Scale

VariableValueUsage
$z-dropdown1000Dropdown menus
$z-sticky1020Sticky headers
$z-fixed1030Fixed sidebar
$z-modal-backdrop1040Modal overlays
$z-modal1050Modal dialogs
$z-popover1060Popovers
$z-tooltip1070Tooltips
$z-toast1080Toast notifications
$z-command1090Command palette

Transitions

VariableValueUsage
$transition-fast150ms easeHover states, focus rings
$transition-base200ms easeGeneral transitions
$transition-slow300ms easePanel slides, modals
$transition-spring300ms cubic-bezier(.34,1.56,.64,1)Bouncy, playful animations

Breakpoints

VariableValueDescription
$bp-xs0Default (mobile first)
$bp-sm576pxSmall devices (landscape phones)
$bp-md768pxMedium devices (tablets)
$bp-lg992pxLarge devices (desktops)
$bp-xl1200pxExtra large devices (large desktops)
$bp-2xl1400pxXXL devices (wide screens)

Layout Dimensions

VariableValueDescription
$sidebar-width260pxFull sidebar width
$sidebar-collapsed72pxCollapsed sidebar width
$sidebar-mobile-width280pxMobile drawer sidebar
$header-height64pxFixed header height

Theme System

The theme system supports three themes: light, dark, and high-contrast. Themes are implemented using CSS custom properties on the <html> element via the data-theme attribute.

Theme Architecture

☀️

Light Theme

Default theme with white surfaces and dark text. Optimized for bright environments.

🌑

Dark Theme

Dark surfaces with light text. Reduces eye strain in low-light conditions.

⚠️

High Contrast

Maximum contrast ratio for vision accessibility. WCAG AAA compliance.

How It Works

// Setting the theme
document.documentElement.setAttribute('data-theme', 'dark');

// Persisting the choice
localStorage.setItem('mts-theme', 'dark');

// Detecting system preference
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;

CSS Custom Properties (Light Theme)

PropertyValueUsage
--mts-primary#E67E22Primary brand color
--mts-primary-hover#D35400Primary hover state
--mts-primary-light#F39C12Light primary variant
--mts-primary-rgb230, 126, 34Primary as RGB (for rgba)
--mts-primary-bgrgba(230,126,34,.08)Primary background tint
--mts-success#27AE60Success semantic color
--mts-success-bg#EAFAF1Success background
--mts-success-border#A9DFBFSuccess border
--mts-warning#F39C12Warning semantic color
--mts-warning-bg#FEF9E7Warning background
--mts-warning-border#F9E79FWarning border
--mts-danger#E74C3CDanger semantic color
--mts-danger-bg#FDEDECDanger background
--mts-danger-border#F5B7B1Danger border
--mts-info#3498DBInfo semantic color
--mts-info-bg#EBF5FBInfo background
--mts-info-border#AED6F1Info border
PropertyValueUsage
--mts-background#F8F9FAPage background
--mts-surface#FFFFFFSurface background
--mts-card#FFFFFFCard background
--mts-card-hover#F8F9FACard hover state
--mts-border#E9ECEFDefault border color
--mts-border-light#F1F3F5Light border
--mts-divider#E9ECEFDivider lines
--mts-hoverrgba(0,0,0,.04)Row hover tint
--mts-activergba(0,0,0,.06)Active/selected state
--mts-text-primary#1a1d23Primary text
--mts-text-secondary#6C757DSecondary text
--mts-text-muted#ADB5BDMuted text
--mts-text-inverse#FFFFFFInverse text (on dark)
--mts-text-link#E67E22Link text color
--mts-sidebar-bg#2C3E50Sidebar background
--mts-sidebar-text#BDC3C7Sidebar text
--mts-sidebar-text-hover#ECF0F1Sidebar hover text
--mts-sidebar-text-active#E67E22Sidebar active text
--mts-sidebar-active-bgrgba(230,126,34,.08)Sidebar active background
--mts-sidebar-hover-bgrgba(255,255,255,.08)Sidebar hover background
--mts-sidebar-borderrgba(255,255,255,.06)Sidebar border
--mts-sidebar-width260pxSidebar width
--mts-sidebar-collapsed-width72pxCollapsed sidebar width
--mts-header-bg#FFFFFFHeader background
--mts-header-border#E9ECEFHeader border
--mts-header-height64pxHeader height
--mts-input-bg#FFFFFFInput background
--mts-input-border#D0D5DDInput border
--mts-input-focus-border#E67E22Input focus border
--mts-input-focus-shadow0 0 0 3px rgba(230,126,34,.15)Input focus ring
--mts-input-placeholder#98A2B3Input placeholder text
--mts-skeleton-base#E9ECEFSkeleton base color
--mts-skeleton-shine#F8F9FASkeleton shimmer
--mts-overlay-bgrgba(0,0,0,.5)Overlay background
--mts-modal-bg#FFFFFFModal background
--mts-dropdown-bg#FFFFFFDropdown background
--mts-toast-bg#FFFFFFToast background
--mts-shadow-xs0 1px 2px rgba(0,0,0,.05)Extra small shadow
--mts-shadow-sm0 1px 3px rgba(0,0,0,.1)Small shadow
--mts-shadow-md0 4px 6px rgba(0,0,0,.1)Medium shadow
--mts-shadow-lg0 10px 15px rgba(0,0,0,.1)Large shadow
--mts-shadow-xl0 20px 25px rgba(0,0,0,.1)Extra large shadow
--mts-chart-1#E67E22Chart series 1
--mts-chart-2#3498DBChart series 2
--mts-chart-3#27AE60Chart series 3
--mts-chart-4#E74C3CChart series 4
--mts-chart-5#9B59B6Chart series 5
--mts-chart-6#1ABC9CChart series 6
--mts-chart-grid#E9ECEFChart grid lines
--mts-chart-text#6C757DChart labels/legend

Theme Storage & Switching

Mixins Reference

All 18 mixins defined in _mixins.scss (223 lines). These provide reusable patterns that reduce code duplication.

MixinSignatureDescription
respond-above@include respond-above()Applies styles above a breakpoint using min-width media query.
respond-below@include respond-below()Applies styles below a breakpoint using max-width media query.
respond-between@include respond-between(, )Applies styles between two breakpoints.
focus-ring@include focus-ring(, )Visible focus ring for keyboard navigation. Default: orange, 2px offset.
focus-ring-inset@include focus-ring-inset()Inset focus ring for elements where ring appears inside the border.
text-truncate@include text-truncateSingle-line truncation with ellipsis.
text-clamp@include text-clamp()Multi-line truncation using -webkit-line-clamp.
custom-scrollbar@include custom-scrollbar(, , )Custom scrollbar styling for WebKit and Firefox.
absolute-fill@include absolute-fillAbsolute positioning covering nearest positioned parent.
fixed-fill@include fixed-fillFixed positioning covering full viewport.
flex-center@include flex-centerFlexbox centering: align-items + justify-content center.
flex-between@include flex-betweenFlexbox space-between layout.
flex-col-center@include flex-col-centerVertical flexbox centering with column direction.
card-surface@include card-surfaceStandard card: background, border, radius, padding.
elevated-surface@include elevated-surfaceElevated card with shadow for floating elements.
interactive-row@include interactive-rowTable row with hover, pointer cursor, and transition.
sr-only@include sr-onlyScreen reader only: visually hidden but accessible.
skeleton-loading@include skeleton-loadingAnimated skeleton placeholder with shimmer keyframes.
reduced-motion@include reduced-motionDisables animations for users who prefer reduced motion.

JavaScript Architecture

The JavaScript layer uses vanilla ES Modules with no framework. Each page has its own module that imports shared components and utilities.

APP_CONFIG

Central configuration object exported from config.js:

export const APP_CONFIG = {
  name: 'MTS SaaS Admin Dashboard',
  version: '1.0.0',
  company: 'MageTech Solutions',
  apiBaseUrl: 'https://api.mts-saas.dev/v1',
  environment: 'development',
  currency: 'INR',
  currencySymbol: '\u20B9',
  locale: 'en-IN',
  dateFormat: 'DD MMM YYYY',
  timeFormat: 'hh:mm A',
  defaultAvatar: '/assets/default-avatar.png',
  logo: '/assets/logo.svg',
  logoSmall: '/assets/logo-small.svg',
  favicon: '/favicon.ico',
  sidebarWidth: 260,
  sidebarCollapsedWidth: 72,
  headerHeight: 64,
  pageSize: 10,
  toastDuration: 4000,
  commandPaletteKey: 'k'
};

Core Modules

ModuleLinesExportsPurpose
app.js90initAppMain entry point. Initializes theme, sidebar, search, command palette, quick actions.
config.js35APP_CONFIGCentral configuration object with app-wide settings.
theme.js56getTheme, setTheme, toggleTheme, initTheme, getSystemTheme, updateThemeIconTheme management: toggle, persist, detect system preference.
sidebar.js79initSidebar, initNavToggles, setActiveNavSidebar behavior: expand/collapse, mobile drawer, active state.
utils.js10313 functions (see below)Shared utility functions for formatting, DOM, and UX helpers.
demo-data.js9710 data exportsMock data for development and demos.

Utility Functions (utils.js)

FunctionSignatureReturnsDescription
formatCurrencyformatCurrency(amount)stringFormats number as INR currency (e.g. \u20B91,23,456.00)
formatNumberformatNumber(num)stringFormats number with locale-specific thousand separators
formatDateformatDate(date)stringFormats date using app dateFormat (DD MMM YYYY)
formatDateTimeformatDateTime(date)stringFormats date + time (DD MMM YYYY, hh:mm A)
debouncedebounce(fn, delay)functionDelays function execution until after delay ms of inactivity
getInitialsgetInitials(name)stringExtracts initials from full name (max 2 chars)
generateIdgenerateId()stringGenerates unique ID using crypto.randomUUID()
slugifyslugify(text)stringConverts text to URL-friendly slug
truncatetruncate(text, length)stringTruncates text to length with ellipsis
escapeHtmlescapeHtml(str)stringEscapes HTML special characters to prevent XSS
copyToClipboardcopyToClipboard(text)PromiseCopies text to clipboard with fallback
showToastshowToast(message, type)voidDisplays toast notification (success/error/warning/info)
showModalshowModal(title, content)voidOpens modal dialog with title and HTML content

ES Module Pattern

Each page follows a consistent import/export pattern:

// src/pages/dashboard/saas-owner.js
import { renderAppLayout } from '../../components/layout.js';
import { renderSidebar } from '../../components/sidebar-content.js';
import { renderHeader } from '../../components/header-content.js';
import { formatCurrency } from '../../js/utils.js';
import { COMPANIES, REVENUE_DATA } from '../../js/demo-data.js';

function renderContent() {
  return <div class='dashboard'>...</div>;
}
const app = document.getElementById('app');
app.innerHTML = renderAppLayout(renderContent(), {
  pageTitle: 'SaaS Owner Dashboard',
  activePage: 'saas-owner'
});

Component System

The component system is built around three layout components and a library of reusable UI patterns.

Layout Components (layout.js)

FunctionParametersDescription
renderAppLayout(content, options)Main dashboard layout with sidebar + header + content. Options: { pageTitle, breadcrumbs, activePage }
renderAuthLayout(content, options)Auth page with split/centered layout. Options: { split, brandTitle, brandDescription }
renderErrorLayout(code, title, message)Error page template for 401, 403, 404, 500.

Sidebar (sidebar-content.js)

renderSidebar(activePage) generates complete sidebar HTML with logo, workspace switcher, and 7 navigation sections:

Header (header-content.js)

renderHeader(pageTitle, breadcrumbs) generates:

UI Component Showcase

🎯

Buttons

Primary, secondary, outline, ghost, danger + all sizes (sm, md, lg)

📄

Cards

KPI, stat, content, feature card variants

📊

Tables

Sortable, striped, hover, responsive data tables

📝

Forms

Inputs, selects, textareas, toggles, checkboxes, radios

🏷

Badges

Status, role, and count badge variants

🗐

Modals

Confirm, form, and info modal dialogs

⚠️

Alerts

Success, warning, danger, info alert banners

More

Dropdowns, tabs, accordions, tooltips, skeletons, avatar groups

Page Architecture

Each page follows a consistent pattern with its own HTML entry point and JS module.

Page Pattern

Every HTML page contains a minimal shell:

<div id="app"></div>
<script type="module" src="/src/pages/[module]/[page].js"></script>

The JS module then:

  1. Imports renderAppLayout from layout.js
  2. Imports renderSidebar from sidebar-content.js
  3. Imports renderHeader from header-content.js
  4. Builds page-specific content as an HTML string
  5. Calls renderAppLayout(contentHTML, { pageTitle, activePage })
  6. Sets document.getElementById("app").innerHTML to the result

Dashboard Personas

PersonaFocusKey Metrics
SaaS OwnerBusiness overviewMRR, ARR, growth rate, revenue charts, customer growth, churn rate
Super AdminSystem healthUser activity, system metrics, admin actions, audit logs
Org AdminOrganizationTeam members, org settings, permissions, departments
ManagerTeam performanceTeam productivity, task completion, KPIs, attendance
FinanceRevenueInvoices, payments, revenue breakdown, cash flow
SupportCustomer serviceTicket queue, response times, satisfaction scores, SLA
SalesRevenue pipelineDeals, conversion rates, pipeline value, targets
UserPersonalUsage stats, subscription status, activity timeline

Auth Pages (9 total)

PagePurpose
loginEmail/password login with remember me
registerNew account registration
forgot-passwordPassword reset request
reset-passwordSet new password via token
verify-emailEmail verification confirmation
otpOne-time password verification
two-factorTwo-factor authentication setup/verify
account-lockedAccount lockout notice
session-expiredSession timeout notice

CRUD Pages

Users Module (4 pages)

Roles Module (4 pages)

Feature Pages

Customers

Subscriptions

Billing

Reports

Settings (7 Tabs)

TabConfiguration Options
GeneralCompany name, logo, timezone, language, date format
AppearanceTheme selection, accent color, sidebar behavior, font size
SecurityPassword policy, 2FA, session timeout, IP whitelist
NotificationsEmail alerts, push notifications, digest frequency
BillingPlan details, payment history, update payment method
TeamTeam members, invite users, role assignments
IntegrationsAPI keys, webhooks, third-party service connections

Other Feature Pages

Error Pages

CodeTitleWhen Shown
401UnauthorizedUser not authenticated or token expired
403ForbiddenAuthenticated but insufficient permissions
404Not FoundPage or resource does not exist
500Server ErrorInternal server or application error

Build System

Powered by Vite 8.2.2 with multi-page app configuration for optimized builds.

Vite Configuration

// vite.config.js
import { defineConfig } from 'vite';
import { resolve } from 'path';

export default defineConfig({root: '.',publicDir: 'public',
  css: { preprocessorOptions: { scss: { api: 'legacy',
    silenceDeprecations: ['legacy-js-api'] } } },
  build: { outDir: 'dist', emptyOutDir: true },
  resolve: { alias: { '@': resolve(__dirname, 'src'),
    '@scss': resolve(__dirname, 'src/scss'),
    '@js': resolve(__dirname, 'src/js'),
    '@components': resolve(__dirname, 'src/components'),
    '@pages': resolve(__dirname, 'src/pages') } },
  rollupOptions: { input: {
    // 53+ entry points for multi-page build
    'main': resolve(__dirname, 'index.html'),
    'login': resolve(__dirname, 'src/pages/auth/login.html'),
    // ... additional entry points for all 54 pages
  } } }
});

Build Output

📂

dist/

All HTML, JS, CSS, and static assets

📦

Code Split

JS bundles per page for optimal loading

🎨

CSS Extraction

theme-[hash].css with all styles

🔑

Cache Busting

Hash-suffixed assets for long-term caching

Commands

CommandDescription
npm run devStart Vite dev server with hot module replacement (HMR)
npm run buildProduction build with optimized assets and code splitting
npm run previewPreview the production build locally before deployment

Data Layer

All mock data is centralized in demo-data.js for development and demos. No backend required.

ExportRecordsKey Fields
COMPANIES12id, name, domain, industry, employees, plan, mrr, since, status
USERS8id, name, email, role, department, status, lastLogin, created
PLANS5id, name, price, period, features[], color
INVOICES8id, customer, amount, date, due, status, method
REVENUE_DATA8 monthslabels, mrr, arr, revenue arrays
CUSTOMER_GROWTH8 monthslabels, new, churned, total arrays
ACTIVITY_LOG8 entriesuser, action, module, ip, device, time, status
NOTIFICATIONS8 entriesid, title, message, category, read, time
SUPPORT_TICKETS5id, subject, customer, priority, status, agent, created
SALES_PIPEELINE5id, deal, value, stage, rep, probability, expectedClose
ℹ️
Demo data is designed to look realistic with Indian business context (INR currency, Indian company names, local naming conventions). Data is structured to support all 8 dashboard personas with relevant metrics.

Accessibility

Built with WCAG 2.2 AA compliance as a core requirement, not an afterthought.

Keyboard Navigation

Full keyboard support with logical tab order and visible focus indicators via focus-ring mixin

🗨

ARIA Labels

All interactive elements have proper ARIA labels and roles for screen reader compatibility

👁

Screen Reader

sr-only class for visually hidden but accessible content; semantic HTML throughout

🎬

Reduced Motion

reduced-motion mixin respects prefers-reduced-motion system setting

⚠️

High Contrast

Dedicated high-contrast theme for vision accessibility (WCAG AAA)

🎨

Color Contrast

All text and interactive elements meet AA contrast ratios against their backgrounds

Implementation Details

Browser Support

Tested and supported on the latest 2 versions of all major browsers.

BrowserVersionsEngine
Google ChromeLatest 2Blink
Microsoft EdgeLatest 2Blink
Mozilla FirefoxLatest 2Gecko
Apple SafariLatest 2WebKit
⚠️
Not supported: Internet Explorer. This is a modern web application using ES Modules, CSS Custom Properties, and modern CSS features that are not available in IE.

API Reference

Complete reference for all exported functions and their usage.

Layout API (layout.js)

FunctionParametersReturns
renderAppLayoutcontent: string, options: { pageTitle, breadcrumbs?, activePage }string (full page HTML)
renderAuthLayoutcontent: string, options: { split?, brandTitle?, brandDescription? }string
renderErrorLayoutcode: number, title: string, message: stringstring

Theme API (theme.js)

FunctionParametersReturns
getTheme()string - current theme name
setThemetheme: stringvoid
toggleTheme()void - cycles light/dark/high-contrast
initTheme()void - reads stored or system preference
getSystemTheme()string - detects OS preference
updateThemeIcontheme: stringvoid - updates toggle button icon

Sidebar API (sidebar.js)

FunctionParametersReturns
initSidebar()void - initializes sidebar behavior
initNavToggles()void - sets up expand/collapse toggles
setActiveNavpageId: stringvoid - highlights active nav link

Deployment Guide

A pure client-side application with no server-side dependencies. Deploy anywhere that serves static files.

Static Hosting Options

☁️

Netlify / Vercel

Drag-and-drop dist/ folder or connect Git repository for auto-deploy

🖥

Apache / Nginx

Copy dist/ to web root and configure URL rewriting for SPA routing

💾

XAMPP / WAMP

Copy to htdocs directory, access via localhost/mtssasadmindashboarduikit

📂

AWS S3 / CloudFront

Upload dist/ to S3 bucket with CloudFront CDN distribution

Deployment Steps

  1. Run npm run build to generate the dist/ folder
  2. Upload the contents of dist/ to your hosting provider
  3. Configure your server to serve index.html for all routes (SPA fallback)
  4. Enable gzip/brotli compression for optimal performance
  5. Set cache headers for hashed assets (1 year) and HTML files (no-cache)

Configuration

Customize branding by editing APP_CONFIG in src/js/config.js:

// src/js/config.js
export const APP_CONFIG = {
  name: 'Your App Name',
  company: 'Your Company',
  logo: '/assets/your-logo.svg',
  apiBaseUrl: 'https://your-api.com/v1',
  currency: 'USD',
  currencySymbol: '$',
};
No build required for development: Run npm run dev and all changes are reflected instantly via HMR. The production build only needs to be run before deployment.