How triggerdotdev/jsonhero-web works
Main System Components
a) Frontend Layer:
• React-based UI components (located in /app/components)
• Multiple view modes (Column, Tree, Editor)
• Theme system
• Search functionality
• Preview system
b) Backend Layer:
• Remix.run framework
• API endpoints
• File handling services
• URI preview service
• GitHub integration
c) Worker Layer:
• Background processing
• Cloudflare Workers integration (indicated by wrangler.toml)
Key Architectural Elements
a) Core Features Architecture:
• JSON document processing pipeline
• View rendering systems (Column, Tree, Editor)
• Search indexing and processing
• Preview generation system
• Schema inference system
b) Data Flow:
• Document creation flows (File upload, URL fetch, API creation)
• Document retrieval and caching
• Search query processing
• Preview generation pipeline
┌─ Client Layer ─────────────────────────────┐
• React Components │
• Theme System │
• View Engines (Column/Tree/Editor) │
• Search UI │
• ┘
• ↕ (Remix Data Flow)
┌─ Application Layer ────────────────────────┐
• Route Handlers │
• JSON Processing │
• Schema Inference │
• Preview Generation │
• ┘
• ↕ (Service Integration)
┌─ Service Layer ──────────────────────────────┐
• API Hero Service │
• GitHub Service │
• URI Preview Service │
• Toast Service │
• ┘
• ↕ (External Communication)
┌─ External Services ────────────────────────┐
• Cloudflare Workers │
• External APIs │
• Storage Services │
• ┘
Important Details
• The separation between client and server code
• The Remix.run framework architecture
• The different view engines and their relationships
• The preview generation pipeline
• Search functionality architecture
• External service integrations
Specific Implementation Notes
Specialized components:
• JSON document processing pipeline
• Preview generation system
• Search indexing and query system
• Schema inference engine
• URI preview service
• File handling system
Interactions and Data Flow
Show:
• How JSON documents are processed and stored
• How different views are generated
• How search queries are processed
• How previews are generated and cached
• How external services are integrated
Remember to:
• Use consistent styling
• Notes for complex interactions
• Both synchronous and asynchronous flows