How towsifkafi/mcpfp works
Main Components
A. Client Layer:
• Web Frontend (SvelteKit application)
• External API Consumers
B. API Server Layer:
• Hono Framework running on Bun Runtime
• Profile Picture Generation Service
• Asset Management System
C. External Services:
• Minecraft Skin API (for fetching player skins)
Key Architectural Elements
[Client Tier]
• ↓ ↑
[API Server Tier]
• ↓ ↑
[External Services Tier]
Detailed Component Breakdown
Frontend (web/):
• SvelteKit Runtime
• Static Assets
• Route Handler
API Server (api/):
• Profile Generator Service (src/rendering/generateProfile.ts)
• Skin Fetcher Service (src/rendering/getSkin.ts)
• Gradient Generator (src/rendering/gradient.ts)
• URL Validator (src/utils/checkURL.ts)
Asset Management:
• Cosmetics Storage (api/assets/cosmetics)
• Overlay Storage (api/assets/overlays)
Data Flow Representation
• Client requests → API Server
• API Server → Minecraft Skin API
• Internal flow between components:
1. URL Validation
2. Skin Fetching
3. Profile Generation
4. Asset Application
5. Response Delivery
Technology Stack Indicators
Technology badges or labels for:
• Bun Runtime
• Hono Framework
• @napi-rs/canvas
• SvelteKit
• Docker
Additional Elements
A section showing:
• Docker container boundary
• Load balancing capability (indicated by pm2 config)
• Asset pipeline flow