VettCode Ecosystem - Implementation Plan
Date: February 11, 2026
Workspace Scan Completed: ā
š Current State Analysis
ā Completed Components
1. CLI (VettCode Security Scanner) - PRODUCTION READY
- Status: Fully functional, ready to publish to npm
- Features:
- Multi-sensor orchestration (Semgrep, OSV-Scanner, Gitleaks, Trivy)
- Risk-based prioritization
- Deduplication and normalization
- Beautiful terminal UI
- JSON export functionality
- Location:
C:\Users\USER\Desktop\VETTCODE\CLI\ - Package:
vettcodev1.0.0
2. WEB Dashboard - PARTIALLY COMPLETE
- Status: Authentication + Dashboard shell ready, missing core features
- Completed:
- ā Landing page with ecosystem visualization
- ā Authentication system (NextAuth with Google OAuth + Credentials)
- ā Email verification system
- ā Dashboard layout with sidebar navigation
- ā Sidebar expand/collapse functionality
- ā User profile and session management
- ā Empty state components
- Missing:
- ā Scan upload functionality
- ā Scan history/storage
- ā Finding visualization
- ā AI explanation integration
- ā Project management
- Location:
C:\Users\USER\Desktop\VETTCODE\WEB\ - Tech Stack: Next.js 14, NextAuth, MongoDB, Tailwind CSS
3. VIBE-CLI - EMPTY
- Status: Folder exists, no implementation
- Purpose: AI coding agent for terminal
- Location:
C:\Users\USER\Desktop\VETTCODE\VIBE-CLI\
4. VIBE-CODING (VettCode Vibe) - EMPTY
- Status: Folder exists, no implementation
- Purpose: AI-powered application creation
- Location:
C:\Users\USER\Desktop\VETTCODE\VIBE-CODING\
5. WEB-HOST - EMPTY
- Status: Folder exists, no implementation
- Purpose: Deployment and hosting layer
- Location:
C:\Users\USER\Desktop\VETTCODE\WEB-HOST\
šÆ Priority Implementation Plan
PHASE 1: Complete WEB Dashboard Core (HIGHEST PRIORITY)
Goal: Make the dashboard actually usable for viewing CLI scan results
Rationale: You have a working CLI that generates scan data, but no way to view it in the web dashboard. This is the highest-value connection to make.
1.1 Scan Upload & Storage System
Time Estimate: 4-6 hours
Tasks:
- Create scan upload API endpoint (
/api/scans/upload) - Integrate with existing MongoDB for scan storage
- Create Scan model/schema in
lib/models/Scan.ts - Build upload component with drag-drop + file picker
- Add scan validation (ensure it's valid VettCode JSON format)
- Link scans to authenticated user
- Store scan metadata (timestamp, file count, finding count)
Files to Create:
WEB/lib/models/Scan.ts- Scan database schemaWEB/app/api/scans/upload/route.ts- Upload endpointWEB/components/dashboard/ScanUpload.tsx- Upload UI component
Files to Modify:
WEB/app/dashboard/page.tsx- Add upload area
1.2 Scan History & Listing
Time Estimate: 3-4 hours
Tasks:
- Create
/api/scansGET endpoint to fetch user's scans - Build scan list component showing recent scans
- Add scan metadata display (date, findings count, status)
- Create
/dashboard/scansroute for scan history page - Add pagination for scan history
- Add delete scan functionality
Files to Create:
WEB/app/dashboard/scans/page.tsx- Scan history pageWEB/components/dashboard/ScanList.tsx- List componentWEB/components/dashboard/ScanCard.tsx- Individual scan card
1.3 Scan Detail View & Finding Visualization
Time Estimate: 6-8 hours
Tasks:
- Create
/dashboard/scans/[id]dynamic route - Build finding card component (already exists, may need updates)
- Add severity filtering (Critical, High, Medium, Low)
- Add category filtering (Code, Dependency, Secret)
- Build severity chart visualization
- Add file-based grouping
- Implement finding detail modal
Files to Create:
WEB/app/dashboard/scans/[id]/page.tsx- Scan detail pageWEB/components/dashboard/FindingsList.tsx- Findings displayWEB/components/dashboard/SeverityChart.tsx- Visual chart
Files to Modify:
WEB/components/FindingCard.tsx- Update for dashboard integrationWEB/components/ExplanationModal.tsx- Integrate with dashboard
1.4 AI Explanation Integration
Time Estimate: 4-5 hours
Tasks:
- Connect existing
/api/explainendpoint to dashboard - Add AI explanation button to each finding
- Integrate with existing AI router (OpenRouter/Groq)
- Track usage limits per user plan
- Add explanation loading states
- Cache explanations to avoid duplicate API calls
Files to Modify:
WEB/app/api/explain/route.ts- Ensure it works with new authWEB/components/ExplanationModal.tsx- Update for new design- Add usage tracking to user model
Total Phase 1 Time: ~20-25 hours
PHASE 2: Project Management (MEDIUM PRIORITY)
Goal: Allow users to organize scans by project
Time Estimate: 8-10 hours
Tasks:
- Create Project model/schema
- Build
/dashboard/projectspage - Create project creation flow
- Link scans to projects
- Add project-level security overview
- Build project detail page with scan history
Why Later: Projects are organizational, not functional. Users can use the dashboard without projects, but not without viewing scans.
PHASE 3: Enhanced Features (LOWER PRIORITY)
Goal: Add polish and advanced features
Time Estimate: 15-20 hours
Tasks:
- Export reports (PDF/HTML)
- Trend analysis across scans
- Security score calculation
- Remediation tracking (mark findings as fixed)
- Comparison between scans
- Email notifications for scan results
- API keys for automated uploads
- GitHub/GitLab integration
PHASE 4: VettCode Vibe (AI App Creation) (FUTURE)
Goal: Build the AI-powered application creation tool
Status: Not started. Empty folder.
Decision Needed:
- What exactly is VettCode Vibe?
- Is it a VS Code extension?
- A web-based IDE?
- A CLI tool with AI chat?
Recommendation: Define requirements before building
PHASE 5: Vibe CLI (AI Coding Agent) (FUTURE)
Goal: Terminal-based AI coding assistant
Status: Not started. Empty folder.
Similar to: GitHub Copilot CLI, Cursor AI
Recommendation: Define scope and differentiation from existing tools
PHASE 6: Web Host (Deployment Platform) (FUTURE)
Goal: One-click deployment for VettCode-scanned projects
Status: Not started. Empty folder.
Similar to: Vercel, Netlify, Railway
Recommendation: Significant undertaking. Consider partnering with existing platform first.
š Immediate Next Steps (Start Here)
Step 1: Fix WEB Dashboard Scan Integration ā START HERE
What to build:
- Scan Upload Page Component - Replace empty dashboard with actual upload
- Scan Storage - MongoDB schema for storing scan results
- Scan List - Show user's uploaded scans
- Scan Detail - View findings from a specific scan
Why this first:
- CLI already generates perfect JSON output
- Dashboard already has auth and layout
- This creates immediate value: CLI ā Web workflow
- Everything else builds on this foundation
Step 2: Connect AI Explanations
What to build:
- Link existing
/api/explainto dashboard - Add "Explain" button to each finding
- Use existing AI router (OpenRouter/Groq)
Why second:
- AI explanations are a key differentiator
- API already exists, just needs integration
- Adds educational value immediately
Step 3: Project Organization
What to build:
- Project model and CRUD operations
- Link scans to projects
- Project dashboard page
Why third:
- Helps organize multiple scans
- Better UX for ongoing projects
- Foundation for team features later
š Suggested File Structure (Phase 1)
WEB/
āāā app/
ā āāā dashboard/
ā ā āāā page.tsx # Main dashboard (update with upload)
ā ā āāā scans/
ā ā ā āāā page.tsx # Scan history list
ā ā ā āāā [id]/
ā ā ā āāā page.tsx # Scan detail view
ā ā āāā projects/
ā ā āāā page.tsx # (Phase 2)
ā āāā api/
ā āāā scans/
ā ā āāā route.ts # GET user scans
ā ā āāā upload/
ā ā āāā route.ts # POST new scan
ā āāā explain/
ā āāā route.ts # (already exists)
āāā lib/
ā āāā models/
ā āāā User.ts # (already exists)
ā āāā Scan.ts # NEW - Scan schema
ā āāā Project.ts # (Phase 2)
āāā components/
āāā dashboard/
āāā DashboardLayout.tsx # (already exists)
āāā ScanUpload.tsx # NEW - Upload UI
āāā ScanList.tsx # NEW - List scans
āāā ScanCard.tsx # NEW - Scan card
āāā FindingsList.tsx # NEW - Display findings
āāā SeverityChart.tsx # NEW - Visual chart
āāā ...
šÆ Success Metrics
Phase 1 Complete When:
- ā User can upload CLI scan JSON from dashboard
- ā User can view list of their past scans
- ā User can click into a scan and see all findings
- ā User can click "Explain" on a finding and get AI explanation
- ā User can filter findings by severity/category
- ā Scans are stored in MongoDB with user association
ROI: Complete CLI ā Web workflow. CLI becomes 10x more valuable because results persist and are shareable.
š” Key Technical Decisions
Database Schema Design
Scan Model:
{ userId: ObjectId, // Link to user projectId?: ObjectId, // Optional project link (Phase 2) fileName: string, // Original upload filename scanDate: Date, // When scan was run uploadDate: Date, // When uploaded to web findings: Finding[], // Array of findings from CLI metadata: { totalFindings: number, criticalCount: number, highCount: number, mediumCount: number, lowCount: number, sensors: string[], // Which sensors ran fileCount: number // How many files scanned }, rawData: object // Complete CLI output }
Storage Strategy
Option A: MongoDB Only (RECOMMENDED)
- Store scan JSON directly in MongoDB
- Pros: Simple, no additional services, faster queries
- Cons: Large documents if many findings
- Decision: Start with this. MongoDB handles this fine.
Option B: MongoDB + ImageKit
- Store metadata in MongoDB, full JSON in ImageKit
- Pros: Offload storage, better for huge scans
- Cons: Two services, slower to retrieve
- Decision: Add later if needed
AI Explanation Strategy
Current Setup:
- OpenRouter (primary) - Multiple models including free tier
- Groq (secondary) - Fast inference
- Both already configured in
lib/ai-router.ts
Usage Limits:
- Free plan: 5 explanations/day
- Pro plan: 150/month
- Track in User model:
aiUsage.countandaiUsage.lastReset
š§ Blockers & Dependencies
Current Blockers: NONE ā
- Authentication works
- Database connected
- AI providers configured
- Dashboard shell complete
External Dependencies:
- MongoDB Atlas (already configured)
- OpenRouter API (already configured)
- Groq API (already configured)
š Definition of Done - Phase 1
User Story:
As a developer using VettCode CLI,
I want to upload my scan results to the web dashboard,
So that I can view findings with AI explanations and track security over time.
Acceptance Criteria:
- User can drag-drop or select JSON file to upload
- Upload validates JSON format before storing
- Scan appears in user's scan history immediately
- User can click scan to view all findings
- Findings display severity, category, file, line number
- User can filter/sort findings
- User can click "Explain" to get AI-powered explanation
- AI usage counts against user's plan limits
- Scans persist across sessions
- Multiple scans can be uploaded and compared
š¬ Let's Start Building!
Recommended Starting Point:
- Create Scan Model - Define the database schema
- Build Upload API - Handle scan uploads
- Create Upload Component - UI for uploading
- Test End-to-End - CLI ā Upload ā View
Would you like me to start with Step 1: Create the Scan Model and Upload API?
I can implement:
WEB/lib/models/Scan.ts- Database schemaWEB/app/api/scans/upload/route.ts- Upload endpointWEB/components/dashboard/ScanUpload.tsx- Upload UI
This will establish the foundation for the entire dashboard integration.
What do you want to tackle first?