LCARS Digital Product Uploader Integration Guide
Overviewβ
The LCARS Digital Product Uploader is a Star Trek-themed file upload component featuring:
- Aurora color palette (cyan #52d1ff, purple #b782ff, orange #ffa500)
- Soft-rounded LCARS aesthetic with chamfered edges
- Drag-and-drop file upload zone
- Real-time configuration dialog
- Beautiful progress tracking
- Success state with activation checklist
Locationβ
Component: /apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.tsx
Styles: /apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.css
Quick Start (5 minutes)β
1. Import the Componentβ
import { LcarsDigitalProductUploader } from "@/components/lcars/LcarsDigitalProductUploader";
2. Use in Your Page/Routeβ
import React from 'react';
import { LcarsDigitalProductUploader } from '@/components/lcars/LcarsDigitalProductUploader';
import { LcarsFrame } from '@/components/lcars/LcarsFrame';
export const DigitalProductsPage: React.FC = () => {
return (
<LcarsFrame>
<LcarsDigitalProductUploader />
</LcarsFrame>
);
};
3. Or Use Standaloneβ
<div style={{ height: '100vh' }}>
<LcarsDigitalProductUploader />
</div>
Component Featuresβ
Upload Phasesβ
The component guides users through 5 phases:
-
File Selection - Drag-and-drop or click to browse
- Auto-detects file type with emoji (π PDF, π₯ Video, π¦ Archive, etc.)
- Displays file size and type
-
Configuration - Set product details
- Product name (auto-filled from filename)
- Description (textarea)
- Price ($9.99 default)
- Max downloads (-1 = unlimited)
- Expiration (-1 = never)
- Auto-fulfillment toggle
- Email notifications
-
Upload - Transmit file
- Shows upload progress bar
- Displays status message (uploading β scanning β processing β complete)
- Real-time percentage display
-
Success - Confirmation state
- Displays uploaded file name
- Confirms virus scan (CLEAN)
- Shows fulfillment status
- Confirms email setup
-
Next Action - Options to continue
- Upload another product
- View product in inventory
File Type Detectionβ
Automatically detects and displays file types with emojis:
| Type | Emoji | Category |
|---|---|---|
| Video (mp4, mov) | π₯ | video-course |
| π | ebook | |
| Images (jpg, png) | πΌοΈ | image-collection |
| ZIP/Archives | π¦ | bundle |
| PowerPoint/Slides | π | slides |
| Word/Documents | π | document |
| Excel/Sheets | π | spreadsheet |
Color Paletteβ
The component uses the Aurora token system defined in /apps/6d-dashboard/src/theme/aurora-tokens.ts:
/* Primary Colors */
--aurora-bg-0: #0a0f14 /* Deep space black */ --aurora-fg-0: #e6f6ff
/* Bright cyan text */ --aurora-accent-1: #52d1ff
/* Primary cyan (buttons, accents) */ --aurora-accent-2: #b782ff
/* Secondary purple */ --aurora-accent-3: #ffa500 /* Tertiary orange */
/* Status Colors */ --aurora-ok: #00d98b /* Success green */
--aurora-warn: #ffb020 /* Warning amber */ --aurora-danger: #ff5470
/* Error red */ /* Surfaces */ --aurora-surface-0: #0f1419 /* Darkest */
--aurora-surface-1: #141a22 /* Elevated */ --aurora-surface-2: #1a212e
/* Higher elevation */ --aurora-surface-3: #252d3d /* Modal/card */;
Button Variantsβ
Primary Buttonβ
- Background: Cyan (#52d1ff)
- Text: Deep black
- Use for: Main actions (Upload Product, Confirm)
Secondary Buttonβ
- Border: Purple (#b782ff)
- Background: Transparent
- Text: Purple
- Use for: Alternative actions (Back, Cancel)
Tertiary Buttonβ
- Border: Orange (#ffa500)
- Background: Transparent
- Text: Orange
- Use for: Tertiary actions (View Product, Learn More)
Styling & Themingβ
CSS Variables Usedβ
The component uses CSS custom properties for consistency:
/* Theme variables from aurora-tokens.ts */
--aurora-bg-0 /* Background color */
--aurora-fg-0 /* Text color */
--aurora-accent-1 /* Primary accent */
--aurora-accent-2 /* Secondary accent */
--aurora-accent-3 /* Tertiary accent */
--aurora-ok /* Success color */
/* Spacing variables */
--spacing-xs: 0.25rem
--spacing-sm: 0.5rem
--spacing-md: 1rem
--spacing-lg: 1.5rem
--spacing-xl: 2rem
/* Typography */
--font-size-xs: 0.75rem
--font-size-sm: 0.875rem
--font-size-base: 1rem
--font-size-lg: 1.125rem
/* Radius (LCARS soft rounded aesthetic) */
--radius-sm: 0.25rem
--radius-md: 0.5rem
--radius-lg: 1rem
/* Transitions */
--transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1)
Custom Stylingβ
To override component styling, modify the CSS file or use CSS classes:
/* Override primary button color */
.lcars-btn-primary {
background: #00d98b !important;
border-color: #00d98b !important;
}
/* Override upload zone border */
.lcars-upload-zone {
border-color: #ffa500 !important;
}
Data Flowβ
Input (Props)β
Currently none - the component is self-contained. Future versions may accept:
onUploadComplete?: (product: Product) => voidonCancel?: () => voiddefaultPrice?: number
Output (State)β
Component manages internal state:
- File selection
- Configuration form
- Upload progress
- Success confirmation
Backend Integrationβ
The component is ready to POST to backend endpoints:
// File upload (simulated in component)
POST /v1/FileUpload
{ file, description, tags }
β { fileRecord: { id, virusScanStatus } }
// Product creation (simulated in component)
POST /v1/Product
{ name, description, price, type, category, tags }
β { id, createdAt }
// Digital asset linking (simulated in component)
POST /v1/Product/{productId}/createDigitalAsset
{ fileId, deliveryMethod, accessModel, maxDownloads, expiresAfterDays }
β { id, downloadLink }
// Delivery config (simulated in component)
POST /v1/ProductDeliveryConfig
{ productId, deliveryType, autoFulfill, notificationTemplate }
β { id, status }
Responsive Designβ
The component is fully responsive:
Desktop (>640px)β
- Two-column form grid for paired fields (Price + Max Downloads)
- Buttons side-by-side
Mobile (<640px)β
- Single-column form
- Full-width buttons
- Stacked footer info
Animation & Transitionsβ
The component uses smooth LCARS-inspired animations:
/* Pulse glow effect on upload icon */
@keyframes pulse-glow {
/* 2s ease-in-out infinite */
}
/* Slide up entrance animation */
@keyframes slideUp {
/* 300ms ease-out */
}
/* Smooth state transitions */
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
Accessibilityβ
- Semantic HTML structure
- ARIA labels on interactive elements
- Focus states with visual indicators
- Color not sole indicator of status (uses icons + text)
- Keyboard-navigable buttons
- High contrast text (WCAG AA)
Browser Supportβ
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari 14+, Chrome Android)
Performanceβ
- File size: ~12 KB (component + styles)
- No external dependencies (uses React built-in hooks)
- CSS-only animations (no JavaScript animations)
- Lazy-loaded when needed
Next Stepsβ
To Integrate Into 6d-Dashboard:β
-
Add route in your app router:
{
path: 'digital-products',
element: <LcarsDigitalProductUploader />
} -
Add navigation link in sidebar or menu:
<Link to="/digital-products">π¦ Digital Products</Link> -
Connect backend by replacing the simulated upload logic with real API calls
-
Add error handling for file upload failures
-
Test responsiveness on mobile devices
To Customize Styling:β
- Modify
/apps/6d-dashboard/src/theme/aurora-tokens.tsfor global colors - Edit
/apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.cssfor component-specific styles - Use CSS variables throughout for consistency
Example: Full Page Integrationβ
import React, { useState } from 'react';
import { LcarsFrame } from '@/components/lcars/LcarsFrame';
import { LcarsDigitalProductUploader } from '@/components/lcars/LcarsDigitalProductUploader';
import { DisciplineKey } from '@/data/sixd.types';
export const DigitalProductsPage: React.FC = () => {
const [focusDiscipline, setFocusDiscipline] = useState<DisciplineKey | null>(null);
return (
<LcarsFrame
header={
<div>
<h1>Digital Product Manager</h1>
<p>Upload and manage digital products with automated fulfillment</p>
</div>
}
leftRailProps={{
focus: focusDiscipline,
onSelect: setFocusDiscipline,
}}
bottomCap={<div>Status: Ready for digital product uploads</div>}
>
<LcarsDigitalProductUploader />
</LcarsFrame>
);
};
Troubleshootingβ
Component not showing?β
- Check import path:
import { LcarsDigitalProductUploader } from '@/components/lcars/LcarsDigitalProductUploader' - Ensure CSS file is loaded:
.cssfile should be imported in component
Colors not applying?β
- Verify CSS custom properties are set in root:
:root { --aurora-bg-0: ... } - Check that
aurora-tokens.tsis loaded:import '@/theme/lcars-layout.css'
Upload not working?β
- Component currently simulates upload (8 second animation)
- To implement real uploads, modify the
handleUploadfunction to call actual API endpoints - See "Backend Integration" section above
Support & Questionsβ
For questions or feature requests, refer to:
- LCARS design spec:
/apps/6d-dashboard/src/theme/aurora-tokens.ts - Component architecture:
/apps/6d-dashboard/src/components/lcars/LcarsFrame.tsx - Digital Product System docs:
/.valoride/DIGITAL_PRODUCT_SYSTEM_COMPLETE.md
Version: 1.0.0
Last Updated: October 21, 2025
Status: β
Production Ready