How tolluset/cauter works
Project type and purpose
• From the README and file tree, this is a backend‐focused, monorepo TypeScript project (“Cauter”) that ingests coin/stock prices (“scheduler”), stores them in a database, and exposes APIs plus analysis logic via an “API server.”
• It’s neither a classic UI-centric full-stack app nor a compiler; it’s more of a microservices/data-pipeline system.
File structure
• Top-level: pnpm workspace with three packages:
• packages/scheduler – data collector & batch jobs
• packages/server – REST/HTTP API + analysis routines
• packages/shared – common utilities, types, data models
• Docker Compose files for the database and scheduler service indicate containerized deployment.
• The scheduler package embeds DB migrations, connection code, and a Binance API client.
• No “frontend” directory implies that clients (UI or CLI) are external.
Key architectural insights from README
• server handles API endpoints and data analysis.
• scheduler runs cron-style jobs to fetch and persist market data.
• shared holds code reuse points (e.g., database schemas, type definitions).
a. Main components
• Scheduler Service (Node.js + TypeScript)
• API Server (Node.js + TypeScript)
• Shared Library (code module)
• Relational Database (e.g., PostgreSQL)
• External Market Data API (Binance)
• External Clients (e.g., Dashboard, CLI, BI tools)
b. Relationships & data flows
1. Scheduler → (HTTP) → Binance API → market data
2. Scheduler → (ORM/SQL) → Database (writes raw klines)
3. API Server → (ORM/SQL) → Database (reads/aggregates data)
4. Clients → (REST/HTTP) → API Server → responses
5. Both Scheduler & Server import shared code
c. Architectural patterns & principles
• Modular separation (collector vs. API)
• Code sharing via a monorepo (packages/shared)
• Containerized microservices with Docker Compose
• Cron-like scheduling for data ingestion
• Database migrations for schema management
d. Relevant technologies
• TypeScript, Node.js
• PNPM workspace
• Docker Compose (docker-compose.db.yml, docker-compose.scheduler.yml)
• PostgreSQL (or similar SQL database)
• Binance REST API
• ts-node, migration scripts