Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archie

A system design interview coach with a chat sidebar and a live canvas.

You describe a problem. Archie walks the interview stages — framing, requirements, capacity, API, architecture, trade-offs, data model, deep dive, discussion — and renders the work as diagrams and tables you can refine in place.

The agent never invents UI. It calls typed frontend tools that map to components you own (React Flow, Mermaid, tables). Controlled generative UI: the model picks content, the product owns the surface.

Two modes: Interview (nine stages, one at a time) and Build (full design pass). There is also a short quiz path for practice.


Stack

App Next.js, React, Tailwind, Auth.js, Drizzle, Postgres
Agent FastAPI, LangGraph, CopilotKit / AG-UI
Models GPT-4.1 (first turn), Gemini 2.5 Flash (follow-ups), with failover
Canvas React Flow, Mermaid, Zod tool schemas
browser  →  Next.js BFF  →  FastAPI / LangGraph  →  LLM
                ↓ tool calls
             canvas components

Layout

├── backend/          FastAPI agent
├── frontend/         Next.js app + Drizzle migrations
├── docker-compose.yml
└── .github/workflows CI

Local setup

Needs Node 20+, Python 3.12+, Docker, and OpenAI + Gemini keys.

# Postgres (host port 15432)
docker compose up -d
docker exec -i archie-postgres psql -U archie -d archie < frontend/drizzle/0000_init.sql
docker exec -i archie-postgres psql -U archie -d archie < frontend/drizzle/0001_rate_limits.sql

# API
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # OPENAI_API_KEY, GEMINI_API_KEY, AGENT_SECRET, AUTH_SECRET
uvicorn server:app --reload --port 8000

# Web (separate terminal)
cd frontend
npm install
cp .env.example .env.local   # DATABASE_URL, AGENT_URL, same secrets as API
npm run dev

Open http://localhost:3000, register, start an interview.

AUTH_SECRET and AGENT_SECRET must match on both sides. DATABASE_URL for local:

postgresql://archie:archie@127.0.0.1:15432/archie

Deploy

Three services: Postgres, API (backend/), web (frontend/).

Shared: AGENT_SECRET, AUTH_SECRET.
Web: DATABASE_URL, AGENT_URL, AUTH_URL (public site URL).
API: OPENAI_API_KEY, GEMINI_API_KEY, ALLOWED_ORIGINS (public site URL).

Apply both SQL files in frontend/drizzle/ once against production Postgres. CI runs typecheck, vitest, and pytest on main.

Agent thread memory is in-process (MemorySaver); chat history in Postgres persists across restarts.


Private. Built as a personal project.

About

Your system design companion

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages