# Project export: TradeProof

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2026
- Tagline: AI-Native Infrastructure that Reimagines Trade Work for Blue-Collar Careers.
- Devpost: https://devpost.com/software/tradeproof
- GitHub: https://github.com/Yaga-Yoink/tradeproof
- Demo: https://tradeproof-app.vercel.app/
- Video: https://www.youtube.com/embed/087da__L-74?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Result: winner ([Y Combinator] Build an Iconic YC Company with AI (1st Place: Guaranteed YC interview 2nd Place: Guaranteed YC Office Hours 3rd Place: Guaranteed YC Office Hours))
- Team: 3 GitHub contributor(s) — Claude Opus 4.6 (3 commits), Anish Cheraku (2 commits), rmf253 (1 commits)

## Devpost submission (written by the team)

### Overview

What Inspired Us The skilled trades are facing a genuine crisis. While everyone is building AI for xyz and moving industries forward at the speed of light, no one is advancing the infrastructure supporting the backbone of our society, trades work. Presently, there aren't enough people entering the field, and fewer high schoolers are pursuing trades as a career path, and the pipeline is shrinking. The ones who do go through trade school come out underprepared for real job sites, with classroom knowledge that doesn't prepare them for hands-on work. And for the experienced workers, moving between states means starting almost from scratch since licenses don't transfer, records don't follow you, and nobody can tell you exactly what you're missing. We talked to electricians and heard all three of these problems firsthand. TradeProof is built to address them: an all-in-one platform that gets early-career tradespeople up to speed faster, turns their work into portable proof, and makes it easier to hire and be hired based on what you've actually done. What We Learned We also learned that local codes matter enormously. Every electrician we talked to knew the Code Book and the NEC, but the real complexity is in the local amendments layered on top. What passes in one city fails in the one down the street. So we built TradeProof to inject jurisdiction-specific codes directly into every analysis, grounding feedback in the exact rules that apply to where you are working, not generic national standards. Portability came up constantly. People moving to Texas or Arizona want to know exactly what's missing, and right now, there's no good answer for that. So we built the Passport: your skills against another state's requirements, with gaps and course suggestions surfaced instantly. How We Built It TradeProof is a fully working product built on Next.js with Claude handling vision and code analysis. The core flow is: photograph your work → get AI analysis against real NEC codes → recheck after fixes → build a verified portfolio → use it to move states or get hired. Check My Work is the heart of the product. You pick a work type, describe what you did, and submit a photo. TradeProof sends it to Claude with the relevant NEC sections and local amendments injected, including 22 NEC sections scoped by work type, plus jurisdiction-specific amendments. It outputs a structured compliance report: a score, specific violations with exact code sections and fix instructions, and the items you got right. You can submit a before photo, and after fixing something, upload a new photo that tells you exactly what got resolved and what's still open. Every analysis builds your portfolio, tracking compliance scores and eight skill categories over time. Knowledge surfaces expert insight cards tied to what you're actually working on. Trigger keywords from your analysis pull relevant clips, such as an analysis flagging panel work might surface a card on Federal Pacific panels or aluminum wiring. It's learning in context, not a separate course you have to go take. Passport takes your portfolio and runs a live gap analysis against another state's licensing requirements. Moving from California to Texas? You see exactly which certifications you're missing, which hour requirements you haven't hit, and what courses could close the gap, giving you real cost in terms of time and pricing. Marketplace is where the portfolio becomes leveraged. Employers see a credential view with your TradeProof compliance stats, skill scores, and trend alongside a traditional resume. Workers swipe on jobs, employers swipe on workers, and matches are grounded in verified proof, not self-reported experience. Challenges We Faced Tailored feedback. Generic AI analysis isn't good enough for a working electrician. The feedback needs to match the exact codes they're held to on the job. Getting there meant building a RAG system over the Code Book so that every analysis is grounded in the specific NEC sections and local amendments that actually apply, not a broad guess at what might be relevant. That was the foundation on which everything else was built. Getting a fully functional electrician training sim running on a standalone VR headset was one of the hardest parts of this project. We built over 60 C# scripts that generate every 3D object from scratch at runtime, including a graph-based circuit simulator that actually tracks how electricity flows through wires, breakers, and outlets, so the VR training behaves like a real electrical system. Coordinating hand tracking, tool interactions, and physics-based snapping across seven different training tasks - each with its own scoring, NEC code validation, and step-by-step logic meant debugging issues we couldn't Google, since most VR projects don't procedurally generate entire electrical panels with functioning circuit breakers. Also, the Meta Quest 2 only has a mobile chip with limited memory, so getting all of this to compile and run smoothly on-device without any pre-built assets or prefabs required constant optimization and was a serious engineering challenge. Customer Interviews and Product Feedback We interviewed over 8 customers in the span of 24 hours. We were able to get 3 paying customers at 50$ pricepoint with following core feedback points: Validation that the problem space is “untapped” potential (eg. electricians do not have software to support their day to day work BUT would love to have/are willing to adopt) The TAM and target demographic for our problem space is huge, through talking with customers we learned that trade schools, educators, individual business owners and even homeowners would be possible paying customers The problem is bigger than we expected, experienced blue collar workers are retiring and 1) no one to train future workforce 2) young people are discouraged by a lack of infrastructure and job clarity resulting in less tradespeople. The time is now to build the end to end infrastructure to solve these 2 core problems that are growing daily. Our product was later recommended to Douglas Hansen, writer of the famous book (Code Check) which is referenced by every electrician. We spoke with Douglas and learned that this space has had no innovation for decades. A product like ours, if proven reliable, would be revolutionary for the work he does that reaches thousands daily.

## README (from the GitHub repository)

# TradeProof

AI-powered code compliance and training platform for electricians. Photograph your work for instant NEC code analysis, or train in VR with hands-on electrical tasks.

Built at [TreeHacks 2026](https://www.treehacks.com/) at Stanford University.

## Overview

TradeProof has two components:

- **Web App** — Upload photos of electrical work, get AI-powered compliance analysis against NEC codes and California amendments, track skill progression over time, and build a shareable credential portfolio.
- **VR App** — Immersive "Day in the Life of an Electrician" training on Meta Quest 2. Seven hands-on tasks from outlet installation to circuit troubleshooting, with an AI mentor, career progression, and NEC code validation.

## Web App

A Next.js application that uses Claude AI to analyze photos of electrical work against building codes.

### Features

- **Photo Analysis** — Upload a photo, select work type, get structured compliance results with exact NEC code citations, severity ratings, and fix instructions
- **Before/After Re-check** — Fix a violation, upload the corrected photo, see side-by-side comparison with resolved/unresolved status
- **Dashboard** — Portfolio tracking with compliance trend charts, skill progress bars, and analysis history
- **Knowledge Base** — Expert insight cards from experienced electricians
- **Credential Passport** — Cross-state license gap analysis (CA, TX, AZ) and shareable employer-facing credential page

### Tech Stack

- Next.js 16 (App Router) + TypeScript + Tailwind CSS
- Claude Sonnet 4.5 via `@anthropic-ai/sdk`
- shadcn/ui + Recharts + Lucide icons
- localStorage for data persistence

### Setup

```bash
npm install
```

Create `.env.local`:

```
ANTHROPIC_API_KEY=your_key_here
```

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).

## VR App

A Unity project targeting Meta Quest 2 with 7 electrician training tasks, procedural environments, and career progression.

### Training Tasks

| Task | Difficulty | Steps | Description |
|------|-----------|-------|-------------|
| Panel Inspection | Beginner | 5 violations | Identify NEC code violations in an electrical panel |
| Circuit Wiring | Beginner | 6 steps | Wire a circuit from breaker to outlet with proper connections |
| Outlet Installation | Beginner | 9 steps | Strip romex, connect hot/neutral/ground, mount and cover |
| 3-Way Switch Wiring | Intermediate | 7 steps | Wire two 3-way switches to control a light fixture |
| GFCI Testing | Intermediate | 7 steps | Test, diagnose, and replace faulty GFCI outlets |
| EMT Conduit Bending | Intermediate | 8 steps | Measure, bend, and ream EMT conduit to spec |
| Circuit Troubleshooting | Advanced | 10 steps | Diagnose a dead outlet using multimeter and voltage tester |

### Features

- **Three Training Modes** — Learn (guided walkthrough), Practice (hints available), Test (timed, no help)
- **Day-in-the-Life Mode** — Start your day, accept work orders, drive to job sites, complete tasks, earn XP
- **AI Mentor** — Progressive hint system that adapts to your skill level
- **Career Progression** — Apprentice → Journeyman → Master with XP, badges, and certifications
- **17 NEC Codes** — Real electrical code validation (310.16, 408.4, 250.50, 210.8, etc.)
- **Procedural Environments** — Workshop hub, residential job sites, all built from code (no prefabs)
- **Circuit Simulator** — Graph-based energy propagation for realistic electrical behavior
- **Daily Challenges** — Date-seeded challenges with bonus XP rewards

### Tech Stack

- Unity 6000.0.67f1 (Unity 6 LTS)
- Meta XR SDK 68.0.3 (`com.meta.xr.sdk.core`)
- C# with all assets built procedurally via `GameObject.CreatePrimitive()`
- Target: Quest 2, Android API 29+, IL2CPP, ARM64

### Building

Open `tradeproof-vr/` in Unity Hub. Build for Android (Quest 2) via:

**Unity Menu** → TradeProof → Configure Quest 2 Settings, then TradeProof → Build Quest 2 APK

Or from command line:

```bash
/Applications/Unity/Hub/Editor/6000.0.67f1/Unity.app/Contents/MacOS/Unity \
  -batchmode -nographics \
  -projectPath tradeproof-vr \
  -executeMethod Quest2BuildScript.BuildAPK \
  -quit
```

## Project Structure

```
├── app/                    # Next.js pages (8 screens + 2 API routes)
├── components/             # React components (11 custom + shadcn/ui)
├── lib/                    # AI engine, NEC codes, storage
├── data/                   # Demo data and knowledge clips
├── public/                 # Static assets
└── tradeproof-vr/          # Unity VR project
    ├── Assets/
    │   ├── Scripts/
    │   │   ├── AI/         # Mentor, hints, adaptive difficulty, NPC
    │   │   ├── Core/       # GameManager, TaskManager, DayManager, etc.
    │   │   ├── Data/       # Task definitions, player progress, NEC codes
    │   │   ├── Electrical/ # Panel, breakers, outlets, switches, conduit, etc.
    │   │   ├── Environment/# Procedural rooms, hub workshop, workbench
    │   │   ├── Interaction/# Hand tracking, grab system, tools
    │   │   ├── Training/   # 7 training tasks + trackers
    │   │   └── UI/         # HUD, menus, career progress, mentor dialogue
    │   ├── Resources/
    │   │   ├── NECCodes/   # NEC code database (JSON)
    │   │   └── TaskDefinitions/ # Task step definitions (JSON)
    │   └── Scenes/
    └── Packages/
```

## Team

Built by Anish Cheraku, Hayden Azan, and Ryan Fujii at TreeHacks 2026.

## License

MIT


## Detected evidence (automated analysis)

Indexed codebase: 710 recognized source files, 6376 KB.
- Anthropic (technology) — detected in the code
- C# (language) — detected in the code
- CSS (language) — detected in the code
- Next.js (technology) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- JavaScript (language) — claimed on Devpost, not found in the code
- Supabase (technology) — claimed on Devpost, not found in the code
- Vercel (technology) — claimed on Devpost, not found in the code
- AI coding agent: Claude Code — evidence: config files committed to the repository; commit authorship or trailers
- AI coding agent: Cursor — evidence: config files committed to the repository

## Codebase structure (from repository index)

### Files (120 of 2692)

```
.claude/settings.local.json
.cursor/worktrees.json
.gitignore
app/analyze/page.tsx
app/api/analyze/route.ts
app/api/recheck/route.ts
app/credential/[userId]/page.tsx
app/dashboard/page.tsx
app/globals.css
app/knowledge/page.tsx
app/layout.tsx
app/marketplace/dashboard/page.tsx
app/marketplace/jobs/[id]/page.tsx
app/marketplace/jobs/new/page.tsx
app/marketplace/jobs/page.tsx
app/marketplace/messages/[jobId]/page.tsx
app/marketplace/page.tsx
app/marketplace/swipe/page.tsx
app/marketplace/workers/[id]/page.tsx
app/marketplace/workers/page.tsx
app/page.tsx
app/passport/page.tsx
app/results/[id]/page.tsx
components.json
components/AnalysisCard.tsx
components/AnalysisResults.tsx
components/BeforeAfter.tsx
components/BottomNav.tsx
components/CameraCapture.tsx
components/ComplianceTrend.tsx
components/CredentialCard.tsx
components/GapAnalysis.tsx
components/KnowledgeCard.tsx
components/LearnPostCard.tsx
components/SkillRadar.tsx
components/SwipeStack.tsx
components/ui/badge.tsx
components/ui/button.tsx
components/ui/card.tsx
components/ui/dialog.tsx
components/ui/input.tsx
components/ui/progress.tsx
components/ui/tabs.tsx
components/ViolationOverlay.tsx
components/WorkTypeSelector.tsx
data/demo-data.ts
data/knowledge-clips.ts
data/marketplace-demo.ts
eslint.config.mjs
lib/claude.ts
lib/codes/california.ts
lib/codes/nec.ts
lib/codes/state-requirements.ts
lib/marketplace-storage.ts
lib/prompts/analyze.ts
lib/prompts/before-after.ts
lib/prompts/recheck.ts
lib/storage.ts
lib/utils.ts
next.config.ts
package.json
postcss.config.mjs
PROJECT_STATUS.md
README.md
tradeproof-vr/Assets/DefaultVolumeProfile.asset
tradeproof-vr/Assets/DefaultVolumeProfile.asset.meta
tradeproof-vr/Assets/Editor.meta
tradeproof-vr/Assets/Editor/Quest2BuildScript.cs
tradeproof-vr/Assets/Editor/Quest2BuildScript.cs.meta
tradeproof-vr/Assets/Editor/VRSceneSetup.cs
tradeproof-vr/Assets/Editor/VRSceneSetup.cs.meta
tradeproof-vr/Assets/Oculus.meta
tradeproof-vr/Assets/Oculus/OculusProjectConfig.asset
tradeproof-vr/Assets/Oculus/OculusProjectConfig.asset.meta
tradeproof-vr/Assets/Plugins.meta
tradeproof-vr/Assets/Plugins/Android.meta
tradeproof-vr/Assets/Resources.meta
tradeproof-vr/Assets/Resources/ImmersiveDebuggerSettings.asset
tradeproof-vr/Assets/Resources/ImmersiveDebuggerSettings.asset.meta
tradeproof-vr/Assets/Resources/NECCodes.meta
tradeproof-vr/Assets/Resources/NECCodes/nec_codes.json
tradeproof-vr/Assets/Resources/NECCodes/nec_codes.json.meta
tradeproof-vr/Assets/Resources/OculusRuntimeSettings.asset
tradeproof-vr/Assets/Resources/OculusRuntimeSettings.asset.meta
tradeproof-vr/Assets/Resources/OVRBuildConfig.asset
tradeproof-vr/Assets/Resources/OVRBuildConfig.asset.meta
tradeproof-vr/Assets/Resources/OVRPlatformToolSettings.asset
tradeproof-vr/Assets/Resources/OVRPlatformToolSettings.asset.meta
tradeproof-vr/Assets/Resources/TaskDefinitions.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/CircuitWiring.json
tradeproof-vr/Assets/Resources/TaskDefinitions/CircuitWiring.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/ConduitBending.json
tradeproof-vr/Assets/Resources/TaskDefinitions/ConduitBending.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/GFCITesting.json
tradeproof-vr/Assets/Resources/TaskDefinitions/GFCITesting.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/OutletInstallation.json
tradeproof-vr/Assets/Resources/TaskDefinitions/OutletInstallation.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/PanelInspection.json
tradeproof-vr/Assets/Resources/TaskDefinitions/PanelInspection.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/SwitchWiring.json
tradeproof-vr/Assets/Resources/TaskDefinitions/SwitchWiring.json.meta
tradeproof-vr/Assets/Resources/TaskDefinitions/Troubleshooting.json
tradeproof-vr/Assets/Resources/TaskDefinitions/Troubleshooting.json.meta
tradeproof-vr/Assets/Scenes.meta
tradeproof-vr/Assets/Scenes/TrainingScene.unity
tradeproof-vr/Assets/Scenes/TrainingScene.unity.meta
tradeproof-vr/Assets/Scripts.meta
tradeproof-vr/Assets/Scripts/AI.meta
tradeproof-vr/Assets/Scripts/AI/AdaptiveDifficulty.cs
tradeproof-vr/Assets/Scripts/AI/AdaptiveDifficulty.cs.meta
tradeproof-vr/Assets/Scripts/AI/AIMentorController.cs
tradeproof-vr/Assets/Scripts/AI/AIMentorController.cs.meta
tradeproof-vr/Assets/Scripts/AI/CustomerNPC.cs
tradeproof-vr/Assets/Scripts/AI/CustomerNPC.cs.meta
tradeproof-vr/Assets/Scripts/AI/MentorHintDatabase.cs
tradeproof-vr/Assets/Scripts/AI/MentorHintDatabase.cs.meta
tradeproof-vr/Assets/Scripts/Core.meta
tradeproof-vr/Assets/Scripts/Core/AudioManager.cs
tradeproof-vr/Assets/Scripts/Core/AudioManager.cs.meta
tradeproof-vr/Assets/Scripts/Core/BadgeSystem.cs
[2572 more files omitted for size]
```

### Dependencies

- package.json: @anthropic-ai/sdk@^0.74.0, @tailwindcss/postcss@^4, @types/node@^20, @types/react@^19, @types/react-dom@^19, @types/uuid@^10.0.0, class-variance-authority@^0.7.1, clsx@^2.1.1, eslint@^9, eslint-config-next@16.1.6, lucide-react@^0.564.0, next@16.1.6, radix-ui@^1.4.3, react@19.2.3, react-dom@19.2.3, recharts@^3.7.0, shadcn@^3.8.4, tailwind-merge@^3.4.0, tailwindcss@^4, tw-animate-css@^1.4.0, typescript@^5, uuid@^13.0.0

### Recent commits (newest first)

- update gitignore
- Update README with full project description
- Add full "Day in the Life of an Electrician" VR expansion
- Add before/after photo comparison with violation overlay markers
- improved ui for matching
- add before and after images input
- added matching
- updated ui for learn page
- simplified marketplace
- Add Quest 3 VR training platform: panel inspection + circuit wiring
- Add marketplace: job posting, worker profiles, auto-matching, messaging
- Initial commit: TradeProof - AI-powered electrical code compliance app
- Initial commit from Create Next App

## Key source files (fetched from GitHub, selected and truncated for size)

### PROJECT_STATUS.md

```markdown
# TradeProof — Project Status & Full Context

> Last updated: Feb 14, 2026. For new Claude Code sessions starting from scratch.

## What Is TradeProof

AI-powered code compliance tool for skilled trades (starting with electricians). A tradesperson photographs their work, AI analyzes it against jurisdiction-specific building codes (NEC + California amendments), identifies violations with exact code citations, tells them how to fix it, and verifies the fix. Every analysis builds a competency portfolio.

## Project Location

```
/Users/kumar/Documents/research/treehacks/tradeproof-app/
```

## Tech Stack

- **Framework:** Next.js 16 (App Router, Turbopack)
- **Language:** TypeScript (strict mode)
- **Styling:** Tailwind CSS + shadcn/ui
- **Charts:** recharts
- **Icons:** lucide-react
- **AI:** Claude Sonnet 4.5 via @anthropic-ai/sdk
- **Data:** localStorage (no database, no auth — hackathon demo)
- **IDs:** uuid
- **Path alias:** `@/*` maps to project root

## Current State: FULLY BUILT & TESTED

`npx next build` passes with zero errors. All 8 screens functional. AI analysis pipeline tested end-to-end. Dev server runs on `http://localhost:3000`.

## Environment

`.env.local` contains:
```
ANTHROPIC_API_KEY=sk-ant-api03-... (already set, DO NOT commit)
```
That's the only key needed. No Supabase, no OpenAI.

---

## File Structure (every source file)

### Pages (8 screens + 2 API routes)

| File | Route | Type | Description |
|------|-------|------|-------------|
| `app/page.tsx` | `/` | Client | Landing page. "Check My Work" CTA. Auto-loads demo data on first visit via `loadDemoDataFromSeed()`. |
| `app/analyze/page.tsx` | `/analyze` | Client | 4-step guided flow: select work type → describe work → take photo → submit. POSTs to `/api/analyze`, saves result to localStorage, redirects to `/results/[id]`. |
| `app/results/[id]/page.tsx` | `/results/:id` | Client (dynamic) | Analysis results. Shows compliance score, violation cards, correct items, knowledge clips. "I've Fixed It" triggers re-check: upload fixed photo → POST `/api/recheck` → show BeforeAfter component. |
| `app/dashboard/page.tsx` | `/dashboard` | Client | Portfolio. Stats row (count, avg score, trend), SkillRadar progress bars, ComplianceTrend line chart, recent analyses list linking to `/results/[id]`. |
| `app/knowledge/page.tsx` | `/knowledge` | Client | 5 expert insight cards with task-type filter tabs. |
| `app/passport/page.tsx` | `/passport` | Client | Cross-state gap analysis. Current state CA, target TX or AZ. Shows requirements breakdown with course suggestions, path comparison. |
| `app/credential/[userId]/page.tsx` | `/credential/:userId` | Client (dynamic) | Employer-facing credential. Resume vs TradeProof side-by-side, CredentialCard with stats, share link with copy button. |
| `app/layout.tsx` | (root) | Server | Root layout. Metadata "TradeProof". Includes BottomNav component. `pb-20` padding for fixed nav. |
| `app/api/analyze/route.ts` | `POST /api/analyze` | Server | 
[truncated — 10721 more characters]
```

### tradeproof-vr/Packages/com.meta.xr.sdk.core/LICENSE.md

```markdown
﻿Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.

Licensed under the Oculus SDK License Agreement (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.

You may obtain a copy of the License at

https://developer.oculus.com/licenses/oculussdk/

Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

```

### package.json

```
{
  "name": "tradeproof-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "@anthropic-ai/sdk": "^0.74.0",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.564.0",
    "next": "16.1.6",
    "radix-ui": "^1.4.3",
    "react": "19.2.3",
    "react-dom": "19.2.3",
    "recharts": "^3.7.0",
    "tailwind-merge": "^3.4.0",
    "uuid": "^13.0.0"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "@types/uuid": "^10.0.0",
    "eslint": "^9",
    "eslint-config-next": "16.1.6",
    "shadcn": "^3.8.4",
    "tailwindcss": "^4",
    "tw-animate-css": "^1.4.0",
    "typescript": "^5"
  }
}

```

### tradeproof-vr/Packages/com.meta.xr.sdk.core/package.json

```
{
  "name": "com.meta.xr.sdk.core",
  "displayName": "Meta XR Core SDK",
  "version": "68.0.3",
  "description": "Meta XR Core SDK package provides the latest features to create immersive experiences for Meta XR devices.",
  "samples": [
    {
      "displayName": "Sample Scenes",
      "description": "Simple samples demonstrating core VR features",
      "path": "Samples~/Scenes"
    },
    {
      "displayName": "Mixed Reality Sample",
      "description": "A basic sample demonstrating core MR features Scene and Passthrough",
      "path": "Samples~/MixedReality"
    }
  ],
  "unity": "2021.3",
  "unityRelease": "26f1",
  "author": {
    "name": "Meta Platforms, Inc.",
    "url": "https://developer.oculus.com/"
  },
  "licensesUrl": "https://developer.oculus.com/licenses/oculussdk",
  "licenseMessage": "By adding or using this package you agree to the terms and conditions of the Meta Platforms Technologies SDK License Agreement: https://developer.oculus.com/licenses/oculussdk",
  "keywords": [
    "Oculus",
    "Meta",
    "Quest",
    "Utilities",
    "SDK",
    "XR"
  ],
  "documentationUrl": "https://developer.oculus.com/documentation/unity/",
  "changelogUrl": "https://developer.oculus.com/downloads/package/meta-xr-core-sdk/"
}
```

### app/layout.tsx

```typescript
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import BottomNav from "@/components/BottomNav";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "TradeProof",
  description:
    "AI-Powered Code Compliance for Skilled Trades. Photograph your work, get instant code analysis, and build your verified portfolio.",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased bg-slate-50`}
      >
        <div className="pb-20 min-h-screen">{children}</div>
        <BottomNav />
      </body>
    </html>
  );
}

```

### app/page.tsx

```typescript
"use client";

import { useEffect } from "react";
import Link from "next/link";
import { Card, CardContent } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import {
  Camera,
  Shield,
  TrendingUp,
  Globe,
  MapPin,
  ArrowRight,
  Zap,
} from "lucide-react";
import { isDemoLoaded, loadDemoDataFromSeed } from "@/lib/storage";
import {
  DEMO_PROFILE,
  DEMO_ANALYSES,
  DEMO_SKILL_SCORES,
} from "@/data/demo-data";

const features = [
  {
    icon: Zap,
    title: "Instant Analysis",
    description:
      "Snap a photo of your work and get AI-powered code compliance analysis in seconds.",
    color: "text-yellow-500",
    bg: "bg-yellow-50",
  },
  {
    icon: TrendingUp,
    title: "Build Your Portfolio",
    description:
      "Track your skill growth over time with verified, data-backed analyses.",
    color: "text-green-500",
    bg: "bg-green-50",
  },
  {
    icon: Globe,
    title: "Cross-State Passport",
    description:
      "See how your skills map to requirements in any state. Move your career anywhere.",
    color: "text-blue-500",
    bg: "bg-blue-50",
  },
];

export default function Home() {
  useEffect(() => {
    if (!isDemoLoaded()) {
      loadDemoDataFromSeed(DEMO_PROFILE, DEMO_ANALYSES, DEMO_SKILL_SCORES);
    }
  }, []);

  return (
    <div className="min-h-screen bg-white">
      <div className="max-w-lg mx-auto px-4 pt-6 pb-8">
        {/* Location Chip */}
        <div className="flex justify-center mb-6">
          <Badge className="bg-slate-100 text-slate-600 text-xs gap-1 px-3 py-1">
            <MapPin className="w-3 h-3" />
            San Jose, CA
          </Badge>
        </div>

        {/* Hero Section */}
        <div className="text-center mb-8">
          <div className="flex items-center justify-center gap-2 mb-4">
            <Shield className="w-8 h-8 text-blue-600" />
            <h1 className="text-2xl font-bold text-slate-900">TradeProof</h1>
          </div>
          <p className="text-lg font-semibold text-slate-800 mb-2">
            AI-Powered Code Compliance for Skilled Trades
          </p>
          <p className="text-sm text-slate-500 leading-relaxed max-w-xs mx-auto">
            Photograph your work. Get instant code analysis. Build your verified
            portfolio.
          </p>
        </div>

        {/* CTA Button */}
        <div className="mb-10">
          <Link href="/analyze">
            <Button className="w-full h-14 text-lg bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white rounded-xl flex items-center justify-center gap-3 shadow-lg shadow-blue-200">
              <Camera className="w-6 h-6" />
              Check My Work
              <ArrowRight className="w-5 h-5" />
            </Button>
          </Link>
        </div>

        {/* Feature Cards */}
        <div className="space-y-3">
          {features.map((feature) => {
            const Icon = feature.icon;
            return (
              <Card key={feature.title} className="border-slate-200">
                <CardContent className="flex items-start gap-4 pt-5 pb-5">
                  <div
                    className={`${feature.bg} p-2.5 rounded-xl shrink-0`}
                  >
                    <Icon className={`w-5 h-5 ${feature.color}`} />
                  </div>
                  <div>
                    <h3 className="text-sm font-semibold text-slate-800 mb-1">
                      {feature.title}
                    </h3>
                    <p className="text-xs text-slate-500 leading-relaxed">
                      {feature.description}
                    </p>
                  </div>
                </CardContent>
              </Card>
            );
          })}
        </div>
      </div>
    </div>
  );
}

```

### app/knowledge/page.tsx

```typescript
"use client";

import { useState, useMemo } from "react";
import { Badge } from "@/components/ui/badge";
import { Input } from "@/components/ui/input";
import LearnPostCard from "@/components/LearnPostCard";
import { BookOpen, Shield, Search } from "lucide-react";
import { KNOWLEDGE_CLIPS } from "@/data/knowledge-clips";

const taskTypes = [
  { id: "all", label: "All" },
  { id: "panel", label: "Panel" },
  { id: "outlet", label: "Outlet" },
  { id: "junction_box", label: "Junction Box" },
  { id: "general", label: "General" },
];

function searchMatches(clip: (typeof KNOWLEDGE_CLIPS)[0], query: string): boolean {
  if (!query.trim()) return true;
  const q = query.toLowerCase().trim();
  const searchable = [
    clip.title,
    clip.content,
    clip.expertName,
    ...clip.triggerKeywords,
  ].join(" ");
  return searchable.toLowerCase().includes(q);
}

export default function KnowledgePage() {
  const [activeFilter, setActiveFilter] = useState("all");
  const [searchQuery, setSearchQuery] = useState("");

  const filteredClips = useMemo(() => {
    let list = KNOWLEDGE_CLIPS;
    if (activeFilter !== "all") {
      list = list.filter((clip) => clip.taskType === activeFilter);
    }
    if (searchQuery.trim()) {
      list = list.filter((clip) => searchMatches(clip, searchQuery));
    }
    return [...list].sort(
      (a, b) =>
        new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime()
    );
  }, [activeFilter, searchQuery]);

  return (
    <div className="min-h-screen bg-slate-50">
      <div className="max-w-lg mx-auto px-4 pt-6 pb-24">
        {/* Header */}
        <div className="flex items-center justify-between mb-4">
          <div className="flex items-center gap-2">
            <BookOpen className="w-5 h-5 text-blue-600" />
            <h1 className="text-xl font-bold text-slate-900">Learn</h1>
          </div>
          <div className="flex items-center gap-1.5">
            <Shield className="w-5 h-5 text-blue-600" />
            <span className="text-sm font-semibold text-blue-600">
              TradeProof
            </span>
          </div>
        </div>

        <p className="text-sm text-slate-500 mb-4">
          Real-world knowledge from experienced electricians. Tips, stories, and
          how-tos — search and filter by topic.
        </p>

        {/* Search */}
        <div className="relative mb-4">
          <Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
          <Input
            type="search"
            placeholder="Search tips, panels, GFCI, wiring..."
            value={searchQuery}
            onChange={(e) => setSearchQuery(e.target.value)}
            className="pl-9 bg-white border-slate-200"
          />
        </div>

        {/* Category filters */}
        <div className="flex gap-2 overflow-x-auto pb-2 mb-6 no-scrollbar">
          {taskTypes.map((type) => (
            <button
              key={type.id}
              onClick={() => setActiveFilter(type.id)}
              className="shrink-0"
            >
              <Badge
                className={
                  activeFilter === type.id
                    ? "bg-blue-600 text-white text-xs px-3 py-1 cursor-pointer"
                    : "bg-slate-100 text-slate-600 text-xs px-3 py-1 cursor-pointer hover:bg-slate-200"
                }
              >
                {type.label}
              </Badge>
            </button>
          ))}
        </div>

        {/* Feed — newest first, mixed card styles */}
        <div className="space-y-5">
          {filteredClips.length > 0 ? (
            filteredClips.map((clip) => (
              <LearnPostCard key={clip.id} clip={clip} />
            ))
          ) : (
            <div className="text-center py-12">
              <Search className="w-10 h-10 text-slate-300 mx-auto mb-3" />
              <p className="text-sm text-slate-500">
                {searchQuery.trim()
                  ? "No posts match your search. Try another term or category."
                  : "No posts in this category yet."}
              </p>
            </div>
          )}
        </div>
      </div>
    </div>
  );
}

```

### app/marketplace/page.tsx

```typescript
"use client";

import { useEffect } from "react";
import Link from "next/link";
import { Card, CardContent } from "@/components/ui/card";
import { Briefcase, Users, Shield, Store, ChevronRight, Heart } from "lucide-react";
import {
  isMarketplaceDemoLoaded,
  loadMarketplaceDemoData,
} from "@/lib/marketplace-storage";
import {
  DEMO_WORKERS,
  DEMO_HOMEOWNERS,
  DEMO_JOBS,
  DEMO_MESSAGES,
} from "@/data/marketplace-demo";

export default function MarketplacePage() {
  useEffect(() => {
    if (!isMarketplaceDemoLoaded()) {
      loadMarketplaceDemoData(
        DEMO_WORKERS,
        DEMO_HOMEOWNERS,
        DEMO_JOBS,
        DEMO_MESSAGES
      );
    }
  }, []);

  return (
    <div className="min-h-screen bg-slate-50 pb-24">
      <div className="max-w-lg mx-auto px-4 pt-8">
        {/* Header */}
        <div className="text-center mb-8">
          <div className="inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-blue-100 mb-4">
            <Store className="w-7 h-7 text-blue-600" />
          </div>
          <h1 className="text-2xl font-bold text-slate-900">
            TradeProof Marketplace
          </h1>
          <p className="text-slate-500 mt-2 text-sm max-w-xs mx-auto">
            Find your next job or hire electricians with verified compliance
            scores.
          </p>
        </div>

        {/* Swipe to Match */}
        <Link href="/marketplace/swipe" className="block group mb-6">
          <Card className="hover:shadow-lg transition-all cursor-pointer border-2 border-rose-200 bg-gradient-to-br from-rose-50 to-white hover:border-rose-300">
            <CardContent className="flex items-center gap-4 py-5">
              <div className="flex-shrink-0 w-12 h-12 rounded-xl bg-rose-500 flex items-center justify-center group-hover:bg-rose-600 transition-colors">
                <Heart className="w-6 h-6 text-white" />
              </div>
              <div className="flex-1 min-w-0">
                <h2 className="font-semibold text-slate-900 text-lg">
                  Swipe to Match
                </h2>
                <p className="text-slate-500 text-sm mt-0.5">
                  Workers swipe on jobs · Employers swipe on candidates
                </p>
              </div>
              <ChevronRight className="w-5 h-5 text-slate-300 group-hover:text-rose-500 flex-shrink-0 transition-colors" />
            </CardContent>
          </Card>
        </Link>

        {/* Browse Jobs & Browse Workers */}
        <div className="space-y-4 mb-8">
          <Link href="/marketplace/jobs" className="block group">
            <Card className="hover:shadow-md transition-all cursor-pointer border-amber-200/80 bg-white hover:border-amber-300">
              <CardContent className="flex items-center gap-4 py-5">
                <div className="flex-shrink-0 w-12 h-12 rounded-xl bg-amber-500 flex items-center justify-center group-hover:bg-amber-600 transition-colors">
                  <Briefcase className="w-6 h-6 text-white" />
                </div>
                <div className="flex-1 min-w-0">
                  <h2 className="font-semibold text-slate-900 text-lg">
                    Browse Jobs
                  </h2>
                  <p className="text-slate-500 text-sm mt-0.5">
                    Open positions — apply with your compliance score
                  </p>
                </div>
                <ChevronRight className="w-5 h-5 text-slate-300 group-hover:text-amber-600 flex-shrink-0 transition-colors" />
              </CardContent>
            </Card>
          </Link>

          <Link href="/marketplace/workers" className="block group">
            <Card className="hover:shadow-md transition-all cursor-pointer border-blue-200/80 bg-white hover:border-blue-300">
              <CardContent className="flex items-center gap-4 py-5">
                <div className="flex-shrink-0 w-12 h-12 rounded-xl bg-blue-600 flex items-center justify-center group-hover:bg-blue-700 transition-colors">
                  <Users className="w-6 h-6 text-white" />
                </div>
                <div className="flex-1 min-w-0">
                  <h2 className="font-semibold text-slate-900 text-lg">
                    Browse Workers
                  </h2>
                  <p className="text-slate-500 text-sm mt-0.5">
                    Verified electricians — see skills and compliance history
                  </p>
                </div>
                <ChevronRight className="w-5 h-5 text-slate-300 group-hover:text-blue-600 flex-shrink-0 transition-colors" />
              </CardContent>
            </Card>
          </Link>
        </div>

        {/* Trust Banner */}
        <Card className="bg-slate-900 text-white border-0 shadow-lg">
          <CardContent className="flex items-start gap-3 py-4">
            <Shield className="w-8 h-8 text-blue-400 flex-shrink-0 mt-0.5" />
            <div>
              <h3 className="font-semibold text-sm">
                Compliance-Verified Workers
              </h3>
              <p className="text-slate-300 text-xs mt-1 leading-relaxed">
                Every worker has a real-time compliance score from AI-verified
                field work. No fake reviews — code-checked proof of quality.
              </p>
            </div>
          </CardContent>
        </Card>

        {/* Footer links */}
        <div className="mt-8 flex flex-col items-center gap-2 text-center">
          <Link
            href="/marketplace/dashboard"
            className="text-slate-500 text-sm hover:text-slate-800 font-medium transition-colors"
          >
            My jobs & messages
          </Link>
          <Link
            href="/marketplace/jobs/new"
            className="text-slate-400 text-xs hover:text-slate-600 transition-colors"
          >
            Post a job
          </Link>
        </div>
      </div>
    </div>
  );
}

```

### app/passport/page.tsx

```typescript
"use client";

import { useState, useEffect, useMemo } from "react";
import Link from "next/link";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import GapAnalysis from "@/components/GapAnalysis";
import {
  Globe,
  Shield,
  MapPin,
  ArrowLeft,
  Loader2,
} from "lucide-react";
import { getSkillScores, getProfile } from "@/lib/storage";
import type { SkillScore, UserProfile } from "@/lib/storage";
import {
  getGapAnalysis,
  STATE_REQUIREMENTS,
} from "@/lib/codes/state-requirements";

const TARGET_STATES = ["Texas", "Arizona"];

export default function PassportPage() {
  const [profile, setProfile] = useState<UserProfile | null>(null);
  const [skillScores, setSkillScores] = useState<SkillScore[]>([]);
  const [targetState, setTargetState] = useState("Texas");
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    setProfile(getProfile());
    setSkillScores(getSkillScores());
    setLoading(false);
  }, []);

  // Derive user skills from skill scores
  const userSkills = useMemo(
    () => skillScores.map((s) => s.skillName),
    [skillScores]
  );

  // Compute gap analysis
  const gapResult = useMemo(
    () => getGapAnalysis(userSkills, targetState),
    [userSkills, targetState]
  );

  // Map gap results to the GapAnalysis component format
  const mappedGaps = gapResult.gaps.map((g) => ({
    requirement: g.requirement,
    status: g.status === "satisfied" ? "satisfied" as const : g.status === "gap" ? "gap" as const : "partial" as const,
    details: g.details,
    courseSuggestion: g.courseSuggestion,
    coursePrice: g.coursePrice,
    courseHours: g.courseHours ? parseInt(g.courseHours) : undefined,
  }));

  if (loading) {
    return (
      <div className="min-h-screen flex items-center justify-center">
        <Loader2 className="w-8 h-8 animate-spin text-blue-600" />
      </div>
    );
  }

  const currentState = profile?.primaryJurisdiction || "California";
  const currentReqs = STATE_REQUIREMENTS[currentState];
  const targetReqs = STATE_REQUIREMENTS[targetState];

  return (
    <div className="min-h-screen bg-slate-50">
      <div className="max-w-lg mx-auto px-4 pt-4 pb-8">
        {/* Header */}
        <div className="flex items-center justify-between mb-6">
          <Link
            href="/dashboard"
            className="flex items-center gap-1 text-slate-500 hover:text-slate-700 transition-colors"
          >
            <ArrowLeft className="w-4 h-4" />
            <span className="text-sm">Back</span>
          </Link>
          <div className="flex items-center gap-1.5">
            <Globe className="w-5 h-5 text-blue-600" />
            <span className="text-sm font-semibold text-slate-800">
              Skills Passport
            </span>
          </div>
          <Shield className="w-5 h-5 text-blue-600" />
        </div>

        {/* Current State */}
        <Card className="mb-4">
          <CardContent className="pt-5 pb-5">
            <div className="flex items-center gap-2 mb-2">
              <MapPin className="w-4 h-4 text-green-600" />
              <span className="text-sm font-semibold text-slate-700">
                Current State
              </span>
            </div>
            <div className="flex items-center gap-3">
              <Badge className="bg-green-100 text-green-800 text-sm px-3 py-1">
                {currentState}
              </Badge>
              {currentReqs && (
                <span className="text-xs text-slate-500">
                  {currentReqs.adoptedCode}
                </span>
              )}
            </div>
          </CardContent>
        </Card>

        {/* Target State Selector */}
        <div className="mb-6">
          <p className="text-sm font-medium text-slate-700 mb-3">
            Where do you want to work?
          </p>
          <div className="flex gap-3">
            {TARGET_STATES.map((state) => (
              <Button
                key={state}
                variant={targetState === state ? "default" : "outline"}
                onClick={() => setTargetState(state)}
                className={`flex-1 h-12 rounded-xl ${
                  targetState === state
                    ? "bg-blue-600 text-white hover:bg-blue-700"
                    : "border-slate-300 text-slate-600"
                }`}
              >
                <MapPin className="w-4 h-4 mr-1.5" />
                {state}
              </Button>
            ))}
          </div>
        </div>

        {/* Target State Info */}
        {targetReqs && (
          <Card className="mb-6">
            <CardHeader>
              <CardTitle className="text-base flex items-center gap-2">
                <Globe className="w-4 h-4 text-blue-600" />
                {targetState} Requirements
              </CardTitle>
            </CardHeader>
            <CardContent>
              <div className="space-y-3 text-sm text-slate-600">
                <div>
                  <span className="font-medium text-slate-700">Code: </span>
                  {targetReqs.adoptedCode}
                </div>
                <div>
                  <span className="font-medium text-slate-700">
                    Required Hours:{" "}
                  </span>
                  {targetReqs.requiredHours.toLocaleString()}
                </div>
                <div>
                  <span className="font-medium text-slate-700">CE: </span>
                  {targetReqs.continuingEducation}
                </div>
                <div>
                  <span className="font-medium text-slate-700">
                    Reciprocity:{" "}
                  </span>
                  {targetReqs.reciprocity.join(", ")}
                </div>
                <div>
                  <span className="font-medium text-slate-700">
                    Certifications:{" "}
                  </span>
     
[truncated — 918 more characters]
```

### app/dashboard/page.tsx

```typescript
"use client";

import { useState, useEffect } from "react";
import Link from "next/link";
import { Card, CardContent } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import SkillRadar from "@/components/SkillRadar";
import ComplianceTrend from "@/components/ComplianceTrend";
import {
  Shield,
  TrendingUp,
  TrendingDown,
  Minus,
  CheckCircle,
  AlertTriangle,
  ArrowRight,
  BarChart3,
} from "lucide-react";
import {
  getProfile,
  getAnalyses,
  getSkillScores,
  isDemoLoaded,
  loadDemoDataFromSeed,
} from "@/lib/storage";
import type { Analysis, SkillScore, UserProfile } from "@/lib/storage";
import {
  DEMO_PROFILE,
  DEMO_ANALYSES,
  DEMO_SKILL_SCORES,
} from "@/data/demo-data";

export default function DashboardPage() {
  const [profile, setProfile] = useState<UserProfile | null>(null);
  const [analyses, setAnalyses] = useState<Analysis[]>([]);
  const [skillScores, setSkillScores] = useState<SkillScore[]>([]);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    if (!isDemoLoaded()) {
      loadDemoDataFromSeed(DEMO_PROFILE, DEMO_ANALYSES, DEMO_SKILL_SCORES);
    }
    let analysesList = getAnalyses();
    // If any demo analysis still has a photo (old seed with images), re-seed to use current seed (no demo images)
    const hasOldDemoWithImages = analysesList.some(
      (a) => a.id.startsWith("demo-") && a.photoUrl?.trim()
    );
    if (hasOldDemoWithImages) {
      loadDemoDataFromSeed(DEMO_PROFILE, DEMO_ANALYSES, DEMO_SKILL_SCORES);
      analysesList = getAnalyses();
    }
    setProfile(getProfile());
    setAnalyses(analysesList);
    setSkillScores(getSkillScores());
    setLoading(false);
  }, []);

  if (loading) {
    return (
      <div className="min-h-screen flex items-center justify-center">
        <div className="animate-pulse text-slate-400">Loading...</div>
      </div>
    );
  }

  const totalAnalyses = analyses.length;
  const avgScore =
    totalAnalyses > 0
      ? Math.round(
          analyses.reduce((sum, a) => sum + a.complianceScore, 0) /
            totalAnalyses
        )
      : 0;

  // Calculate trend from last 5 vs first 5
  let trend: "up" | "stable" | "down" = "stable";
  if (analyses.length >= 4) {
    const recentAvg =
      analyses
        .slice(0, Math.min(3, analyses.length))
        .reduce((sum, a) => sum + a.complianceScore, 0) /
      Math.min(3, analyses.length);
    const oldAvg =
      analyses
        .slice(-Math.min(3, analyses.length))
        .reduce((sum, a) => sum + a.complianceScore, 0) /
      Math.min(3, analyses.length);
    if (recentAvg - oldAvg > 5) trend = "up";
    else if (oldAvg - recentAvg > 5) trend = "down";
  }

  const trendIcon =
    trend === "up"
      ? TrendingUp
      : trend === "down"
      ? TrendingDown
      : Minus;
  const TrendIcon = trendIcon;
  const trendColor =
    trend === "up"
      ? "text-green-600"
      : trend === "down"
      ? "text-red-600"
      : "text-slate-400";
  const trendLabel =
    trend === "up" ? "Improving" : trend === "down" ? "Declining" : "Stable";

  // Map skill scores for SkillRadar component format
  const mappedSkills = skillScores.map((s) => ({
    skillName: s.skillName,
    score: s.score,
    totalInstances: s.totalInstances,
    trend: (s.trend === "improving"
      ? "up"
      : s.trend === "declining"
      ? "down"
      : "stable") as "up" | "stable" | "down",
  }));

  // Map analyses for ComplianceTrend
  const trendData = [...analyses]
    .sort(
      (a, b) =>
        new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()
    )
    .map((a) => ({
      date: a.createdAt,
      score: a.complianceScore,
    }));

  // Recent analyses (last 5)
  const recentAnalyses = analyses.slice(0, 5);

  return (
    <div className="min-h-screen bg-slate-50">
      <div className="max-w-lg mx-auto px-4 pt-6 pb-8">
        {/* Header */}
        <div className="flex items-center justify-between mb-6">
          <div>
            <h1 className="text-xl font-bold text-slate-900">Your Portfolio</h1>
            {profile && (
              <p className="text-sm text-slate-500">{profile.fullName}</p>
            )}
          </div>
          <div className="flex items-center gap-1.5">
            <Shield className="w-5 h-5 text-blue-600" />
            <span className="text-sm font-semibold text-blue-600">
              TradeProof
            </span>
          </div>
        </div>

        {/* Stats Row */}
        <div className="grid grid-cols-3 gap-3 mb-6">
          <Card>
            <CardContent className="pt-4 pb-4 text-center">
              <p className="text-2xl font-bold text-slate-800">
                {totalAnalyses}
              </p>
              <p className="text-xs text-slate-500">Analyses</p>
            </CardContent>
          </Card>
          <Card>
            <CardContent className="pt-4 pb-4 text-center">
              <p
                className={`text-2xl font-bold ${
                  avgScore >= 80
                    ? "text-green-600"
                    : avgScore >= 60
                    ? "text-yellow-600"
                    : "text-red-600"
                }`}
              >
                {avgScore}%
              </p>
              <p className="text-xs text-slate-500">Avg Score</p>
            </CardContent>
          </Card>
          <Card>
            <CardContent className="pt-4 pb-4 text-center">
              <div className="flex items-center justify-center gap-1">
                <TrendIcon className={`w-5 h-5 ${trendColor}`} />
              </div>
              <p className="text-xs text-slate-500 mt-1">{trendLabel}</p>
            </CardContent>
          </Card>
        </div>

        {/* Skill Radar */}
        <div className="mb-6">
          <SkillRadar skills={mappedSkills} />
        </div>

        {/* Compliance Trend */}
        <div className="mb-6">
          <ComplianceTrend analyses={trendData} />
        </div>

        {/* Recen
[truncated — 3621 more characters]
```

[684 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]