How steven-tey/novel works
Main System Components
a) Frontend Layer:
• Editor Interface (based in apps/web)
• UI Components (components/tailwind)
• Editor Components (from packages/headless)
b) Backend Services:
• AI Integration (/api/generate)
• Image Upload Service (/api/upload)
c) Core Libraries:
• Headless Package (packages/headless)
• Extensions System
• Plugin System
Architecture Representation
a) Core Editor Architecture:
[Frontend UI Layer]
• ↓
[Editor Components]
• ↓
[Headless Core] ← → [Extensions]
• ↓
[Tiptap Engine]
b) AI Integration Flow:
[Editor] → [AI Command] → [OpenAI API]
• ↲ [Completion Handler] ↱
c) Image Handling:
[Image Upload UI] → [Upload Service] → [Vercel Blob Storage]
Key Relationships to Highlight
• Relationship between the headless package and the Tailwind implementation
• Extension system's plugin architecture
• Demonstrate the AI completion flow
• Image upload and handling flow
Technical Details
• Next.js framework structure
• Tiptap integration points
• OpenAI API connection
• Vercel Blob storage integration
• Extension system hooks
Implementation Notes
• The monorepo structure (apps/, packages/)
• The separation between headless core and UI implementation
• The plugin architecture for extensibility
• The AI integration points
• The image handling system