You are a senior full stack engineer and UI designer. Your task is to build a production-grade web application that replicates the standard Fidelity Taxable Brokerage Account dashboard for a single user account belonging to Paige Renee Spiranac. The application must be an accessible, responsive single-page application in React, styled with Tailwind CSS, and using Recharts for charting. It must be production ready, well organized, and suitable for handoff to a backend team. Deliver the front end as a single React component project with a clear file structure. Provide API contract mocks and JSON sample responses for the backend.---Core Objectives1. Authentication FlowSecure login with mock authentication provider returning JWTs.Secure HttpOnly cookie for session persistence.Include login, forgot password, and profile pages.Role-based access for account owner only.MFA prompt placeholder.No connection to real bank or brokerage APIs, this is a mock demo.2. Account DashboardMirror Fidelity's Taxable Brokerage Account structure, terminology, and data.Sections: account summary, market value, cost basis, unrealized gain/loss, holdings list, top positions, performance chart, projection panel, tax estimates, recent transactions, statements/documents, and settings.3. Sample Portfolio DataAccount holder: Paige Renee SpiranacAccount type: Taxable Brokerage AccountAccount ID: FID-PRSP-0001Objective: Growth, high riskInitial investment: 1,600,000.00 USDStart date: 2021-02-01Maturity date: 2026-02-01Fund: Fidelity Select Semiconductors Portfolio (FSELX)Annualized projected return: 32.9 percent compounded annuallyProjection Table:Year Date Balance (USD)1 2022-02-01 2,126,400.002 2023-02-01 2,825,985.603 2024-02-01 3,755,734.864 2025-02-01 4,991,371.635 2026-02-01 6,633,532.90Final maturity value: 6,633,532.90 USD (highlighted)Total nominal gain: 5,033,532.90 USD4. Dashboard ComponentsHeader: sticky, brand logo placeholder, user name, quick navigation.Left Column: account summary card (exact fields as specified).Center Column:Tab A: Holdings (computed shares, NAV, gain %, reconciliation note).Tab B: Performance & Projections (Recharts time series chart with tooltip, CAGR summary).Right Column:Tax estimate widget (gain × 23.8% = 1,198,000.00 USD approx, with disclaimer).Documents widget (PDF statement placeholders).Recent transactions list (mock entries).5. Security and ComplianceFooter disclaimer: “These are modeled, hypothetical projections and past performance does not guarantee future results.”KYC placeholder modal with masked personal data.No real sensitive data accepted.6. Mock API ContractsExact endpoints and JSON structures for /api/auth/login, /api/account/summary, /api/account/holdings, /api/account/projections, /api/account/taxes?estimate=true as specified above.7. Accessibility and InternationalizationWCAG 2.1 AA compliance.Semantic HTML, ARIA labels, keyboard accessibility, and proper color contrast.8. Tests, Documentation, and DeliveryUnit tests for authentication, projection math, and chart tooltip.README with setup instructions, mock server usage, API substitution guide, and data privacy notice.Integration test verifying projection math matches given numbers.Screenshot of dashboard with maturity value highlighted.9. Visual and UX StyleProfessional fintech style, neutral palette, numeric clarity.Large callout for maturity value with small “32.9 percent annualized” note.Compact holdings tables, full-width charts, mobile-friendly stacked layout.10. Final DeliverySPA React source code.Mock server or JSON file for API.README, tests, screenshot.Inline comments explaining projection formula and constants.
Loading...
Loading...
The code returns the following error:
Failed to initialize v0: Failed to register a ServiceWorker for scope ('https://preview-fidelity-brokerage-clone-kzmgyt06c7qrwzcw224p.vusercontent.net/') with script ('https://preview-fidelity-brokerage-clone-kzmgyt06c7qrwzcw224p.vusercontent.net/__v0_sw.js'): An unknown error occurred when fetching the script.
Revise the code to address the error.
I was previewing: /