π¦ MIGRATION PLAN: Digital Downloads to Main Web App
π― Objectiveβ
Move the LCARS Digital Product Upload UX from apps/6d-dashboard to the main web app under the LCARS dashboard.
π COMPONENTS TO MIGRATEβ
1. Component Sourceβ
- File:
apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.tsx - Size: 456 lines
- Type: React FC
2. Styles Sourceβ
- File:
apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.css - Size: 579 lines
- Type: PostCSS
3. Route Sourceβ
- File:
apps/6d-dashboard/src/app/routes/digital-products/index.tsx - Type: Page component using LcarsFrame
π DESTINATION STRUCTUREβ
Main Web App Pathsβ
web/typescript/valkyr_labs_com/
βββ src/
β βββ components/
β β βββ digital/ β NEW
β β βββ DigitalProductUploader.tsx β Migrated
β β βββ DigitalProductUploader.css β Migrated styles
β βββ routes/ β Depends on routing setup
β β βββ digital-products/
β β βββ index.tsx β New page route
β βββ views/ β Alternative if using views
β βββ DigitalProductsPage.tsx
π MIGRATION STEPSβ
Step 1: Copy Componentsβ
# Copy component
cp apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.tsx \
web/typescript/valkyr_labs_com/src/components/digital/DigitalProductUploader.tsx
# Copy styles
cp apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.css \
web/typescript/valkyr_labs_com/src/components/digital/DigitalProductUploader.css
Step 2: Create Index Exportβ
File: web/typescript/valkyr_labs_com/src/components/digital/index.ts
export { DigitalProductUploader } from "./DigitalProductUploader";
Step 3: Update Import Pathsβ
In the migrated component:
- Change:
import '@/theme/lcars-layout.css'; - To:
import '@/styles/lcars-layout.css';(or wherever Aurora theme lives)
Step 4: Create Page Componentβ
File: web/typescript/valkyr_labs_com/src/routes/DigitalProductsPage.tsx
import React from "react";
import { DigitalProductUploader } from "@/components/digital";
import { LcarsFrame } from "@/components/lcars";
export const DigitalProductsPage: React.FC = () => {
return (
<LcarsFrame>
<DigitalProductUploader />
</LcarsFrame>
);
};
Step 5: Register Routeβ
Update main router (likely src/App.tsx or src/router.ts):
{
path: '/digital-products',
element: <DigitalProductsPage />,
label: 'π¦ Digital Products'
}
Step 6: Add to LCARS Launcherβ
If using LcarsFrame with launcher:
const launcherItems = [
// ... existing items
{
icon: "π¦",
label: "Digital Products",
badge: "NEW",
action: () => navigate("/digital-products"),
},
];
π§ ADJUSTMENTS NEEDEDβ
Dependency Updatesβ
- Verify Aurora CSS variables are available
- Check if
LcarsFramecomponent exists in web app - Ensure all imports resolve correctly
CSS Variables to Checkβ
The component uses:
--aurora-bg-0
--aurora-fg-0
--aurora-accent-1
--aurora-accent-2
--aurora-surface-1
--aurora-border-dim
--aurora-muted
--font-sans
--spacing-*
--radius-*
--transition-*
Ensure these are defined in the web app's theme/CSS variables.
API Integrationβ
Current component simulates uploads. To connect real APIs:
- Find
handleUpload()function in component - Replace simulation logic with actual API calls
- Wire to backend upload endpoint
π CHECKLISTβ
- Create
/web/typescript/valkyr_labs_com/src/components/digital/directory - Copy
LcarsDigitalProductUploader.tsx - Copy
LcarsDigitalProductUploader.css - Rename component to
DigitalProductUploader - Update import paths in component
- Create
index.tsexport file - Create page component in routes
- Register route in main router
- Add launcher item to LCARS sidebar
- Test component rendering
- Verify CSS styling
- Test drag-and-drop functionality
- Connect API endpoints (optional)
- Add navigation back/forward between pages
π§ͺ TESTINGβ
Visual Testingβ
- Navigate to
/digital-products - Verify LCARS styling loads
- Test drag-and-drop zone
- Verify file preview
- Test form inputs
- Check upload progress animation
- Verify success state
Functional Testingβ
- Drag file to upload zone
- Fill in product details
- Click "Upload Product"
- Verify progress animation
- Click "Upload Another"
- Verify reset works
π DEPENDENCIESβ
Component requires:
- React 18+
- Aurora CSS theme/variables
- LcarsFrame component (if using)
- Modern browser (File API, Drag & Drop)
No external packages - component is standalone.
π― OPTIONAL ENHANCEMENTSβ
Once migrated, consider:
- Real API Integration - Connect to backend upload service
- Image Previews - Show thumbnail for image files
- Batch Uploads - Allow multiple files
- Download History - Show uploaded products list
- Analytics - Track upload metrics
- Notifications - Toast notifications on success/error
π REFERENCESβ
- Source 6D Dashboard:
apps/6d-dashboard/src/components/lcars/LcarsDigitalProductUploader.tsx - Source Page:
apps/6d-dashboard/src/app/routes/digital-products/index.tsx - Target Web App:
web/typescript/valkyr_labs_com/src/
Status: π’ READY TO MIGRATE
Complexity: β‘ LOW - Standalone component, minimal dependencies
Estimated Time: 15-20 minutes