How yjl9903/resonance-market works
Main Components
a) Frontend Layer:
• Vue.js/Nuxt.js application structure
• UI Components (from the extensive /components/ui directory)
• Pages and Layouts
• Client-side stores (from /stores directory)
b) Backend Layer:
• Server API endpoints (from /server/api directory)
• Database layer (SQLite with Drizzle ORM)
• Caching system (indicated by server/utils/cache.ts)
c) External Services:
• GitHub Actions for CI/CD
• Cloudflare Workers (indicated by wrangler.toml)
[Client Layer]
• ↑↓
[API Layer]
• ↑↓
[Data Layer]
Specific Elements
Frontend Components:
• Sub-sections for:
• Pages (market view, transaction planning, reports)
• UI Components (shadcn/ui components)
• State Management (stores)
• Composables
API Layer:
• /api/log (POST)
• /api/logs (POST - batch upload)
• /api/info/* (GET - cities and products)
• /api/product (GET)
• /api/stream/product (real-time updates)
Data Layer:
• SQLite Database with Drizzle ORM
• Cache System
• Product Data Storage
Important Flows to Highlight
• Market Data Upload Flow:
• Client → API (/api/log or /api/logs) → Database
• Product Information Flow:
• Database → Cache → API → Client
• Real-time Updates:
• Stream API → Client
Deployment Architecture
Serverless architecture:
[Cloudflare Pages] ← [GitHub Actions] → [Cloudflare D1 (Database)]