How tldraw/make-real works
Main Components
A. Frontend Layer:
• Root Next.js Application
• Core UI Components (/app/components)
• Slides Feature (/app/Slides)
• Custom Hooks (/app/hooks)
B. API Layer:
• Multiple AI Service Integrations:
• OpenAI Integration (/api/openai)
• Anthropic Integration (/api/anthropic)
• Replit Integration (/api/replit)
C. Utility Layer:
• Helper Functions (/app/lib)
• Configuration Files
• [Client Layer] → [API Layer] → [External Services Layer]
Component Relationships to Highlight
• How the MakeRealButton component connects to the useMakeReal hook
• Flow from user input through the AI services
• Demonstrate the relationship between Slides and PreviewShape components
• How the link sharing functionality works across different routes
Core application container
• [Next.js Application Container]
Main frontend components
• [Components]
• MakeRealButton
• SettingsDialog
• Links
• Dropdown
Feature modules
• [Slides Feature]
• [PreviewShape Feature]
API layer
• [API Routes]
• /api/anthropic
• /api/openai
• /api/replit
Utility services
• [Utilities]
• Text Processing
• SVG Handling
• File Operations
Additional Elements
• Version information or compatibility notes
• Entry points for different user flows
• Error handling paths
• Data flow directions