How wxingheng/markdown-to-image-serve works
Component Details
Frontend Components (Top Section):
• Pages (/app/*, /poster)
• UI Components (src/components)
• Markdown Editor
• Preview Component
API Layer (Middle Section):
• /api/generatePoster
• /api/generatePosterImage
• /api/getImage
• /api/images/[filename]
Processing Layer (Lower Section):
• Markdown Processing Pipeline
• Puppeteer Rendering Service
• Image Storage Handler
Flow Representations
• Client → API Endpoints (REST calls)
• API → Markdown Processor
• Markdown Processor → Puppeteer Service
• Puppeteer → Image Storage
• Image Storage → Client Response
Technical Details
Annotations for:
• Next.js 13+ App Router
• Puppeteer Browser Instance
• MDX Processing
• Tailwind CSS Styling
• API Response Formats
Integration Points
Highlight:
• External API access points
• Vercel deployment connection
• Docker container boundaries
• File system interaction points
Deployment options (Vercel/Docker)
Remember to include notes about scalability considerations and the stateless nature of the service, as this is designed to be deployed on Vercel's serverless infrastructure.
This system design should clearly show how the application transforms Markdown input into image output while maintaining a clean separation of concerns between the frontend interface, API layer, and processing services.