How riccardoperra/codeimage works
Main Components Identification
The system consists of two main applications and several supporting packages:
a. Frontend Application (@codeimage/app):
• Built with SolidJS
• Uses CodeMirror6 for code editing
• Implements vanilla-extract for styling
• Includes state management via StateBuilder
b. Backend Application (@codeimage/api):
• Built with Fastify
• Uses Prisma ORM for database operations
• Implements Auth0 for authentication
Key Architectural Elements
a. Client Layer:
• UI Components (Terminal, Editor, PropertyEditor)
• State Management
• Theme System
• Export Functionality
b. API Layer:
• REST Endpoints
• Authentication/Authorization
• Database Operations
c. Supporting Services:
• Auth0 Integration
• Image Processing
• Font Management
[Frontend Layer]
• ↑↓
[API Gateway]
• ↑↓
[Backend Services]
• ↑↓
[External Services]
Component Relationships
Key interactions:
• Frontend to API communication
• Authentication flow with Auth0
• Database operations through Prisma
• Image export pipeline
• State management flow
Specific Implementation Details
Technical elements:
• Monorepo structure (@codeimage/*)
• Package dependencies
• API endpoints
• Database schema
• Authentication flow