How mplacona/threadscout works
Project type and purpose
• ThreadScout is a full-stack web application whose goal is to help users discover high-intent Reddit threads, summarize subreddit rules, score opportunities, draft reply variants, and track outcomes.
• The README confirms a React+Vite frontend, a Hono-based Node/TypeScript backend, serverless “tools” functions, and pluggable storage (DO Spaces vs. local JSON).
File structure
• Top-level directories:
• src/ – React SPA (TSX components, pages, hooks, utils)
• server/ – Hono HTTP server (routes, schemas, services, utils)
• functions/tools/ – Standalone serverless helpers (fetch-rules, validate-links)
• public/ – Static assets (favicon, robots.txt)
• scripts/ – Build scripts for server and functions
• Config files: vite.config.ts, tsconfig*, postcss.config.js, bun.lockb / package.json, project.yml, .env.example
• Storage abstraction: server/services/storage.ts chooses DigitalOcean Spaces in prod or local JSON under /data in dev.
• External integrations: Reddit API, Gradient AI agent, link-allowlist enforcement.
README for additional insights
• It already outlines a two-tier architecture: Frontend (Route: Dashboard, Thread) and Backend (Hono server with storage abstraction, redditClient, agentClient, validators).
• It references serverless tools for rule fetching and link validation—these are likely deployed as edge functions or lambdas.
a. Main components
1) User’s Browser running React SPA (Vite)
2) Hono API Server (Node/TypeScript)
3) Serverless Tools Functions (fetch-rules, validate-links)
4) Storage Layer (DigitalOcean Spaces or local JSON files)
5) External Services
– Reddit API (OAuth + public JSON)
– Gradient AI Agent
b. Relationships & Data flows
• Browser → HTTP(S) → Hono API (routes: /scan, /outcomes, /tools, /streamScan, etc.)
• Hono API → Storage Service → (DO Spaces or local FS)
• Hono API → redditClient → Reddit API
• Hono API → agentClient → Gradient AI
• Hono API → validator tools or calls out to the serverless tools endpoints
• Optional: Browser directly loads static index.html + assets from public/
c. Architectural patterns & design principles
– Single-Page Application (SPA) + REST / streaming API
– Storage Abstraction pattern (Strategy) for dev vs. prod
– Micro-services / serverless for specialized tasks (rules fetch, link validation)
– Layered services: routes → schemas → services → utils
d. Key technologies & frameworks
– Frontend: Vite, React, TypeScript, Tailwind CSS, shadcn/ui
– Backend: Hono (TypeScript), Node.js
– Serverless: Netlify/AWS Lambda style functions in functions/tools
– Storage: DigitalOcean Spaces or local JSON
– Testing: Vitest
– Deployment: Static build + Node server