How gitmasterjatin/approximate_qe works
Major Components
• Monorepo Orchestrator (Turbo CLI/Turbo Engine)
• Apps:
• Backend
– Data-processing scripts (Python loader, sampling, sketching)
– HTTP API server (TypeScript/Node, middleware.ts, server.ts)
• Web Frontend
– Next.js application (React/TypeScript)
• Shared Packages (internal libraries/configs):
• @repo/db (Prisma schema & client)
• @repo/ui (React UI component library)
• @repo/typescript-config (TS configurations)
• @repo/eslint-config (ESLint configurations)
• External Services:
• Database (e.g., PostgreSQL)
• Vercel Remote Cache (optional caching service)
• CI/CD environment (build & deploy pipelines)
Relationships & Data Flows
• Turborepo orchestrates build & dev tasks for all apps/packages.
• Backend data-processing scripts read raw data, produce merged_data.csv → this is ingested or referenced by the HTTP API.
• HTTP API imports the Prisma client from @repo/db to talk to the Database.
• Web Frontend uses:
– UI components from @repo/ui
– TypeScript settings from @repo/typescript-config
– Linting rules from @repo/eslint-config
• Web Frontend communicates with the HTTP API over HTTP/HTTPS.
• Remote Caching (Vercel) connects with Turborepo to cache build artifacts.
• CI/CD pipelines pull from the monorepo, run Turbo tasks, and deploy apps.
Architectural Patterns
• Monorepo architecture using Turborepo for fast, cross-package builds & caching.
• Clear separation:
• Data processing (Python) vs. API layer (Node/TS) vs. UI layer (Next.js).
• Shared libraries/config files promote DRY and consistency.
• API-first design: frontend consumes REST (or GraphQL) endpoints expos ed by HTTP API.
Technologies & Frameworks
• Turborepo (turbo.json)
• Python 3.x (data loader scripts, notebooks)
• Node.js + TypeScript (HTTP API, Next.js)
• Next.js 13 (app directory, server/client components)
• Prisma ORM (schema.prisma)
• React component library (@repo/ui)
• ESLint & Prettier (linting/formatting)
• Vercel (optional remote cache & deployment)
Elements
• Clear labels on all components (e.g., “Next.js Web App”, “HTTP API (Node/TS)”, “Prisma Client”).