Secure Ingress
Cloudflare Tunnel, DNS, custom rules, and zero-open-port access into the local lab.
Architecture Lab
My lab notebook for AI diagrams, RAG flows, gateways, local models, and architecture research.
lab.index
Primary Use
Learn how the architecture is built
Core Lab
Self-hosted AI home lab on Apple Silicon
Research Focus
Agents, RAG, gateways, local models
For
Architects, engineers, developers, clients
Diagrams, field notes, resources, and interactive tools will keep landing here.
Home Lab Blueprint
Secure ingress, API gateway, agent runtime, local inference, data stores, and frontend surfaces.

Cloudflare Tunnel, DNS, custom rules, and zero-open-port access into the local lab.
FastAPI gateway with OpenAI-compatible contracts, auth, rate limits, logging, and model routing.
Python LangGraph orchestration inside the FastAPI gateway; Astra remains the JS/TS website-side agent surface.
Ollama and MLX for local model experiments, with fallback thinking for cloud model lanes.
PostgreSQL, Redis, and Qdrant for metadata, cache, queues, and vector search.
Next.js interfaces that turn the lab into a usable architecture playground and learning surface.
Graph Playground
Preset inputs, node transitions, checkpoints, approval gates, retries, and state inspection.
LangGraph Run
Risk
High
Mode
Async queue recommended
Checkpoints
0
Retries
0
Execution Path
01 / 08
active
input node
state
state.intent, state.policy_scope, state.risk_level
checkpoint
pending
gate
Not reached
Interactive Workbench
Select a system and inspect inputs, outputs, metrics, and failure modes.
Vercel-hosted Astra calls a private Python FastAPI gateway through Cloudflare Tunnel.
Evaluation Metrics
TS + Python
Astra stays in Next.js while gateway orchestration runs in Python.
8000
Private FastAPI server is reached through the Cloudflare tunnel.
Zero open ports
Incoming traffic strictly flows through secure, egress-only Cloudflare tunnels.
Runs the public chat surface and API route in the Vercel-hosted Next.js site.
Visitor chat request from manojmukherjee.co.in
OpenAI-compatible request from the Next.js API route
JS/TS website-side agent tooling
Gateway unavailable. The UI returns a bounded fallback state.
Empirical Sandbox
Live-ready local model inventory, throughput, memory, and tunnel health.
Local Sandbox
Live-ready metrics for models, memory, tunnel health, and local AI infrastructure.
Source
Snapshot
Health
Local lab telemetry hook ready
Tunnel
Cloudflare
Stores
Postgres / Redis / Qdrant
Ollama / Apple Silicon
Generation
18-28 tok/s
Memory
9-12GB unified memory
Ollama local reasoning lane
Generation
10-18 tok/s
Memory
12-16GB unified memory
MLX / local router
Generation
35-55 tok/s
Memory
3-5GB unified memory
Host
MacBook M1 Pro
32GB unified memory, local inference and data stores.
Gateway
FastAPI
OpenAI-compatible routing, auth, logging, and fallback policy.
Vector Store
Qdrant
Local semantic retrieval with cache-aware query paths.
Ingress
Cloudflare Tunnel
Egress-only tunnel path with zero open local ports.
Tunnel Log
T-00:04
Tunnel route healthy; gateway reachable through private ingress.
T-00:11
Local model lane selected for low-risk router classification.
T-00:18
Cloud fallback reserved for high-context reasoning requests.
Audit Estimator
Estimate token budget, latency shape, and cache/compaction savings.
Model cost, latency, cache savings, and review signal in one pass.
Primary Model
Monthly Token Budget
577.5M
75,000 monthly queries
Estimated Savings
$819
Semantic cache + context compaction
Sync P95
3.2s
Direct request-response path
Async Queue
5.4s
Queued worker path with retry control
Monthly Model API Budget
Baseline
$1,950
Optimized
$1,131
Architecture Readout
Review focus: cache, compaction, queues, reranking, and fallback routing.
Research Queue
Future notes, experiments, proof gaps, and publishable architecture decisions.
LAB-01
PublishedPrivate AI platform on MacBook M1 Pro with Vercel-hosted Astra, Cloudflare Tunnel, FastAPI, Python LangGraph, Ollama, PostgreSQL, Redis, and Qdrant.
Specs Link / Details
Click card to view technical documentation specifications.
LAB-02
ProductionStatic graph parsing, eager MiniSearch trie deserialization, warm Map query caching, and token-minimized context assembly.
Next detail to publish
Offline crawling, relationship mapping, and eager in-memory retrieval scaling.
LAB-03
PublishedOne API contract for local models, cloud models, tools, scripts, and future MCP clients.
Specs Link / Details
Click card to view technical documentation specifications.
LAB-04
DesigningInteractive diagrams for layers, failure modes, metrics, and decisions.
Next detail to publish
Topology, sequence, data-flow, and reliability views.
LAB-05
PublishedFirst-party architecture notes with diagrams, code walkthroughs, and file-aware references.
Specs Link / Details
Click card to view technical documentation specifications.
Lab Resources
Diagrams, data resources, tool reviews, playgrounds, and reusable patterns.
Topology maps, data-flow diagrams, sequence flows, failure-mode maps, and infra stack references.
Short field notes on what worked, what failed, what changed, and which tradeoffs still need proof.
Evaluation fixtures, source inventories, prompt contracts, retrieval examples, and grounding checklists.
Practical reviews of agent frameworks, vector databases, model runtimes, gateways, and observability tools.
Interactive inspectors for agent routing, retrieval assembly, gateway fallback, and architecture decisions.
Reference patterns that teams can adapt for private AI, RAG reliability, agent orchestration, and platform handoff.
Work With Me
Bring one constraint: grounding, routing, gateway design, observability, data ownership, deployment, or developer adoption.