Spaces:
Running
Please update the HTML design to include the missing functionality from the original React application. The current design is missing several critical components:
Browse files**MISSING COMPONENTS TO ADD:**
1. **Calculations Estimates Table** - Add a prominent table/section that shows:
- Short-Term Gain/Loss amounts
- Long-Term Gain/Loss amounts
- Final Tax Bill estimate
- Budget Used vs Max Budget
- Number of Sell trades generated
- Real-time calculations as user adjusts settings
2. **Preview Data Panel** - Add an expandable/collapsible section that shows:
- Parsed data from uploaded statements
- Interactive table with columns: Symbol, Quantity, Market Value, Cost Basis, etc.
- "Fix In-App" buttons for missing data
- Data validation indicators (errors/warnings)
3. **Portfolio Settings Panel** - Add a settings section with:
- Individual asset target percentages
- Raise Cash amount input
- Conflict resolution interface
- Asset-specific configuration options
4. **File Upload State Management** - Enhance the upload section to show:
- File validation status (errors/warnings)
- Parsing progress indicator
- Success/error states with detailed feedback
- File name display after upload
5. **Results/Output Section** - Add a results panel that shows:
- Generated trade recommendations
- Download button for Excel export
- Summary statistics
- Trade details table
**LAYOUT REQUIREMENTS:**
- Keep the current two-panel main layout
- Add a third panel or expandable sections for the missing components
- Maintain the fixed bottom action bar
- Ensure responsive design for mobile/tablet
- Keep the VANTA.js background and theme toggle
**INTERACTIVITY NEEDED:**
- Real-time calculation updates when sliders/inputs change
- File drag-and-drop functionality
- Data validation and error handling
- Progressive disclosure (show/hide sections based on user progress)
- Export functionality
**VISUAL CONSISTENCY:**
- Maintain the current blue/gray color scheme
- Use Feather icons throughout
- Keep the clean, modern aesthetic
- Ensure proper dark/light theme support
Please integrate these missing components into the existing design while maintaining the clean, professional look and ensuring all functionality is accessible and user-friendly.
Files changed (2)
- README.md+9-5
- index.html+398-18
12345678910---title: Undefinedemoji: 🌍colorFrom: yellowcolorTo: bluesdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference1234567891011121314---title: undefinedcolorFrom: redcolorTo: pinkemoji: 🐳sdk: staticpinned: falsetags:- deepsite-v3---# Welcome to your new DeepSite project!This project was created with [DeepSite](https://deepsite.hf.co).
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>TaxWizard Pro: Portfolio Alchemist</title><script src="https://cdn.tailwindcss.com"></script><script src="https://unpkg.com/feather-icons"></script><script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script><script>tailwind.config = {darkMode: 'class',theme: {extend: {colors: {primary: {50: '#f0f9ff',100: '#e0f2fe',600: '#2563eb',700: '#1d4ed8',900: '#1e3a8a',}}}}}</script><style>.dropzone {border: 2px dashed #94a3b8;transition: all 0.3s ease;}.dropzone-active {border-color: #3b82f6;background-color: rgba(59, 130, 246, 0.05);}.dark .dropzone-active {background-color: rgba(59, 130, 246, 0.1);}#vanta-bg {position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: -1;opacity: 0.15;}.theme-toggle {transition: all 0.3s ease;}.glow-card {box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);}.dark .glow-card {box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);}</style></head><body class="bg-gray-50 text-gray-800 dark:bg-gray-900 dark:text-gray-100 min-h-screen transition-colors duration-300"><div id="vanta-bg" class="dark:opacity-30"></div><!-- Theme Toggle --><button id="themeToggle" class="fixed top-4 right-4 z-50 p-2 rounded-full bg-white dark:bg-gray-800 shadow-lg theme-toggle"><i data-feather="moon" class="hidden dark:block text-yellow-300"></i><i data-feather="sun" class="dark:hidden text-yellow-500"></i></button><div class="max-w-6xl mx-auto px-4 py-12 relative z-10"><!-- Header --><header class="mb-12 text-center"><div class="flex justify-center items-center mb-4"><div class="bg-primary-100 dark:bg-primary-900 p-3 rounded-full"><i data-feather="dollar-sign" class="text-primary-600 dark:text-primary-400 w-8 h-8"></i></div><span class="ml-2 text-xs font-semibold bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200 px-2 py-1 rounded-full">BETA</span></div><h1 class="text-3xl md:text-4xl font-bold mb-2">Welcome to <span class="text-primary-600 dark:text-primary-400">TaxWizard</span> Pro</h1><p class="text-gray-600 dark:text-gray-400 max-w-2xl mx-auto">Upload your brokerage statement to preview lots and generate tax-efficient trades.</p></header><!-- Main Card --><div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-gray-200 dark:border-gray-700 glow-card"><div class="md:flex"><!-- Left Panel --><div class="md:w-1/2 p-8 md:p-10"><div class="mb-8"><div class="flex items-center mb-4"><div class="bg-primary-100 dark:bg-primary-900 p-2 rounded-full mr-3"><i data-feather="bar-chart-2" class="text-primary-600 dark:text-primary-400 w-5 h-5"></i></div><h2 class="text-xl font-semibold">Tax-Loss Harvesting Optimizer</h2></div><p class="text-gray-600 dark:text-gray-400">Maximize your portfolio's tax efficiency with intelligent harvesting.</p><div class="flex justify-between items-center mt-6 bg-gray-100 dark:bg-gray-700 p-4 rounded-lg"><div class="flex items-center"><div class="bg-primary-100 dark:bg-primary-900 p-2 rounded-full mr-3"><i data-feather="upload" class="text-primary-600 dark:text-primary-400 w-4 h-4"></i></div><span class="font-medium">Upload</span></div><i data-feather="arrow-right" class="text-gray-400 dark:text-gray-500 w-5 h-5 mx-2"></i><div class="flex items-center"><div class="bg-gray-200 dark:bg-gray-600 p-2 rounded-full mr-3"><i data-feather="settings" class="text-gray-500 dark:text-gray-300 w-4 h-4"></i></div><span class="text-gray-500 dark:text-gray-300">Settings</span></div><i data-feather="arrow-right" class="text-gray-400 dark:text-gray-500 w-5 h-5 mx-2"></i><div class="flex items-center"><div class="bg-gray-200 dark:bg-gray-600 p-2 rounded-full mr-3"><i data-feather="dollar-sign" class="text-gray-500 dark:text-gray-300 w-4 h-4"></i></div><span class="text-gray-500 dark:text-gray-300">Harvest</span></div></div></div><!-- Upload Section --><div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer mb-6 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 transition"><i data-feather="upload-cloud" class="w-12 h-12 mx-auto text-gray-400 mb-3"></i><h3 class="text-lg font-medium mb-1">Upload Statement</h3><p class="text-gray-500 dark:text-gray-400 text-sm mb-4">Drag & drop your statement here (PDF, CSV, XLSX)</p><button class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-2 rounded-lg text-sm font-medium transition">Select File</button></div><div class="flex items-start text-sm"><input type="checkbox" id="privacy" class="mt-1 mr-2 bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600"><label for="privacy" class="text-gray-600 dark:text-gray-400">I agree to the <a href="#" class="text-primary-600 dark:text-primary-400 hover:underline">Privacy Notice</a></label></div></div><!-- Right Panel --><div class="md:w-1/2 bg-gray-50 dark:bg-gray-700 p-8 md:p-10 border-t md:border-t-0 md:border-l border-gray-200 dark:border-gray-600"><div class="bg-yellow-100/50 dark:bg-yellow-900/50 border-l-4 border-yellow-400 p-4 mb-6"><div class="flex"><div class="flex-shrink-0"><i data-feather="alert-triangle" class="h-5 w-5 text-yellow-500 dark:text-yellow-400"></i></div><div class="ml-3"><p class="text-sm text-yellow-800 dark:text-yellow-300"><span class="font-semibold">BETA MODE</span> - Currently supports Robinhood and Fidelity style files one account at a time.</p></div></div></div><!-- Calculations Estimates Table --><div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm p-4 mb-6"><h3 class="font-semibold text-lg mb-3 flex items-center"><i data-feather="calculator" class="w-5 h-5 mr-2 text-primary-600 dark:text-primary-400"></i>Tax Impact Estimates</h3><div class="grid grid-cols-2 gap-4 text-sm"><div><p class="text-gray-500 dark:text-gray-400">Short-Term Gain/Loss</p><p class="font-medium" id="shortTermEstimate">$0.00</p></div><div><p class="text-gray-500 dark:text-gray-400">Long-Term Gain/Loss</p><p class="font-medium" id="longTermEstimate">$0.00</p></div><div><p class="text-gray-500 dark:text-gray-400">Tax Bill Estimate</p><p class="font-medium text-red-500" id="taxBillEstimate">$0.00</p></div><div><p class="text-gray-500 dark:text-gray-400">Budget Used</p><p class="font-medium" id="budgetUsed">$0.00 <span class="text-gray-400">of $3,000</span></p></div><div class="col-span-2"><div class="flex justify-between mb-1"><span class="text-sm font-medium">Tax Savings Progress</span><span class="text-sm" id="savingsPercentage">0%</span></div><div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5"><div class="bg-primary-600 h-2.5 rounded-full" id="savingsProgress" style="width: 0%"></div></div></div></div></div><!-- Preview Data Panel --><div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm overflow-hidden mb-6"><div class="flex justify-between items-center p-4 border-b border-gray-200 dark:border-gray-700"><h3 class="font-semibold text-lg flex items-center"><i data-feather="eye" class="w-5 h-5 mr-2 text-primary-600 dark:text-primary-400"></i>Preview Data</h3><button class="text-sm text-primary-600 dark:text-primary-400 hover:underline" id="togglePreview"><i data-feather="chevron-down" class="w-4 h-4"></i></button></div><div class="p-4 hidden" id="previewDataContent"><div class="overflow-x-auto"><table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700"><thead class="bg-gray-50 dark:bg-gray-700"><tr><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Symbol</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Qty</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Market Value</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Cost Basis</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Actions</th></tr></thead><tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="previewDataBody"><!-- Data will be populated here --></tbody></table></div><div class="mt-4 text-center text-gray-500 dark:text-gray-400" id="noPreviewData">No data available. Upload a statement to begin.</div></div></div><!-- Results Panel --><div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm overflow-hidden"><div class="flex justify-between items-center p-4 border-b border-gray-200 dark:border-gray-700"><h3 class="font-semibold text-lg flex items-center"><i data-feather="bar-chart-2" class="w-5 h-5 mr-2 text-primary-600 dark:text-primary-400"></i>Harvest Results</h3><button class="text-sm text-primary-600 dark:text-primary-400 hover:underline" id="toggleResults"><i data-feather="chevron-down" class="w-4 h-4"></i></button></div><div class="p-4 hidden" id="resultsContent"><div class="flex justify-between items-center mb-4"><div><p class="text-sm text-gray-500 dark:text-gray-400">Generated Trades</p><p class="font-medium" id="tradeCount">0 trades</p></div><button class="flex items-center text-sm bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg"><i data-feather="download" class="w-4 h-4 mr-2"></i>Export to Excel</button></div><div class="overflow-x-auto"><table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700"><thead class="bg-gray-50 dark:bg-gray-700"><tr><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Action</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Symbol</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Qty</th><th class="px-4 py-2 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Est. Gain/Loss</th></tr></thead><tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700" id="resultsDataBody"><!-- Results will be populated here --></tbody></table></div><div class="mt-4 text-center text-gray-500 dark:text-gray-400" id="noResultsData">No harvest results available. Run the harvest to generate trades.</div></div></div></div></div></div><!-- Bottom Action Bar --><div class="fixed bottom-0 left-0 w-full bg-white/90 dark:bg-gray-800/90 backdrop-blur-sm border-t border-gray-200 dark:border-gray-700 p-4 z-50"><div class="max-w-6xl mx-auto flex flex-col md:flex-row items-center gap-4"><div class="flex-1 min-w-[150px]"><label class="text-sm text-gray-600 dark:text-gray-400">Max Tax Budget ($)</label><input type="number" id="maxBudget" placeholder="e.g., 3000" class="mt-1 w-full bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 rounded px-3 py-2 dark:text-white"></div><div class="flex items-center gap-2"><label class="text-sm text-gray-600 dark:text-gray-400">Disposition</label><select id="dispositionMethod" class="bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm dark:text-white"><option value="fifo">FIFO</option><option value="lifo">LIFO</option><option value="highest">Highest Cost</option><option value="lowest">Lowest Cost</option></select></div><div class="flex-1"><label class="text-sm text-gray-600 dark:text-gray-400">Long-Term Rate</label><input type="range" id="longTermRate" min="0" max="50" value="15" class="w-full mt-1"><span class="text-primary-600 dark:text-primary-400 text-sm"><span id="longTermRateValue">15</span>%</span></div><div class="flex-1"><label class="text-sm text-gray-600 dark:text-gray-400">Short-Term Rate</label><input type="range" id="shortTermRate" min="0" max="50" value="25" class="w-full mt-1"><span class="text-primary-600 dark:text-primary-400 text-sm"><span id="shortTermRateValue">25</span>%</span></div><div class="flex-1"><label class="text-sm text-gray-600 dark:text-gray-400">Raise Cash ($)</label><input type="number" id="raiseCash" placeholder="0" class="mt-1 w-full bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 rounded px-3 py-2 dark:text-white"></div><button id="runHarvest" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-2 rounded-lg text-sm font-medium transition whitespace-nowrap"><i data-feather="bar-chart-2" class="inline mr-2 w-4 h-4"></i> Run Harvest</button></div></div></div><script>feather.replace();// Initialize Vanta.jsVANTA.GLOBE({el: "#vanta-bg",mouseControls: true,touchControls: true,gyroControls: false,minHeight: 200.00,minWidth: 200.00,scale: 1.00,scaleMobile: 1.00,color: 0x3b82f6,backgroundColor: 0xffffff,size: 0.8});// Theme toggle functionalityconst themeToggle = document.getElementById('themeToggle');const html = document.documentElement;themeToggle.addEventListener('click', () => {html.classList.toggle('dark');localStorage.setItem('theme', html.classList.contains('dark') ? 'dark' : 'light');// Update Vanta.js background for themeif (html.classList.contains('dark')) {VANTA.GLOBE({el: "#vanta-bg",color: 0x3b82f6,backgroundColor: 0x111827});} else {VANTA.GLOBE({el: "#vanta-bg",color: 0x3b82f6,backgroundColor: 0xffffff});}});// Check for saved theme preferenceif (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {html.classList.add('dark');VANTA.GLOBE({el: "#vanta-bg",color: 0x3b82f6,backgroundColor: 0x111827});}// Dropzone functionalityconst dropzone = document.getElementById('dropzone');['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {dropzone.addEventListener(eventName, preventDefaults, false);});function preventDefaults(e) {e.preventDefault();e.stopPropagation();}['dragenter', 'dragover'].forEach(eventName => {dropzone.addEventListener(eventName, highlight, false);});['dragleave', 'drop'].forEach(eventName => {dropzone.addEventListener(eventName, unhighlight, false);});function highlight() {dropzone.classList.add('dropzone-active');}function unhighlight() {dropzone.classList.remove('dropzone-active');}dropzone.addEventListener('drop', handleDrop, false);function handleDrop(e) {const dt = e.dataTransfer;const files = dt.files;handleFiles(files);}function handleFiles(files) {([...files]).forEach(uploadFile);}function uploadFile(file) {console.log('File uploaded:', file.name);// Here you would typically handle the file upload}</script></body></html>