How i-am-alice/3rd-devs works
Project type and purpose
• This is a monorepo of AI-Dev example microservices and frontends demonstrating various LLM-powered patterns (chat, retrieval, memory, embeddings, web search, database, audio/vision pipelines, etc.).
• Each example is a small Bun/Node HTTP server (app.ts) exposing one or two endpoints (/api/chat, /api/demo, etc.) that orchestrate prompt templates, service classes, and external APIs.
File structure
• Top-level directories:
• agent, assistant, better_rag, chain, chat, … – each contains an app.ts + Service classes + prompt/ types/ utils.
• audio-frontend, audio-map-frontend, voice-frontend – static frontends using HTML/TypeScript/Canvas/Audio APIs.
• db-related examples: database, qdrant, neo4j, algolia, sync, hybrid – each illustrating storage integrations.
• Shared patterns:
• app.ts (entrypoint) → HTTP endpoints → Service classes → Prompt templates → OpenAIService (or other API clients) → optional DataStore or external API → response.
• Config/build: bun.lockb, package.json, .env-example, tsconfig.json, vite.config.* for frontends.
README for additional insights
• The repo is organized by “lessons” (S01E01…S03E05) grouping examples.
• Common tech: Bun runtime, Node.js, TypeScript, OpenAI API, various external services (Firecrawl, Langfuse, Algolia, Qdrant, Neo4j), filesystem for context/memory.
• Each example demonstrates a specific pattern: thread summarization, search-augmented generation, memory, audio capture, vision, file context, etc.
a. Main components
• Clients
• CLI (curl, bun run <example>)
• Browser frontends (audio-frontend, audio-map-frontend, voice-frontend)
• API Gateway / HTTP Server
• app.ts per example (Bun)
• routing layer (/api/chat, /api/demo, other endpoints)
• Service Layer
• Controller delegates to Service classes (AssistantService, TextService, VectorService, DatabaseService, MemoryService, WebSearch, etc.)
• Prompt Layer
• Directory of prompt templates (prompts/…) grouped by domain (assistant, documents, web, think)
• Core LLM Client
• OpenAIService.ts
• External Integrations
• Firecrawl (websearch), Langfuse (logging), ElevenLabs (TTS), Google AI Studio (video API), Mistral (Pixtral), Linear webhook, Redis/RateLimiter, etc.
• Data Stores
• File system (files/context, memories)
• Vector DB (Qdrant)
• Search index (Algolia)
• Graph DB (Neo4j)
• SQL/NoSQL (DatabaseService)
b. Relationships and data flow
1. User/client sends HTTP request →
2. API server (app.ts) routes request →
3. Controller calls one or more Service classes →
4. Services assemble prompts from Prompt Layer →
5. OpenAIService (or other model client) invoked →
6. Optionally interact with Data Stores / external APIs →
7. Gather/aggregate results →
8. Return HTTP response to client
c. Architectural patterns
• Layered architecture: presentation (HTTP), application (services), domain (prompts & business logic), infrastructure (LLM client & external APIs), persistence (datastores)
• Single responsibility per example: each folder is a self-contained microservice
• Plugin-style prompt templates: interchangeable by domain
• Dependency injection via constructor parameters for Service classes
d. Key technologies
• Runtime: Bun + Node.js
• Language: TypeScript / JavaScript
• HTTP: Bun HTTP server
• LLM API: OpenAI
• Vector store: Qdrant
• Search: Algolia, Firecrawl
• Graph DB: Neo4j
• Logging/observability: Langfuse
• File I/O: native fs for context/memory
• Frontend: HTML/TypeScript/Vite for audio & voice demos