- Futuristic Purple UI: Complete redesign with purple/fuchsia theme
- Fullscreen Camera: Immersive scanning experience
- Real Backend API: Pinecone similarity search integrated
- Neural Scan Interface: Animated grid, glowing elements, futuristic HUD
- Centered purple gradient text with glow effects
- Animated background with pulsing gradients
- Glass morphism panels with purple borders
- Futuristic button with tracking and shadow
- "INITIATE SCAN β" call to action
- Fullscreen camera feed takes entire screen
- Animated grid overlay for sci-fi effect
- Glowing purple reticle with corner markers
- Pulsing scan lines during analysis
- Comprehensive results popup with:
- Diagnosis name in large text
- Animated confidence bar
- Color-coded severity
- Medical recommendations
- "New Scan" button
cd dermavisionxr
npm install
# Make sure .env.local has:
# XR_DEV_PORT=4321
# XR_DEV_SERVER=http://localhost:4321/webspatial/avp
# VITE_API_URL=http://localhost:3001
npm run devOpens at: http://localhost:5176
cd ../server
npm install
# Create .env file:
echo "PINECONE_API_KEY=your-key-here" > .env
echo "PINECONE_INDEX_NAME=ham10000-medical" >> .env
echo "PORT=3001" >> .env
# Start the API server
npm run devAPI runs at: http://localhost:3001
- Start API server (Terminal 1):
cd server
npm run dev- Start frontend (Terminal 2):
cd dermavisionxr
npm run dev-
Open http://localhost:5176 in Chrome/Safari
-
Test flow:
- Click "INITIATE SCAN β"
- Grant camera permissions
- Position your hand/skin in the glowing reticle
- Click "βΆ INITIATE SCAN"
- Wait 2-3 seconds for analysis
- View results in the purple popup
The app now calls the real backend:
// In ScanPage.tsx
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3001';
const response = await fetch(`${API_URL}/api/analyze-base64`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ image: capturedImageData })
});{
"diagnosis": "Melanocytic Nevus (Benign)",
"confidence": 92,
"color": "#10b981",
"recommendation": "Common benign mole. Monitor for changes...",
"similarCases": [...],
"metadata": {...}
}| Element | Color | Usage |
|---|---|---|
| Primary | #a855f7 (Purple 500) |
Main accents, borders |
| Secondary | #c084fc (Purple 400) |
Secondary elements |
| Glow | #d946ef (Fuchsia 500) |
Glowing effects |
| Background | #0a0015 β #1a0033 |
Gradient backdrop |
| Text | #e9d5ff (Purple 100) |
Main text |
- β Centered "DERMAVISION" title with animated gradient
- β "SPATIAL DERMATOSCOPIC ANALYSIS" subtitle
- β Three feature cards (Camera, AI, Spatial)
- β Glowing "INITIATE SCAN" button
- β Animated background orbs
- β Fullscreen camera view
- β "NEURAL SCAN" header
- β Animated grid background
- β Glowing 500x500px reticle
- β Corner markers with glow
- β Scanning lines animation
- β "β SYSTEM ONLINE" status indicator
- β
Comprehensive results panel with:
- Large "ANALYSIS COMPLETE" header
- Diagnosis name
- Confidence percentage bar
- Medical assessment box
- Color-coded severity
- "βΆ NEW SCAN" button
Edit dermavisionxr/src/index.css:
--color-primary: #your-color;
--color-glow: #your-glow-color;Edit dermavisionxr/src/components/ScanPage.tsx:
// Change from 500x500 to your preferred size
<div className="w-[500px] h-[500px] relative">Edit dermavisionxr/src/components/ScanPage.tsx:
// The API call is real now, so timing depends on backend
// Mock fallback uses instant response# Check if API is running
curl http://localhost:3001/health
# Should return: {"status":"ok","timestamp":"..."}- Grant camera permissions in browser
- Use HTTPS in production (required for camera API)
- Check browser console for errors
- Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Clear browser cache
- Check index.css loaded correctly
- Verify API server is running
- Check VITE_API_URL in .env.local
- Look for "Using mock data" in results
- First load: ~2-3 seconds (model loading)
- Subsequent scans: ~500ms-1s
- Optimize: Keep API server running
- Production: Use Redis for model caching
- Launch β Purple landing page appears
- Click β "INITIATE SCAN" button
- Camera β Fullscreen view with grid overlay
- Position β Target in glowing reticle
- Scan β Click "βΆ INITIATE SCAN"
- Analyze β Scan lines animate for 2-3s
- Results β Purple popup with diagnosis
- Repeat β Click "βΆ NEW SCAN"
- IMPLEMENTATION.md: Technical details
- FLOW.md: Visual flow diagrams
- XCODE_SETUP.md: visionOS simulator setup
- API_README.md: Backend API documentation
The app now has:
- β Stunning purple futuristic UI
- β Fullscreen camera experience
- β Real backend integration
- β Pinecone similarity search
- β Professional medical interface
- β Smooth animations
- β Comprehensive results display
Open http://localhost:5176 and experience the future of dermatology! π