From 91ac33e9049c13031b8e0eb055d0d74c9842236b Mon Sep 17 00:00:00 2001 From: Ashen <310210685+ashen0x@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:51:24 +0530 Subject: [PATCH] chore: remove unused dashboard code --- ui/app/data.json | 614 ------------- ui/app/providers.tsx | 11 +- ui/components/add-model-form.tsx | 321 ------- ui/components/app-sidebar.tsx | 144 ---- ui/components/chart-area-interactive.tsx | 289 ------- ui/components/collect-models-dialog.tsx | 358 -------- ui/components/cost-calculator-dialog.tsx | 46 - ui/components/cost-calculator.tsx | 230 ----- ui/components/data-table.tsx | 813 ------------------ ui/components/ecash-redeem.tsx | 199 ----- ui/components/landing/api-key-manager.tsx | 255 ------ ui/components/landing/key-info-display.tsx | 198 ----- .../landing/wallet-balance-stats.tsx | 63 -- ui/components/nav-documents.tsx | 86 -- ui/components/nav-main.tsx | 54 -- ui/components/nav-secondary.tsx | 58 -- ui/components/nav-user.tsx | 142 --- ui/components/providers/ProviderBalance.tsx | 172 ---- .../providers/RoutstrProviderCard.tsx | 272 ------ ui/components/providers/SimpleCashuTopup.tsx | 69 -- .../providers/SimpleLightningTopup.tsx | 188 ---- ui/components/section-cards.tsx | 101 --- ui/components/site-header.tsx | 90 -- ui/components/ui/avatar.tsx | 112 --- ui/components/ui/sidebar.tsx | 702 --------------- ui/components/wallet-balance.tsx | 76 -- ui/lib/api/schemas/api-keys.ts | 32 - ui/lib/api/schemas/credits.ts | 82 -- ui/lib/api/schemas/organizations.ts | 28 - ui/lib/api/schemas/providers.ts | 29 - ui/lib/api/schemas/users.ts | 34 - ui/lib/api/services/api-keys.ts | 91 -- ui/lib/api/services/api.ts | 93 -- ui/lib/api/services/users.ts | 60 -- ui/lib/auth/auth-context.tsx | 159 ---- ui/lib/hooks/use-models.ts | 48 -- ui/lib/hooks/use-users.ts | 120 --- ui/package.json | 7 - ui/pnpm-lock.yaml | 135 --- ui/public/file.svg | 1 - ui/public/globe.svg | 1 - ui/public/next.svg | 1 - ui/public/vercel.svg | 1 - ui/public/window.svg | 1 - 44 files changed, 4 insertions(+), 6582 deletions(-) delete mode 100644 ui/app/data.json delete mode 100644 ui/components/add-model-form.tsx delete mode 100644 ui/components/app-sidebar.tsx delete mode 100644 ui/components/chart-area-interactive.tsx delete mode 100644 ui/components/collect-models-dialog.tsx delete mode 100644 ui/components/cost-calculator-dialog.tsx delete mode 100644 ui/components/cost-calculator.tsx delete mode 100644 ui/components/data-table.tsx delete mode 100644 ui/components/ecash-redeem.tsx delete mode 100644 ui/components/landing/api-key-manager.tsx delete mode 100644 ui/components/landing/key-info-display.tsx delete mode 100644 ui/components/landing/wallet-balance-stats.tsx delete mode 100644 ui/components/nav-documents.tsx delete mode 100644 ui/components/nav-main.tsx delete mode 100644 ui/components/nav-secondary.tsx delete mode 100644 ui/components/nav-user.tsx delete mode 100644 ui/components/providers/ProviderBalance.tsx delete mode 100644 ui/components/providers/RoutstrProviderCard.tsx delete mode 100644 ui/components/providers/SimpleCashuTopup.tsx delete mode 100644 ui/components/providers/SimpleLightningTopup.tsx delete mode 100644 ui/components/section-cards.tsx delete mode 100644 ui/components/site-header.tsx delete mode 100644 ui/components/ui/avatar.tsx delete mode 100644 ui/components/ui/sidebar.tsx delete mode 100644 ui/components/wallet-balance.tsx delete mode 100644 ui/lib/api/schemas/api-keys.ts delete mode 100644 ui/lib/api/schemas/credits.ts delete mode 100644 ui/lib/api/schemas/organizations.ts delete mode 100644 ui/lib/api/schemas/providers.ts delete mode 100644 ui/lib/api/schemas/users.ts delete mode 100644 ui/lib/api/services/api-keys.ts delete mode 100644 ui/lib/api/services/api.ts delete mode 100644 ui/lib/api/services/users.ts delete mode 100644 ui/lib/auth/auth-context.tsx delete mode 100644 ui/lib/hooks/use-models.ts delete mode 100644 ui/lib/hooks/use-users.ts delete mode 100644 ui/public/file.svg delete mode 100644 ui/public/globe.svg delete mode 100644 ui/public/next.svg delete mode 100644 ui/public/vercel.svg delete mode 100644 ui/public/window.svg diff --git a/ui/app/data.json b/ui/app/data.json deleted file mode 100644 index ec087364..00000000 --- a/ui/app/data.json +++ /dev/null @@ -1,614 +0,0 @@ -[ - { - "id": 1, - "header": "Cover page", - "type": "Cover page", - "status": "In Process", - "target": "18", - "limit": "5", - "reviewer": "Eddie Lake" - }, - { - "id": 2, - "header": "Table of contents", - "type": "Table of contents", - "status": "Done", - "target": "29", - "limit": "24", - "reviewer": "Eddie Lake" - }, - { - "id": 3, - "header": "Executive summary", - "type": "Narrative", - "status": "Done", - "target": "10", - "limit": "13", - "reviewer": "Eddie Lake" - }, - { - "id": 4, - "header": "Technical approach", - "type": "Narrative", - "status": "Done", - "target": "27", - "limit": "23", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 5, - "header": "Design", - "type": "Narrative", - "status": "In Process", - "target": "2", - "limit": "16", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 6, - "header": "Capabilities", - "type": "Narrative", - "status": "In Process", - "target": "20", - "limit": "8", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 7, - "header": "Integration with existing systems", - "type": "Narrative", - "status": "In Process", - "target": "19", - "limit": "21", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 8, - "header": "Innovation and Advantages", - "type": "Narrative", - "status": "Done", - "target": "25", - "limit": "26", - "reviewer": "Assign reviewer" - }, - { - "id": 9, - "header": "Overview of EMR's Innovative Solutions", - "type": "Technical content", - "status": "Done", - "target": "7", - "limit": "23", - "reviewer": "Assign reviewer" - }, - { - "id": 10, - "header": "Advanced Algorithms and Machine Learning", - "type": "Narrative", - "status": "Done", - "target": "30", - "limit": "28", - "reviewer": "Assign reviewer" - }, - { - "id": 11, - "header": "Adaptive Communication Protocols", - "type": "Narrative", - "status": "Done", - "target": "9", - "limit": "31", - "reviewer": "Assign reviewer" - }, - { - "id": 12, - "header": "Advantages Over Current Technologies", - "type": "Narrative", - "status": "Done", - "target": "12", - "limit": "0", - "reviewer": "Assign reviewer" - }, - { - "id": 13, - "header": "Past Performance", - "type": "Narrative", - "status": "Done", - "target": "22", - "limit": "33", - "reviewer": "Assign reviewer" - }, - { - "id": 14, - "header": "Customer Feedback and Satisfaction Levels", - "type": "Narrative", - "status": "Done", - "target": "15", - "limit": "34", - "reviewer": "Assign reviewer" - }, - { - "id": 15, - "header": "Implementation Challenges and Solutions", - "type": "Narrative", - "status": "Done", - "target": "3", - "limit": "35", - "reviewer": "Assign reviewer" - }, - { - "id": 16, - "header": "Security Measures and Data Protection Policies", - "type": "Narrative", - "status": "In Process", - "target": "6", - "limit": "36", - "reviewer": "Assign reviewer" - }, - { - "id": 17, - "header": "Scalability and Future Proofing", - "type": "Narrative", - "status": "Done", - "target": "4", - "limit": "37", - "reviewer": "Assign reviewer" - }, - { - "id": 18, - "header": "Cost-Benefit Analysis", - "type": "Plain language", - "status": "Done", - "target": "14", - "limit": "38", - "reviewer": "Assign reviewer" - }, - { - "id": 19, - "header": "User Training and Onboarding Experience", - "type": "Narrative", - "status": "Done", - "target": "17", - "limit": "39", - "reviewer": "Assign reviewer" - }, - { - "id": 20, - "header": "Future Development Roadmap", - "type": "Narrative", - "status": "Done", - "target": "11", - "limit": "40", - "reviewer": "Assign reviewer" - }, - { - "id": 21, - "header": "System Architecture Overview", - "type": "Technical content", - "status": "In Process", - "target": "24", - "limit": "18", - "reviewer": "Maya Johnson" - }, - { - "id": 22, - "header": "Risk Management Plan", - "type": "Narrative", - "status": "Done", - "target": "15", - "limit": "22", - "reviewer": "Carlos Rodriguez" - }, - { - "id": 23, - "header": "Compliance Documentation", - "type": "Legal", - "status": "In Process", - "target": "31", - "limit": "27", - "reviewer": "Sarah Chen" - }, - { - "id": 24, - "header": "API Documentation", - "type": "Technical content", - "status": "Done", - "target": "8", - "limit": "12", - "reviewer": "Raj Patel" - }, - { - "id": 25, - "header": "User Interface Mockups", - "type": "Visual", - "status": "In Process", - "target": "19", - "limit": "25", - "reviewer": "Leila Ahmadi" - }, - { - "id": 26, - "header": "Database Schema", - "type": "Technical content", - "status": "Done", - "target": "22", - "limit": "20", - "reviewer": "Thomas Wilson" - }, - { - "id": 27, - "header": "Testing Methodology", - "type": "Technical content", - "status": "In Process", - "target": "17", - "limit": "14", - "reviewer": "Assign reviewer" - }, - { - "id": 28, - "header": "Deployment Strategy", - "type": "Narrative", - "status": "Done", - "target": "26", - "limit": "30", - "reviewer": "Eddie Lake" - }, - { - "id": 29, - "header": "Budget Breakdown", - "type": "Financial", - "status": "In Process", - "target": "13", - "limit": "16", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 30, - "header": "Market Analysis", - "type": "Research", - "status": "Done", - "target": "29", - "limit": "32", - "reviewer": "Sophia Martinez" - }, - { - "id": 31, - "header": "Competitor Comparison", - "type": "Research", - "status": "In Process", - "target": "21", - "limit": "19", - "reviewer": "Assign reviewer" - }, - { - "id": 32, - "header": "Maintenance Plan", - "type": "Technical content", - "status": "Done", - "target": "16", - "limit": "23", - "reviewer": "Alex Thompson" - }, - { - "id": 33, - "header": "User Personas", - "type": "Research", - "status": "In Process", - "target": "27", - "limit": "24", - "reviewer": "Nina Patel" - }, - { - "id": 34, - "header": "Accessibility Compliance", - "type": "Legal", - "status": "Done", - "target": "18", - "limit": "21", - "reviewer": "Assign reviewer" - }, - { - "id": 35, - "header": "Performance Metrics", - "type": "Technical content", - "status": "In Process", - "target": "23", - "limit": "26", - "reviewer": "David Kim" - }, - { - "id": 36, - "header": "Disaster Recovery Plan", - "type": "Technical content", - "status": "Done", - "target": "14", - "limit": "17", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 37, - "header": "Third-party Integrations", - "type": "Technical content", - "status": "In Process", - "target": "25", - "limit": "28", - "reviewer": "Eddie Lake" - }, - { - "id": 38, - "header": "User Feedback Summary", - "type": "Research", - "status": "Done", - "target": "20", - "limit": "15", - "reviewer": "Assign reviewer" - }, - { - "id": 39, - "header": "Localization Strategy", - "type": "Narrative", - "status": "In Process", - "target": "12", - "limit": "19", - "reviewer": "Maria Garcia" - }, - { - "id": 40, - "header": "Mobile Compatibility", - "type": "Technical content", - "status": "Done", - "target": "28", - "limit": "31", - "reviewer": "James Wilson" - }, - { - "id": 41, - "header": "Data Migration Plan", - "type": "Technical content", - "status": "In Process", - "target": "19", - "limit": "22", - "reviewer": "Assign reviewer" - }, - { - "id": 42, - "header": "Quality Assurance Protocols", - "type": "Technical content", - "status": "Done", - "target": "30", - "limit": "33", - "reviewer": "Priya Singh" - }, - { - "id": 43, - "header": "Stakeholder Analysis", - "type": "Research", - "status": "In Process", - "target": "11", - "limit": "14", - "reviewer": "Eddie Lake" - }, - { - "id": 44, - "header": "Environmental Impact Assessment", - "type": "Research", - "status": "Done", - "target": "24", - "limit": "27", - "reviewer": "Assign reviewer" - }, - { - "id": 45, - "header": "Intellectual Property Rights", - "type": "Legal", - "status": "In Process", - "target": "17", - "limit": "20", - "reviewer": "Sarah Johnson" - }, - { - "id": 46, - "header": "Customer Support Framework", - "type": "Narrative", - "status": "Done", - "target": "22", - "limit": "25", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 47, - "header": "Version Control Strategy", - "type": "Technical content", - "status": "In Process", - "target": "15", - "limit": "18", - "reviewer": "Assign reviewer" - }, - { - "id": 48, - "header": "Continuous Integration Pipeline", - "type": "Technical content", - "status": "Done", - "target": "26", - "limit": "29", - "reviewer": "Michael Chen" - }, - { - "id": 49, - "header": "Regulatory Compliance", - "type": "Legal", - "status": "In Process", - "target": "13", - "limit": "16", - "reviewer": "Assign reviewer" - }, - { - "id": 50, - "header": "User Authentication System", - "type": "Technical content", - "status": "Done", - "target": "28", - "limit": "31", - "reviewer": "Eddie Lake" - }, - { - "id": 51, - "header": "Data Analytics Framework", - "type": "Technical content", - "status": "In Process", - "target": "21", - "limit": "24", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 52, - "header": "Cloud Infrastructure", - "type": "Technical content", - "status": "Done", - "target": "16", - "limit": "19", - "reviewer": "Assign reviewer" - }, - { - "id": 53, - "header": "Network Security Measures", - "type": "Technical content", - "status": "In Process", - "target": "29", - "limit": "32", - "reviewer": "Lisa Wong" - }, - { - "id": 54, - "header": "Project Timeline", - "type": "Planning", - "status": "Done", - "target": "14", - "limit": "17", - "reviewer": "Eddie Lake" - }, - { - "id": 55, - "header": "Resource Allocation", - "type": "Planning", - "status": "In Process", - "target": "27", - "limit": "30", - "reviewer": "Assign reviewer" - }, - { - "id": 56, - "header": "Team Structure and Roles", - "type": "Planning", - "status": "Done", - "target": "20", - "limit": "23", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 57, - "header": "Communication Protocols", - "type": "Planning", - "status": "In Process", - "target": "15", - "limit": "18", - "reviewer": "Assign reviewer" - }, - { - "id": 58, - "header": "Success Metrics", - "type": "Planning", - "status": "Done", - "target": "30", - "limit": "33", - "reviewer": "Eddie Lake" - }, - { - "id": 59, - "header": "Internationalization Support", - "type": "Technical content", - "status": "In Process", - "target": "23", - "limit": "26", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 60, - "header": "Backup and Recovery Procedures", - "type": "Technical content", - "status": "Done", - "target": "18", - "limit": "21", - "reviewer": "Assign reviewer" - }, - { - "id": 61, - "header": "Monitoring and Alerting System", - "type": "Technical content", - "status": "In Process", - "target": "25", - "limit": "28", - "reviewer": "Daniel Park" - }, - { - "id": 62, - "header": "Code Review Guidelines", - "type": "Technical content", - "status": "Done", - "target": "12", - "limit": "15", - "reviewer": "Eddie Lake" - }, - { - "id": 63, - "header": "Documentation Standards", - "type": "Technical content", - "status": "In Process", - "target": "27", - "limit": "30", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 64, - "header": "Release Management Process", - "type": "Planning", - "status": "Done", - "target": "22", - "limit": "25", - "reviewer": "Assign reviewer" - }, - { - "id": 65, - "header": "Feature Prioritization Matrix", - "type": "Planning", - "status": "In Process", - "target": "19", - "limit": "22", - "reviewer": "Emma Davis" - }, - { - "id": 66, - "header": "Technical Debt Assessment", - "type": "Technical content", - "status": "Done", - "target": "24", - "limit": "27", - "reviewer": "Eddie Lake" - }, - { - "id": 67, - "header": "Capacity Planning", - "type": "Planning", - "status": "In Process", - "target": "21", - "limit": "24", - "reviewer": "Jamik Tashpulatov" - }, - { - "id": 68, - "header": "Service Level Agreements", - "type": "Legal", - "status": "Done", - "target": "26", - "limit": "29", - "reviewer": "Assign reviewer" - } -] diff --git a/ui/app/providers.tsx b/ui/app/providers.tsx index 3ab0fc06..41a373cf 100644 --- a/ui/app/providers.tsx +++ b/ui/app/providers.tsx @@ -3,7 +3,6 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { useState, type ReactNode } from 'react'; -import { AuthProvider } from '@/lib/auth/auth-context'; import { ProtectedRoute } from '@/lib/auth/protected-route'; import { ThemeProvider } from '@/components/theme-provider'; import { TooltipProvider } from '@/components/ui/tooltip'; @@ -36,12 +35,10 @@ export function Providers({ children }: ProvidersProps) { disableTransitionOnChange > - - - {children} - - - + + {children} + + diff --git a/ui/components/add-model-form.tsx b/ui/components/add-model-form.tsx deleted file mode 100644 index 7a74f693..00000000 --- a/ui/components/add-model-form.tsx +++ /dev/null @@ -1,321 +0,0 @@ -'use client'; - -import React, { useState } from 'react'; -import { useForm } from 'react-hook-form'; -import { zodResolver } from '@hookform/resolvers/zod'; -import { z } from 'zod'; -import { ManualModelSchema, type ManualModel } from '@/lib/api/schemas/models'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Textarea } from '@/components/ui/textarea'; -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, -} from '@/components/ui/dialog'; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from '@/components/ui/select'; -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@/components/ui/form'; -import { Plus, Loader2 } from 'lucide-react'; -import { toast } from 'sonner'; - -interface AddModelFormProps { - onModelAdd: (model: ManualModel) => void; - onCancel?: () => void; - isOpen: boolean; -} - -export function AddModelForm({ - onModelAdd, - onCancel, - isOpen, -}: AddModelFormProps) { - const [isSubmitting, setIsSubmitting] = useState(false); - type ManualModelInput = z.input; - - const form = useForm({ - resolver: zodResolver(ManualModelSchema), - defaultValues: { - name: '', - full_name: '', - input_cost: 0, - output_cost: 0, - provider: '', - modelType: 'text' as const, - description: '', - contextLength: undefined, - }, - }); - - const onSubmit = async (data: ManualModel) => { - setIsSubmitting(true); - try { - await onModelAdd(data); - toast.success('Model added successfully!'); - form.reset(); - onCancel?.(); - } catch (error) { - toast.error('Failed to add model. Please try again.'); - console.error('Error adding model:', error); - } finally { - setIsSubmitting(false); - } - }; - - const handleClose = () => { - if (!isSubmitting) { - form.reset(); - onCancel?.(); - } - }; - - return ( - - - - - - Add New Model - - - Manually add a new AI model to your collection - - -
- -
- ( - - Model Name * - - - - - Display name for the model - - - - )} - /> - - ( - - Provider * - - - - - AI model provider or company - - - - )} - /> -
- -
- ( - - Input Cost (per 1M tokens) * - - { - const value = parseFloat(e.target.value) || 0; - const rounded = Math.round(value * 1000) / 1000; - field.onChange(rounded); - }} - className='w-full' - /> - - - Cost in USD per 1,000,000 input tokens (max 3 decimals) - - - - )} - /> - - ( - - Output Cost (per 1M tokens) * - - { - const value = parseFloat(e.target.value) || 0; - const rounded = Math.round(value * 1000) / 1000; - field.onChange(rounded); - }} - className='w-full' - /> - - - Cost in USD per 1,000,000 output tokens (max 3 decimals) - - - - )} - /> -
- -
- ( - - Model Type - - - Type of AI model functionality - - - - )} - /> - - ( - - Context Length - - { - const val = parseInt(e.target.value); - field.onChange( - isNaN(val) || val === 0 ? undefined : val - ); - }} - className='w-full' - /> - - - Maximum context length in tokens (optional, leave empty - for default) - - - - )} - /> -
- - ( - - Description - -