How eric-jy-park/bookmarket works
Main System Components
a) Client-Side (Frontend):
• Pages Layer (/(home), etc.)
• Components Layer (_components)
• State Management (React Query + Zustand)
• Hooks Layer (_hooks)
b) Server-Side:
• A "Server Components" section
• Database layer (Neon PostgreSQL)
c) External Services:
• Clerk Authentication
• URL Metadata Service
Component Relationships
[Client Layer]
• ↕
[Next.js App Router]
• ↕
[API Layer] ←→ [External Services]
• ↕
[Database Layer]
Detailed Component Breakdown
For each major section, include:
Frontend Components:
• BookmarkList
• BookmarkCard
• ContextMenu
• TopNavBar
• Common Components
State Management:
• Mutations (create, update, delete)
• Queries (bookmark fetching)
• Local State (bookmark store)
API Routes:
• /api/bookmarks (CRUD)
• /api/metadata (URL info)
Technical Details
• ORM Layer (Drizzle)
• Authentication Flow
• State Management Tools
• API Route Handlers
Document any assumptions
Remember to emphasize:
• The Next.js App Router architecture
• How server components interact with client components
• The role of React Query in data fetching
• How state is managed across the application
• Security boundaries and authentication flow