How hypnoticsiege/stock-viewer works
Main Components
a. Frontend Layer:
• Client Browser
• Views (EJS Templates)
• Static Assets (CSS)
• Chart.js Visualization
b. Backend Layer:
• Express.js Server
• Static Data Store (JSON files)
Component Organization
┌─ Client Layer ─────────────────────┐
• Web Browser │
• ┬───────────────────┘
• ↓
┌─ Presentation Layer ────────────────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌────────────┐ │
• index.ejs │ │ chart.ejs│ │ Partials │ │
• ┘ └──────────┘ └────────────┘ │
• ↑ ↑ ↑ │
• ┴──────────────┘ │
• ┬─────────────────────────┘
• ↓
┌─ Application Layer ───────────────────────────┐
• ┌─────────────────────┐ ┌────────────────┐ │
• Express.js │ │ Chart.js │ │
• Server │ │ Rendering │ │
• ┬─────┘ └────────┬───────┘ │
• ┼────────────────┼───────────┘
• ↓ ↑
┌─ Data Layer ──────────────────────────────────┐
• ┌─────────────────────────────────────────┐ │
• Static JSON Files │ │
• (AAPL.json, JPM.json, TSLA.json) │ │
• ┘ │
• ┘
Important Elements to Highlight
a. Client-Side Features:
• TailwindCSS styling (input.css)
• Chart.js visualization library
• EJS templating system
b. Server-Side Components:
• Express.js routing and serving
• Static file serving
• JSON data reading