You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursorrules
+64Lines changed: 64 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,63 @@ This is a Next.js prediction market application built by a **solo founder** that
26
26
- Follow the existing file structure and naming conventions
27
27
- **Keep it simple** - Avoid over-engineering for a solo founder project
28
28
29
+
### UI/UX Patterns
30
+
- **Collapsible Content with Gradient Fade**: For long text content that needs to be collapsed, use gradient fade effects to indicate there's more content below:
- **Visual hierarchy**: Larger spacing between major sections, smaller spacing within sections
84
+
- **Responsive**: Tailwind spacing classes automatically scale appropriately on mobile
85
+
29
86
### Running the development server
30
87
- If the development server port localhost:3000 is already in use, please do not try to start another development server automatically. Ask first before starting another development server.
Copy file name to clipboardExpand all lines: CLAUDE.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,13 @@ See package.json for the most recent commands.
68
68
- Use transactions for multi-step operations
69
69
- Store raw API responses in separate `_raw` tables with metadata
70
70
71
+
### Prisma & Serialization Best Practices
72
+
-**Prisma JSON Protocol**: Uses `jsonProtocol = "true"` in `schema.prisma` to return plain JSON objects instead of Decimal instances
73
+
-**Server-to-Client Serialization**: Use `serializeDecimals()` from `lib/serialization.ts` when passing Prisma data to Client Components
74
+
-**API Routes**: Always serialize Prisma responses using `serializeDecimals()` before returning JSON
75
+
-**Migration Pattern**: After schema changes, run `pnpm prisma generate` to regenerate the client with JSON protocol
76
+
-**Common Issue**: "Only plain objects can be passed to Client Components" errors indicate missing serialization
77
+
71
78
72
79
## Code Style & Patterns
73
80
@@ -80,6 +87,63 @@ Follow the project's `.cursorrules` for consistent development:
80
87
- Use shadcn/ui components for consistency
81
88
-**Keep it simple** - Avoid over-engineering for a solo founder project
82
89
90
+
### UI/UX Patterns
91
+
-**Collapsible Content with Gradient Fade**: For long text content that needs to be collapsed, use gradient fade effects to indicate there's more content below:
<ahref="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>
0 commit comments