5. UI/UX Requirements

5.1 Calculator Page

5.1.1 Layout Specification

Component: packages/desktop-app/src/components/CalculatorPage.tsx

Layout Structure:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Calculator Page                                β”‚
β”‚                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Input Section (Card)                     β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚
β”‚  β”‚  β”‚ Amount Input (Large)                β”‚  β”‚  β”‚
β”‚  β”‚  β”‚ Placeholder: "Enter amount..."      β”‚  β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚ Currency     β”‚  β”‚ Optimization Modeβ”‚   β”‚  β”‚
β”‚  β”‚  β”‚ Dropdown     β”‚  β”‚ Dropdown         β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚ 
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  [Calculate Button] - Full Width, Blue    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Results Section (After Calculation)      β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚ Total  β”‚ β”‚ Total  β”‚ β”‚ Total Denoms β”‚   β”‚  β”‚
β”‚  β”‚  β”‚ Notes  β”‚ β”‚ Coins  β”‚ β”‚              β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  Breakdown Table                          β”‚  β”‚
β”‚  β”‚  Denomination | Type | Count | Value      β”‚  β”‚
β”‚  β”‚                                           β”‚  β”‚
β”‚  β”‚  [Copy] [Export CSV]                      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Required Elements

1. Amount Input Field
  • Type: number or text (validated)
  • Validation: Positive numbers only, max 15 digits
  • Placeholder: "Enter amount..."
  • Auto-focus: Yes (on page load)
  • Clear button: Yes
  • Format: Allow comma separators (e.g., 1,000,000)
2. Currency Dropdown
  • Options: INR, USD, EUR, GBP
  • Default: INR
  • Display: {code} - {name} (e.g., "INR - Indian Rupee")
  • Icons: Currency symbols (β‚Ή, $, €, Β£)
3. Optimization Mode Dropdown
  • Options: greedy, balanced, minimize_large, minimize_small
  • Default: greedy
  • Display: Capitalized with description
  • Tooltips: Explanation of each mode
4. Calculate Button
  • Style: Primary blue, full-width
  • States: Normal, Hover, Disabled, Loading
  • Loading: Show spinner when calculating
  • Keyboard: Enter key triggers calculation
5. Results Display (Conditional)
  • Show only after successful calculation
  • Animate entrance (fade in)
  • Summary cards with icons
  • Sortable breakdown table
  • Copy/Export buttons

Color Scheme

/* Light Mode */
--bg-primary: #ffffff
--bg-secondary: #f9fafb
--text-primary: #111827
--text-secondary: #6b7280
--border: #e5e7eb
--button-primary: #2563eb
--success: #10b981
--error: #ef4444

/* Dark Mode */
--bg-primary: #1f2937
--bg-secondary: #111827
--text-primary: #f9fafb
--text-secondary: #9ca3af
--border: #374151
--button-primary: #3b82f6
--success: #34d399
--error: #f87171

Responsive Breakpoints

  • Mobile: < 640px (single column)
  • Tablet: 640px - 1024px (2 columns)
  • Desktop: > 1024px (3 columns)

5.1.2 Input Validation Rules

Amount Field Validation

interface ValidationRules {
  required: true;
  min: 0.01;
  max: 999999999999999; // 15 digits
  pattern: /^\d+(\.\d{1,2})?$/; // Optional 2 decimal places
  errorMessages: {
    required: "Amount is required";
    min: "Amount must be greater than 0";
    max: "Amount too large (max 15 digits)";
    pattern: "Invalid amount format";
  }
}

Real-time Validation

  • Validate on blur
  • Show error message below input
  • Disable calculate button if invalid
  • Clear error on valid input

Edge Cases Handling

Input Expected Message
"0" error Amount must be > 0
"-100" error Negative not allowed
"abc" error Not a number
"1.234" error Max 2 decimals
"1,000" valid Value: 1000
"0.01" valid Minimum valid amount

5.1.3 User Interaction Flow

Happy Path:
  1. User lands on Calculator page
  2. Amount field auto-focused
  3. User types amount: "50000"
  4. User selects currency: "INR" (default selected)
  5. User selects mode: "greedy" (default selected)
  6. User clicks "Calculate" button OR presses Enter
  7. Button shows loading state (spinner)
  8. API request sent
  9. Results appear with animation (< 100ms)
  10. Summary cards + breakdown table displayed
  11. User can copy or export results
  12. User can modify inputs and recalculate
Error Path:
  1. User enters invalid amount: "abc"
  2. Error message appears: "Invalid amount format"
  3. Calculate button disabled
  4. User corrects input: "5000"
  5. Error clears, button enabled
  6. User clicks Calculate
  7. API returns error (e.g., server down)
  8. Error notification shown
  9. Results section remains hidden
  10. User can retry

5.1.4 Accessibility Requirements

MUST HAVE:

  • βœ“ ARIA labels on all form inputs
  • βœ“ Keyboard navigation (Tab, Shift+Tab, Enter)
  • βœ“ Focus indicators (visible outline)
  • βœ“ Screen reader announcements for results
  • βœ“ Error messages associated with inputs (aria-describedby)
  • βœ“ Sufficient color contrast (WCAG AA minimum)
  • βœ“ Focus trap in modals (if any)

Example Accessible Markup

<input
  type="text"
  id="amount"
  aria-label="Enter amount to calculate"
  aria-required="true"
  aria-invalid={hasError}
  aria-describedby={hasError ? "amount-error" : undefined}
/>
{hasError && (
  <div id="amount-error" role="alert">
    {errorMessage}
  </div>
)}

5.2 History Page

5.2.1 Layout Specification

Component: packages/desktop-app/src/components/HistoryPage.tsx

Layout:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Quick   β”‚  β”‚ Full History                 β”‚ β”‚
β”‚  β”‚ Access  β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚(Sidebar)β”‚  β”‚ Filter Bar                   β”‚ β”‚
β”‚  β”‚         β”‚  β”‚ Currency | Date Range        β”‚ β”‚
β”‚  β”‚ Last 10 β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚ Calcs   β”‚  β”‚ History Table                β”‚ β”‚
β”‚  β”‚         β”‚  β”‚ ID | Date | Amount | Cur...  β”‚ β”‚
β”‚  β”‚ 1.50000 β”‚  β”‚ ... paginated rows ...       β”‚ β”‚
β”‚  β”‚   INR   β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚   Today β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚         β”‚  β”‚ Pagination                   β”‚ β”‚
β”‚  β”‚ 2. 1000 β”‚  β”‚ << < 1 2 3 > >>              β”‚ β”‚
β”‚  β”‚   USD   β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚   Today β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚         β”‚  β”‚                              β”‚ β”‚
β”‚  β”‚ ...     β”‚  β”‚                              β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Required Features

1. Quick Access Sidebar
  • Show last 10 calculations
  • Display: Amount, Currency, Date (relative)
  • Click: Load full details in main area
  • Scroll: Fixed position
  • Update: Real-time when new calc made
2. Filter Bar
  • Currency filter (All, INR, USD, EUR, GBP)
  • Date range picker
  • Clear filters button
  • Active filter count badge
3. History Table
  • Columns: ID, Date, Amount, Currency, Mode, Total Denoms, Actions
  • Sortable: By Date (default desc), Amount
  • Searchable: By amount
  • Selectable: Checkbox for batch delete
  • Actions: View, Delete
4. Pagination
  • Items per page: 50 (default), 100, 200
  • Page controls: First, Previous, Numbers, Next, Last
  • Total count displayed
  • URL param sync (optional)

5.2.2 Data Loading & Caching

Strategy: React Query with caching

const { data, isLoading, error, refetch } = useQuery({
  queryKey: ['history', page, filters],
  queryFn: () => api.getHistory(page, filters),
  staleTime: 5 * 60 * 1000, // 5 minutes
  cacheTime: 10 * 60 * 1000, // 10 minutes
  keepPreviousData: true, // Smooth pagination
});

Loading States

  • Initial load: Full skeleton loader
  • Pagination: Show previous data + loading spinner
  • Refetch: Subtle loading indicator
  • Empty state: "No calculations yet" message

Error States

  • Network error: Retry button
  • Server error: Contact support message
  • Empty results: "No matches" with clear filters button

5.3 Bulk Upload Page

5.3.1 Complete UI Specification

File: packages/desktop-app/src/components/BulkUploadPage.tsx (695 lines)

Phase 1: Upload (Idle)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Bulk Upload & Processing                    β”‚
β”‚                                              β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ [Download CSV Template]                  β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                              β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚   Drag & Drop Area                       β”‚ β”‚
β”‚ β”‚                                          β”‚ β”‚
β”‚ β”‚  πŸ“ Drag & drop your file here          β”‚ β”‚
β”‚ β”‚     or click to browse                   β”‚ β”‚
β”‚ β”‚                                          β”‚ β”‚
β”‚ β”‚  [Choose File]                           β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                              β”‚
β”‚ Supported: CSV, PDF, Word, Images            β”‚
β”‚                                              β”‚
β”‚ β˜‘ Save to history                           β”‚
β”‚ [Upload & Process] (disabled)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Phase 2: File Selected

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚   Selected File:                         β”‚ β”‚
β”‚ β”‚   πŸ“„ test_bulk_upload.csv                β”‚ β”‚
β”‚ β”‚  Format: CSV β€’ Size: 1.25 KB             β”‚ β”‚
β”‚ β”‚  [Remove File]                           β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                              β”‚
β”‚ β˜‘ Save to history                           β”‚
β”‚ [Upload & Process] (enabled, blue)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Phase 3: Processing

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚   Processing Data...                     β”‚ β”‚
β”‚ β”‚                                          β”‚ β”‚
β”‚ β”‚   πŸ“„ test_bulk_upload.csv                β”‚ β”‚
β”‚ β”‚  CSV β€’ 1.25 KB                           β”‚ β”‚
β”‚ β”‚                                          β”‚ β”‚
β”‚ β”‚  [Spinner Animation]                     β”‚ β”‚
β”‚ β”‚  Extracting and calculating...           β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Phase 4: Results

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Processed File:                          β”‚ β”‚
β”‚ β”‚  πŸ“„ test_bulk_upload.csv                 β”‚ β”‚
β”‚ β”‚ Format: CSV β€’ Size: 1.25 KB              β”‚ β”‚
β”‚ β”‚ Processed: Nov 25, 2025 10:30 AM         β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                              β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚ β”‚Total β”‚ β”‚Successβ”‚ β”‚Failedβ”‚ β”‚  Time    β”‚   β”‚
β”‚ β”‚  10  β”‚ β”‚   9   β”‚ β”‚  1   β”‚ β”‚ 0.12s    β”‚   β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                              β”‚
β”‚ [Upload Another] [Export CSV] [Export JSON]  β”‚
β”‚                                              β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Results Table                            β”‚ β”‚
β”‚ β”‚ Row | Status | Amount | Currency | ...   β”‚ β”‚
β”‚ β”‚  1  β”‚   βœ“    β”‚ 1000   β”‚   INR    β”‚       β”‚ β”‚
β”‚ β”‚  2  β”‚   βœ“    β”‚ 2500   β”‚   USD    β”‚       β”‚ β”‚
β”‚ β”‚  3  β”‚   βœ—    β”‚        β”‚          β”‚ Err   β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5.4 Settings Page

5.4.1 Layout Sections

1. Appearance

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Appearance                        β”‚
β”‚                                   β”‚
β”‚ Theme                             β”‚
β”‚  β—‰ Light  β—‹ Dark  β—‹ System        β”‚
β”‚                                   β”‚
β”‚ [Save Settings]                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Language & Region

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Language & Region                 β”‚
β”‚                                   β”‚
β”‚ Language                          β”‚
β”‚ [English β–Ό]                       β”‚
β”‚   - English                       β”‚
β”‚   - ΰ€Ήΰ€Ώΰ€‚ΰ€¦ΰ₯€ (Hindi)                β”‚
β”‚   - EspaΓ±ol (Spanish)             β”‚
β”‚   - FranΓ§ais (French)             β”‚
β”‚   - Deutsch (German)              β”‚
β”‚                                   β”‚
β”‚ [Save Settings]                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Default Preferences

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Default Preferences               β”‚
β”‚                                   β”‚
β”‚ Default Currency                  β”‚
β”‚ [INR β–Ό]                           β”‚
β”‚                                   β”‚
β”‚ Default Optimization Mode         β”‚
β”‚ [Greedy β–Ό]                        β”‚
β”‚                                   β”‚
β”‚ β˜‘ Auto-save to history            β”‚
β”‚                                   β”‚
β”‚ [Save Settings] [Reset]           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4. Data Management

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Data Management                   β”‚
β”‚                                   β”‚
β”‚ History                           β”‚
β”‚ Total calculations: 1,234         β”‚
β”‚ Database size: 5.2 MB             β”‚
β”‚                                   β”‚
β”‚ [Export All History]              β”‚
β”‚ [Clear All History] (red)         β”‚
β”‚                                   β”‚
β”‚ [Reset All Settings]              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

5.4.2 Confirmation Dialogs

Clear All History?

This will permanently delete all 1,234 calculations from your history. This action cannot be undone.

[Cancel] [Delete All History]

Reset All Settings?

This will restore all settings to their default values:

  • Theme: Light
  • Language: English
  • Currency: INR
  • Mode: Greedy
  • Auto-save: Enabled

Your calculation history will NOT be affected.

[Cancel] [Reset Settings]

5.7 Responsive Design Rules

5.7.1 Breakpoint System

const breakpoints = {
  sm: '640px',   // Mobile landscape, small tablets
  md: '768px',   // Tablets
  lg: '1024px',  // Laptops
  xl: '1280px',  // Desktops
  '2xl': '1536px' // Large desktops
};

5.7.2 Mobile Behavior (< 640px)

MUST:

  • Single column layout
  • Full-width buttons
  • Stacked form fields
  • Collapsible navigation (hamburger menu)
  • Touch-friendly tap targets (min 44px)
  • Simplified tables (responsive cards)

Example Responsive Classes

<!-- Desktop: 3 columns, Mobile: 1 column -->
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">

<!-- Desktop: Row, Mobile: Column -->
<div className="flex flex-col md:flex-row gap-4">

<!-- Hide on mobile -->
<div className="hidden md:block">

<!-- Show only on mobile -->
<div className="block md:hidden">
βœ“ Section Complete

This section covers all UI/UX requirements for Calculator, History, Bulk Upload, and Settings pages including layouts, validation, accessibility, and responsive design.