Skip to content

Commit 02db459

Browse files
authored
feat: Complete component migration to feature-based architecture (Phase 5: Search & Leaderboard) (#95)
1 parent 0392611 commit 02db459

File tree

113 files changed

+743
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+743
-422
lines changed

.cursor/rules/general-cursor-project-rule.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Minimal dependencies Avoid over-engineering for a 1-person team
2424
Clear documentation Write code that's easy to understand and modify later. Add single-line comments to explain major code sections
2525
Gradual scaling Start simple, optimize later when needed
2626
Feel free to provide additional feedback, guidance if you see issues with the current design or code.
27-
27+
**Output**: `PHASE1_ANALYSIS.md` with comprehensive system understanding
2828

2929

3030

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Minimal dependencies Avoid over-engineering for a 1-person team
1919
Clear documentation Write code that's easy to understand and modify later. Add single-line comments to explain major code sections
2020
Gradual scaling Start simple, optimize later when needed
2121
Feel free to provide additional feedback, guidance if you see issues with the current design or code.
22-
22+
If you are unable to fix and error or problem after two attempts, stop to give me (user) a recap of the problem, your tactical attempts to fix it and potential systemic issues.
2323

2424

2525

PHASE1_ANALYSIS.md

Lines changed: 0 additions & 209 deletions
This file was deleted.

app/about/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { TrendingUp, Brain, Target, BarChart3, Zap, Shield, Users, Globe } from "lucide-react"
2-
import { CTASection } from "@/components/cta-section"
1+
import { TrendingUp, Brain, BarChart3, Zap } from "lucide-react"
32
import AiVsHumanAccuracyChart from "@/components/ai-vs-human-accuracy-chart"
43

54
export default function AboutPage() {
@@ -77,7 +76,7 @@ export default function AboutPage() {
7776
<span className="text-3xl sm:text-4xl font-bold">improved in accuracy or performance</span>
7877
</h2>
7978
<p className="text-muted-foreground text-lg max-w-2xl mx-auto">
80-
<a href="https://hai.stanford.edu/ai-index/2025-ai-index-report" className="hover:underline">Leading AI models are close to beating our most difficult benchmarks. The world needs better, infinitely difficult benchmarks, to properly measure the AI model's intelligence growth beyond super intelligence.</a>
79+
<a href="https://hai.stanford.edu/ai-index/2025-ai-index-report" className="hover:underline">Leading AI models are close to beating our most difficult benchmarks. The world needs better, infinitely difficult benchmarks, to properly measure the AI model&apos;s intelligence growth beyond super intelligence.</a>
8180
</p>
8281
</div>
8382
<div className="max-w-5xl mx-auto rounded-lg border bg-card p-6 shadow-sm">

app/activity/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client"
22

3-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
4-
import { Badge } from "@/components/ui/badge"
5-
import { Button } from "@/components/ui/button"
3+
import { Card, CardContent, CardHeader, CardTitle } from "@/shared/ui/card"
4+
import { Badge } from "@/shared/ui/badge"
5+
import { Button } from "@/shared/ui/button"
66
import { ArrowLeft, Brain, DollarSign, Calendar } from "lucide-react"
77
import Link from "next/link"
88

app/api/experiments/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { NextRequest, NextResponse } from 'next/server'
1+
import { NextResponse } from 'next/server'
22
import { prisma } from '@/lib/db/prisma'
33

4-
export async function GET(request: NextRequest) {
4+
export async function GET() {
55
try {
66
// Get experiment summary with accuracy metrics
77
const experiments = await prisma.prediction.findMany({

app/credits/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use client'
22

3-
import { Button } from "@/components/ui/button"
4-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
5-
import { Badge } from "@/components/ui/badge"
6-
import { Separator } from "@/components/ui/separator"
3+
import { Button } from "@/shared/ui/button"
4+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/ui/card"
5+
import { Badge } from "@/shared/ui/badge"
6+
import { Separator } from "@/shared/ui/separator"
77
import { useUser } from "@/hooks/use-user"
88
import { useQuery } from "@tanstack/react-query"
99
import { CreditBalance } from "@/lib/services/credit-manager"
@@ -186,7 +186,7 @@ export default function CreditsPage() {
186186
<CardHeader>
187187
<CardTitle className="text-orange-800">Low Credit Warning</CardTitle>
188188
<CardDescription className="text-orange-700">
189-
You're running low on credits. Consider adding more credits to continue generating predictions.
189+
You&apos;re running low on credits. Consider adding more credits to continue generating predictions.
190190
</CardDescription>
191191
</CardHeader>
192192
<CardContent>

app/event/[eventId]/page.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { notFound } from 'next/navigation'
22
import { eventQueries, marketQueries } from '@/lib/db/queries'
3-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
4-
import { Badge } from '@/components/ui/badge'
5-
import { Button } from '@/components/ui/button'
3+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/ui/card"
4+
import { Badge } from "@/shared/ui/badge"
5+
import { Button } from "@/shared/ui/button"
66
import { EventIcon } from '@/components/event-icon'
7-
import { TrendingUp, BarChart2, ArrowRight, Calendar, ArrowLeft, DollarSign, Tag } from 'lucide-react'
7+
import { BarChart2, Calendar, ArrowLeft, DollarSign, Tag } from 'lucide-react'
88
import Link from 'next/link'
9-
import type { Market } from '@/lib/types'
109
import { formatVolume } from '@/lib/utils'
11-
import { serializeDecimals } from '@/lib/serialization'
1210
import type { EventDTO, MarketDTO } from '@/lib/types'
1311

1412
// Force dynamic rendering to avoid build-time database queries

app/events/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { eventQueries, marketQueries } from '@/lib/db/queries'
2-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
3-
import { Badge } from '@/components/ui/badge'
4-
import { Button } from '@/components/ui/button'
2+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/ui/card"
3+
import { Button } from "@/shared/ui/button"
54
import { EventIcon } from '@/components/event-icon'
6-
import { TrendingUp, BarChart2, ArrowRight } from 'lucide-react'
5+
import { BarChart2, ArrowRight } from 'lucide-react'
76
import Link from 'next/link'
87
import type { Event, Market } from '@/lib/types'
98
import { formatVolume } from '@/lib/utils'

app/experiments/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client'
22

33
import { useEffect, useState } from 'react'
4-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5-
import { Badge } from '@/components/ui/badge'
4+
import { Card, CardContent, CardHeader, CardTitle } from "@/shared/ui/card"
5+
import { Badge } from "@/shared/ui/badge"
66

77
interface ExperimentStat {
88
experimentTag: string
@@ -39,7 +39,7 @@ export default function ExperimentsPage() {
3939
} else {
4040
setError('Failed to fetch experiments')
4141
}
42-
} catch (err) {
42+
} catch {
4343
setError('Network error fetching experiments')
4444
} finally {
4545
setLoading(false)

0 commit comments

Comments
 (0)