How raycast/ray-so works
High-Level Architecture Components
The system should be represented with these main components:
a) Frontend Layer:
• Next.js Application (Core)
• Navigation Structure
• Tool-specific Modules:
• Code Image Generator
• Prompt Explorer
• Preset Explorer
• Quicklink Explorer
• Snippet Explorer
• Theme Explorer
b) API Layer:
• REST API endpoints (/api directory)
• External Services Integration
c) Data Storage:
• Static Data (JSON files for themes, prompts, etc.)
• File System (for assets and generated content)
Component Relationships
[Client Browser] ←→ [Next.js Frontend]
• ↓
• [API Routes]
• ↓
• [Data Sources]
• Theme Files
• Prompt Configs
• Snippet Storage
• Asset Storage
Specific Implementation Details
a) Core Application Structure (Rectangle):
• Navigation Layout (/app/(navigation))
• Global Components (/components)
• Utility Functions (/utils)
b) Tool Modules (Hexagons):
• Each tool should be represented as a separate module
• Their specific components and assets
• Their dedicated API routes
c) Shared Resources (Ovals):
• Global CSS
• Common Components
• Utility Functions
• Asset Storage
Data Flow Representation
• Client-Server Communication
• Internal Component Communication
• API Interactions
• Asset Loading Paths
Key Technical Aspects to Highlight
• Next.js 13+ App Router Structure
• API Route Implementation
• Static Asset Handling
• Theme Generation Pipeline
• Image Processing Features