Skip to content

Latest commit

 

History

History
163 lines (131 loc) · 4.01 KB

File metadata and controls

163 lines (131 loc) · 4.01 KB

SankhyaAI - Premium UI Updates

Overview

This update transforms SankhyaAI into a premium, fully responsive AI support platform with a modern dark theme and metallic button components.

New Features

🎨 Premium Metal Button UI

  • Custom metal-button component with multiple variants:
    • default - Silver/Chrome metallic finish
    • gold - Golden metallic finish
    • bronze - Bronze metallic finish
    • steel - Steel gray metallic finish
    • chrome - Chrome blue metallic finish
  • Realistic 3D shadow effects with hover states
  • Active state visual feedback

🌙 Dark Theme

  • Professional dark color scheme optimized for readability
  • Metallic gradient backgrounds
  • Premium glass-morphism effects with backdrop blur
  • Custom scrollbar styling

📱 Fully Responsive Design

  • Mobile-first approach with breakpoints:
    • sm: 640px
    • md: 768px
    • lg: 1024px
    • xl: 1280px
  • Optimized layouts for all screen sizes
  • Touch-friendly button sizing on mobile
  • Responsive typography

🧭 Navigation Component

  • Sticky header with backdrop blur
  • Active route highlighting with gold metal buttons
  • Responsive logo and branding
  • Smooth transitions

Component Structure

frontend/
├── components/
│   ├── ui/
│   │   ├── metal-button.tsx    # Premium metal button component
│   │   ├── badge.tsx
│   │   ├── button.tsx
│   │   ├── card.tsx
│   │   ├── input.tsx
│   │   ├── scroll-area.tsx
│   │   ├── separator.tsx
│   │   ├── table.tsx
│   │   ├── tabs.tsx
│   │   └── textarea.tsx
│   └── navigation.tsx          # App navigation header
├── lib/
│   ├── api.ts                  # API client utilities
│   ├── sse.ts                  # Server-Sent Events handler
│   └── utils.ts                # Utility functions
└── app/
    ├── page.tsx                # Main chat interface
    ├── admin/page.tsx          # Admin dashboard
    ├── layout.tsx              # Root layout with navigation
    └── globals.css             # Global styles with dark theme

Usage

Metal Button Component

import { MetalButton } from "@/components/ui/metal-button";

// Basic usage
<MetalButton variant="gold" size="lg">
  Click Me
</MetalButton>

// With different variants
<MetalButton variant="chrome">Chrome</MetalButton>
<MetalButton variant="steel">Steel</MetalButton>
<MetalButton variant="bronze">Bronze</MetalButton>

Responsive Classes

The UI uses Tailwind's responsive prefixes:

// Example: Different padding on different screen sizes
<div className="p-4 sm:p-6 md:p-8">
  Content
</div>

// Example: Grid layout that changes with screen size
<div className="grid gap-4 sm:gap-6 lg:grid-cols-2 xl:grid-cols-3">
  Cards
</div>

Color Scheme

The new dark theme uses these primary colors:

  • Background: Dark slate blue (#1a202e)
  • Primary: Bright cyan (#0ea5e9)
  • Secondary: Dark blue-gray (#2d3748)
  • Accent: Bright cyan (matches primary)
  • Card: Slightly lighter than background (#1e2736)
  • Border: Subtle dark blue-gray (#384150)

Build & Deploy

Development

cd frontend
npm install
npm run dev

Production Build

npm run build
npm start

Docker

# From project root
docker compose up --build

Browser Support

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile browsers (iOS Safari, Chrome Mobile)

Performance Optimizations

  • Static page pre-rendering
  • Optimized bundle sizes
  • Lazy-loaded components
  • Efficient re-renders with React Query
  • CSS-in-JS with zero runtime overhead

Accessibility

  • Semantic HTML elements
  • ARIA labels where appropriate
  • Keyboard navigation support
  • Focus visible states
  • Color contrast compliance (WCAG AA)

Future Enhancements

  • Add loading skeletons
  • Implement dark/light theme toggle
  • Add more chart components for admin dashboard
  • Enhance mobile gestures
  • Add PWA support