TL;DR I shipped Scholar AI's MVP in 3 days and about 16 hours with Vibe Coding: an academic tool that searches papers, auto-generates summaries, does multilingual translation, and answers questions with RAG. Stack: Python / FastAPI / React / PostgreSQL / ChromaDB — roughly 1,460 lines, about 85% AI-generated. Vibe Coding is a coding copilot, not autopilot: absurdly fast on standard work, but complex logic and performance-critical paths still need you in the driver's seat.

In the second week of the semester, I had 47 unread papers sitting in my literature folder and 9 days left before my review was due. I needed a tool that could search papers, auto-generate summaries, and translate English into Chinese on the fly. At my old pace, just standing up a backend would take a week.

When Karpathy dropped “vibe coding” on X earlier this year — “forget that the code even exists,” just describe your intent — I decided to take a bet: three days, from zero to something usable.

I won the bet. Three days later Scholar AI was running: search, summaries, translation, RAG Q&A, all working. The price was 5–6 hours a day of high-intensity looping: describe requirements → AI generates → I verify → fix → next. This article skips the philosophy and shows the ledger: what those three days actually contained, how the architecture was decided, what the code looked like, where things blew up, and the exact commands if you want to follow along.

Scholar AI development collage: FastAPI code window, RAG retrieval pipeline diagram, pytest terminal, and React paper-search interface
The Scholar AI build in one collage: FastAPI backend, the RAG retrieval pipeline, pytest runs, and the React search UI — most of the three days happened inside these four panels.

What Those Three Days Actually Were

The time ledger first: Day 1 backend ~6 hours, Day 2 frontend ~5.5 hours, Day 3 integration and polish ~4.5 hours — 16 hours total. Code volume: ~620 lines backend, ~840 lines frontend, roughly 85% generated directly by AI. I hand-edited about 220 lines — mostly type annotations, edge cases, and async details the AI couldn’t get right.

Karpathy’s definition fits in one sentence: describe your intent clearly, let AI write the implementation, and you judge the code quality and correct course. Your role shifts from “person who writes code” to “person who directs code” — but the referee’s chair can’t stay empty.

The real precondition for finishing in three days was scoping the MVP down to its skeleton. It did exactly four things: paper search, smart summaries, multilingual translation, RAG Q&A. The deliberately-cut list was longer: the user system was a stub session table (even login was a stub), no permissions, no payments, no admin panel. If you walk in wanting a “complete product,” you can forget the three-day number entirely.

Day 1: Backend from Scratch

The architecture fit on three lines of paper: FastAPI as the routing layer and request orchestration; PostgreSQL (SQLAlchemy + Alembic) for relational data like users and sessions; ChromaDB holding paper-chunk vectors for semantic retrieval only. Why not one database for everything? Metadata filtering (year, field) and session-relational queries are far more natural in SQL than in a vector store’s where clause. Let each store do what it’s good at — that judgment call was mine, not the AI’s.

The first step wasn’t even writing code; it was defining the interface. I described the endpoints I needed in plain language, had the AI generate an OpenAPI spec first, then generated the FastAPI routes from the spec. Thirty minutes, and the API docs came free (/docs just works). The route skeleton looked like this — AI-generated on the first pass, I only touched the error handling:

from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI(title="Scholar API", version="0.1.0")

class Query(BaseModel):
    query: str
    k: int = 5

@app.post("/api/query")
async def rag_query(payload: Query):
    docs = retrieve_docs(payload.query, k=payload.k)
    answer = await generate_answer(payload.query, docs)
    return {"answer": answer, "sources": [d.source for d in docs]}

And the ChromaDB wiring for the RAG pipeline (chunk → embed → retrieve → generate):

collection = chroma_client.get_or_create_collection("papers")

def retrieve_docs(query: str, k: int = 5):
    vec = embedder.encode(query).tolist()
    res = collection.query(query_embeddings=[vec], n_results=k)
    return [Doc(text=t, source=m["source"])
            for t, m in zip(res["documents"][0], res["metadatas"][0])]

I tested two chunking strategies: 500 tokens per chunk with 100 overlap. I tried 1,000-token chunks in between, and a manual spot-check of 50 queries showed top-1 hits dropping by about 8 percentage points — back to 500 it went. There is no silver bullet for chunk size; you measure with real queries.

Day 1’s ledger: 30 minutes defining the API; ~1 hour on SQLAlchemy models plus Alembic migrations (the AI mapped one JSONB field wrong, fixed by hand); ~2 hours on the RAG pipeline; the rest writing pytest — 4 test cases, 1.4 seconds, green before bed.

Project Overview
  • Project: Scholar AI
  • Stack: Python / FastAPI / React / PostgreSQL / ChromaDB
  • Core features: Paper search · Smart summaries · Multilingual translation · RAG Q&A
  • Build time: 3 days / ~16 hours (MVP)
  • Code volume: ~1,460 lines, ~85% AI-generated
  • GitHub: 37chengshan/scholar-ai

Day 2: Frontend Takes Shape

Day two was frontend: React + TypeScript + shadcn/ui. Honestly, Vibe Coding’s speedup is even more dramatic on the frontend than the backend — the backend still needs architectural thinking, while a huge share of frontend work is pure manual labor: layout, spacing, loading states, empty states, and the AI writes those fast and reliably.

The single most valuable lesson of the whole project: describe components, not pages. Have the AI write one component at a time, with the prop interface defined by you first. For the search box I said: “a search input with 300ms debounce, a dropdown showing paper titles and authors, max 8 items, keyboard up/down selection” — usable on the first generation. The vaguer “build a search page” took three rounds of rework.

The whole component tree was tiny — four was enough: SearchBar (debounced search), QAPanel (streaming Q&A + cited sources), SourceCard (paper card), HistoryList (session history) under App. The AI’s first QAPanel rendered streamed tokens by concatenating strings into innerHTML; I changed it to incremental state appends per token and swapped in react-markdown for rendering — XSS holes don’t get to stay.

The numbers: ~840 lines of frontend, roughly 70% usable on first AI generation, the remaining 30% on styling tweaks and responsive fixes. The AI crashed twice on the 390px breakpoint — mobile still needs a human eyeball on a real device.

Vibe Coding doesn't let you stop thinking — it lets you spend your brainpower where it matters more: product thinking and user experience.

Personal note

Day 3: Integration & Polish

Three-day build roadmap: Day 1 backend trio, Day 2 frontend component tree, Day 3 integration checklist
The three-day roadmap: Day 1 ships the backend trio (FastAPI, PostgreSQL, ChromaDB), Day 2 builds the React component tree, Day 3 works through the integration checklist — SSE streaming, CORS, environment variables, and error handling.

Day three was all “dirty work”: frontend-backend wiring, error handling, loading states, responsive layout. Ironically, it was Vibe Coding’s most efficient day — the more specific the problem, the faster the AI fixed it. Three memorable blowups:

CORS config. The AI-generated CORSMiddleware had allow_origins=["http://localhost:5173"], which looked fine — but it dropped the Authorization header, so every token-carrying preflight request died with 403. I added allow_headers=["*"] by hand. Note: that’s a local-dev-only move; in production, tighten it to an explicit header list — don’t copy-paste it.

SSE streaming. The AI’s first attempt just did return StreamingResponse(generator()), and the frontend’s EventSource dropped the connection immediately. After a long hunt, the culprit was a missing text/event-stream response header. Two-line fix: StreamingResponse(gen(), media_type="text/event-stream"), and on the frontend, ditch EventSource (it’s awkward with custom headers) for fetch + reader chunked reads.

ChromaDB tuning. Past ~20k chunks, query latency climbed from 80ms to 600ms. Two moves brought it back under 150ms: top-k from 10 down to 5 (manual spot-checks showed no perceptible answer-quality drop), and switching embeddings to the batch API at 64 per call. A vector DB’s defaults are tuned for demos — once real data shows up, you tune by hand.

Final ledger: 16 hours, ~1,460 lines, 85% AI-generated, ~220 lines hand-fixed. Post-launch measurements: first-token latency ~1.2s on Q&A (streaming feels fine), vector retrieval p95 ~300ms. That’s a long way from production-ready — monitoring, auth, and rate limiting are a different article — but the MVP runs.

One line on where this fits, no separate header needed: Vibe Coding is a copilot, not autopilot. On standard work — CRUD, forms, streaming Q&A, admin panels — it’s absurdly fast. On complex business rules, performance-critical paths, and anything requiring real understanding of the underlying tech (like that SSE header above), if you can’t fix it yourself, you can’t use it. The two permanent preconditions for a three-day build: a small scope, and you as the referee.

Get Building Right Now

01

Stand up the backend skeleton

pip install fastapi uvicorn sqlalchemy alembic chromadb sentence-transformers, then uvicorn app.main:app --reload. Checkpoint: open http://127.0.0.1:8000/docs and see the auto-generated API docs.

02

Define the data models

Write the SQLAlchemy models first — three tables are enough for an MVP: users, sessions, papers. Generate the migration with alembic revision --autogenerate. Checkpoint: upgrade and downgrade both run cleanly.

03

Wire up the RAG pipeline

Create a papers collection in ChromaDB, write chunks at 500 tokens with 100 overlap, and add the /api/query route. Checkpoint: curl a query and get JSON back with source fields.

04

Start the frontend

npm create vite@latest web -- --template react-ts, install shadcn/ui. Write just the SearchBar component first, get /api/query working through it, then build QAPanel. Checkpoint: one search in the browser shows result cards.

05

The integration trio

Fill in CORS allow_headers; use fetch + reader for SSE instead of EventSource; measure query latency once ChromaDB passes ten thousand chunks. Checkpoint: first-token latency under 2 seconds on Q&A.

FAQ

Can you really build a full-stack AI app in three days?

Yes — but it’s an MVP, and the scope was cut to the bone: paper search, summaries, translation, RAG Q&A. Login is a stub; no permissions, payments, or admin panel. The precondition is the “describe, verify, iterate” loop, plus knowing exactly what you’re building and being able to judge the AI’s code quality.

Is Vibe Coding good for big projects?

It depends on the part. Standardized features — CRUD, forms, streaming Q&A, admin panels — go absurdly fast; complex business logic, performance-critical paths, and anything needing deep understanding of the fundamentals still need handwritten code. Mixing both modes in one project is the pragmatic answer.

Do you still need to know how to code?

Yes — arguably more than before. The AI’s CORS config dropped the Authorization header, its first SSE attempt was missing a response header, and ChromaDB’s defaults got slow once real data arrived — a human fixed all of those. Your role shifts from “person who writes code” to “person who directs code,” and the referee’s chair can’t stay empty.

Any tips for describing frontend work?

Don’t describe a whole page at once — break it into small components, one at a time, with the prop interface defined by you. “A search box, 300ms debounce, dropdown showing paper titles and authors, max 8 items, keyboard selection” worked first try; “build a search page” took three rounds of rework.

How do you pick RAG chunking parameters?

There is no silver bullet — measure. I tried 1,000-token chunks; a manual spot-check of 50 queries showed top-1 hits dropping ~8 percentage points, so I went back to 500 tokens with 100 overlap. Get it running first, then spot-check with real queries. Don’t trust the defaults.

The X-thread version

1/ Three days. 16 hours. ~1,460 lines of code. I built a full-stack AI app that searches papers, auto-writes summaries, and does RAG Q&A. 85% of the backend code wasn’t written by me. Yes, really.

2/ The precondition first: this isn’t magic, it’s scope cut to the bone. The MVP does exactly 4 things: paper search, smart summaries, multilingual translation, RAG Q&A. User login? A stub. Permissions? None. Payments? Nonexistent.

3/ Day 1: backend in 6 hours. The architecture in three sentences: FastAPI for routing and orchestration; PostgreSQL for users and sessions (relational queries are just smoother in SQL); ChromaDB holding vectors for semantic retrieval only. Don’t make one database do everything.

4/ The concrete move: have the AI generate an OpenAPI spec from your plain-language description first, then generate the FastAPI routes from the spec. Thirty minutes, and the API docs come free (/docs just works).

5/ Day 2: frontend in 5.5 hours. The most valuable lesson: describe “components,” not “pages.” ❌ “build a search page” (3 rounds of rework) ✅ “a search box, 300ms debounce, dropdown with titles + authors, max 8 items, keyboard selection” (worked first try).

6/ Day 3: integration grind. The AI’s CORS config dropped the Authorization header — instant 403 on preflight; its first SSE attempt was missing the text/event-stream header — frontend connected and died. The takeaway: the AI writes, you referee.

7/ Final ledger: 16 hours / ~1,460 lines / ~85% AI-generated / ~220 lines hand-fixed (types, edge cases, async details). Post-launch: first-token latency ~1.2s (streaming), vector retrieval p95 ~300ms.

8/ ChromaDB tuning: past 20k chunks, queries went from 80ms to 600ms; two moves brought it back under 150ms — top-k from 10 to 5 (no perceptible quality drop) + embeddings on the batch API, 64 at a time.

9/ Where it fits: CRUD, forms, streaming Q&A, admin panels — absurdly fast. Complex business rules, performance-critical paths, anything needing real understanding of the underlying tech — handwritten. The permanent preconditions for a three-day build: small scope + you as the referee.

10/ Full walkthrough, architecture notes, code snippets, and the “get building right now” command checklist are on the blog: https://citygenius-blog.pages.dev/article/vibe-coding-3-days — forward it to that friend who keeps saying “no time for side projects.”

一句话总结 我用 Vibe Coding 在 3 天、约 16 小时里做出了 Scholar AI 的 MVP:一个能检索论文、自动生成摘要、做多语言翻译和 RAG 问答的学术工具,技术栈是 Python / FastAPI / React / PostgreSQL / ChromaDB,约 1460 行代码里 85% 由 AI 生成。Vibe Coding 是"编码副驾驶"不是"自动驾驶":标准活快得离谱,复杂逻辑和性能关键路径还得你亲自上。

开学第二周,我的文献文件夹里躺着 47 篇没读的论文,离交综述还有 9 天。我需要一个工具:能搜论文、自动出摘要、顺手把英文翻成中文。按我以前的节奏,光搭个后端就要一周。

Karpathy 今年初在 X 上扔出 vibe coding 这个词的时候,原话是 “forget that the code even exists”——别管代码怎么写,把意图说清楚就行。我决定赌一把:三天,从零做出能用的东西。

赌赢了。三天之后 Scholar AI 跑起来了,搜索、摘要、翻译、RAG 问答全都能用。代价是每天 5–6 小时的高强度循环:描述需求 → AI 生成 → 我验证 → 修 → 下一个。这篇文章不讲大道理,只讲账本:三天到底干了什么、架构怎么定的、代码长什么样、哪里翻了车、以及你照着做需要敲哪些命令。

Scholar AI 开发拼贴:FastAPI 代码窗口、RAG 检索管线图、pytest 测试终端与 React 论文搜索界面
Scholar AI 的开发拼图:FastAPI 后端、RAG 检索管线、pytest 测试与 React 搜索界面——三天里的大部分工作都发生在这四块里。

三天到底在干什么

先报时间账:Day 1 后端约 6 小时,Day 2 前端约 5.5 小时,Day 3 集成打磨约 4.5 小时,总计 16 小时。代码量:后端约 620 行、前端约 840 行,AI 直接生成的占 85% 左右,我手改的大约 220 行——主要是类型标注、边界条件和 AI 写不明白的异步细节。

Karpathy 的定义一句话就能说完:把意图描述清楚,让 AI 写实现,你负责判断代码质量和纠偏。你的角色从”写代码的人”变成”指挥代码的人”,但裁判席不能空。

三天能成的真正前提是 scope 被砍到只剩骨头。MVP 只做四件事:论文检索、智能摘要、多语言翻译、RAG 问答。刻意没做的清单更长:用户体系只留了最简会话表(登录都是 stub),没做权限、没做支付、没做管理后台。如果你一上来就想做”完整产品”,三天这个数字可以直接忘掉。

Day 1:后端从零搭起

架构一共三层,画在纸上就三行:FastAPI 做路由层和请求编排;PostgreSQL(SQLAlchemy + Alembic)存用户、会话这种关系型数据;ChromaDB 存论文 chunk 的向量,只干语义检索。为什么不用一个库包打天下?年份、领域这类元数据过滤和会话关联查询,SQL 比向量库的 where 顺手得多。让每种存储干它擅长的事,这个判断是人做的,AI 不会替你做。

第一步甚至不是写代码,是定接口。我用自然语言描述需要哪些接口,让 AI 先生成 OpenAPI spec,再基于 spec 生成 FastAPI 路由。这一步只花了 30 分钟,副产品是接口文档自动就有了(/docs 打开即用)。路由骨架长这样,AI 第一版生成,我只改了异常处理:

from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI(title="Scholar API", version="0.1.0")

class Query(BaseModel):
    query: str
    k: int = 5

@app.post("/api/query")
async def rag_query(payload: Query):
    docs = retrieve_docs(payload.query, k=payload.k)
    answer = await generate_answer(payload.query, docs)
    return {"answer": answer, "sources": [d.source for d in docs]}

RAG 管道(文档分块 → 向量化 → 检索 → 生成)的 ChromaDB 接入骨架:

collection = chroma_client.get_or_create_collection("papers")

def retrieve_docs(query: str, k: int = 5):
    vec = embedder.encode(query).tolist()
    res = collection.query(query_embeddings=[vec], n_results=k)
    return [Doc(text=t, source=m["source"])
            for t, m in zip(res["documents"][0], res["metadatas"][0])]

分块策略我试了两轮:500 tokens 一块、overlap 100。中间试过 1000 tokens 一块,人工抽查 50 个 query 发现 top-1 命中掉了约 8 个百分点,又调回 500。这种参数没有银弹,只能实测。

Day 1 的时间账:接口定义 30 分钟;SQLAlchemy 模型 + Alembic 迁移约 1 小时(AI 把一个 JSONB 字段映射错了,手改);RAG 管道约 2 小时;剩下时间写 pytest,4 个用例 1.4 秒跑完,绿灯才敢睡。

项目概览
  • 项目名:Scholar AI
  • 技术栈:Python / FastAPI / React / PostgreSQL / ChromaDB
  • 核心功能:论文检索 · 智能摘要 · 多语言翻译 · RAG 问答
  • 开发周期:3 天 / 约 16 小时(MVP)
  • 代码量:约 1460 行,AI 生成约 85%
  • GitHub:37chengshan/scholar-ai

Day 2:前端一天成型

第二天转向前端:React + TypeScript + shadcn/ui。说实话,Vibe Coding 在前端的提速比后端还狠——后端你还得想架构,前端大量工作是纯体力:布局、间距、loading 态、空状态,这些 AI 写得又快又稳。

全文最值钱的一句心得:别描述页面,描述组件。一次只让 AI 写一个组件,prop 接口你先定好。比如搜索框我是这么说的:“一个搜索输入框,输入防抖 300ms,下拉列表显示论文标题和作者,最多 8 条,支持键盘上下键选择”——一次生成,直接可用。而”做一个搜索页面”这种描述,我返工了三次。

整个前端的组件树很小,四个就够:App 下面挂 SearchBar(防抖搜索)、QAPanel(流式问答 + 引用来源)、SourceCard(论文卡片)、HistoryList(历史会话)。QAPanel 的流式渲染 AI 第一版用字符串拼接 innerHTML 实现,我改成了按 token 增量 append 到 state,顺手把 markdown 渲染换成 react-markdown——XSS 这种坑不能留。

量化一下:前端约 840 行,AI 一次生成可用率大概七成,剩下三成是调样式和修响应式。AI 在 390px 宽度的断点上翻了两次车,移动端还是得人肉真机看一眼。

Vibe Coding 不是让你不动脑,而是让你把精力花在更重要的地方 — 产品思考和用户体验。

个人体会

Day 3:集成打磨与复盘

三天开发路线图:Day 1 后端三件套、Day 2 前端组件树、Day 3 集成清单
三天开发路线图:Day 1 完成后端三件套(FastAPI、PostgreSQL、ChromaDB),Day 2 搭出 React 组件树,Day 3 逐项消灭集成清单——SSE 流式、CORS、环境变量与错误处理。

第三天全是”脏活”:前后端联调、错误处理、加载状态、响应式。讽刺的是,这是 Vibe Coding 效率最高的一天——问题描述得越具体,AI 修得越快。三个印象最深的翻车现场:

CORS 配置。AI 生成的 CORSMiddleware 写了 allow_origins=["http://localhost:5173"],看着没问题,但漏了 Authorization header,前端一带 token 预检请求直接 403。我手补了 allow_headers=["*"]。注意:这行只建议本地开发这么写,生产环境必须收紧成明确的 header 列表,别照抄。

SSE 流式响应。AI 第一版直接 return StreamingResponse(generator()),前端 EventSource 连上就断。查了半天发现响应头缺了 text/event-stream。修法两行:StreamingResponse(gen(), media_type="text/event-stream"),前端别用 EventSource(它处理自定义 header 很别扭),改用 fetch + reader 逐块读。

ChromaDB 调优。2 万个 chunk 之后,查询延迟从 80ms 涨到 600ms。两个动作降回 150ms 以内:top-k 从 10 降到 5(人工抽查问答质量,没有肉眼可感的下降),嵌入改批量接口一次送 64 条。向量库的默认参数都是给 demo 准备的,数据量一上来就得动手。

复盘数字:16 小时、约 1460 行代码、AI 生成占 85%、手改约 220 行。上线后实测:问答首字延迟约 1.2 秒(流式输出体感还行),向量检索 p95 约 300ms。这个状态离 production-ready 还差监控、鉴权和限流——那是另一篇文章的事,MVP 先跑起来再说。

最后说适用边界,不单独开标题,就一句话:Vibe Coding 是”副驾驶”不是”自动驾驶”。CRUD、表单、流式问答、管理后台这种标准活,它快得离谱;复杂业务规则、性能关键路径、需要理解底层原理的场景(比如上面那个 SSE 响应头),你不会就修不动。三天能成的真正前提永远是两个:scope 小,你能当裁判。

现在就能动手

01

起后端骨架

pip install fastapi uvicorn sqlalchemy alembic chromadb sentence-transformers,然后 uvicorn app.main:app --reload。检查点:打开 http://127.0.0.1:8000/docs,能看到自动生成的接口文档。

02

定数据模型

先写 SQLAlchemy 模型,MVP 三张表就够:users、sessions、papers。alembic revision --autogenerate 生成迁移。检查点:upgrade / downgrade 都能正常执行。

03

接 RAG 管道

ChromaDB 建 papers collection,分块 500 tokens、overlap 100 写入,写 /api/query 路由。检查点:curl 发一个 query,能返回带 source 字段的 JSON。

04

起前端

npm create vite@latest web -- --template react-ts,装 shadcn/ui。先只写 SearchBar 一个组件,调通 /api/query 再写 QAPanel。检查点:浏览器里搜一次,能看到结果卡片。

05

联调三件套

CORS 把 allow_headers 补齐;SSE 用 fetch + reader 别用 EventSource;ChromaDB 数据量过万后测一次查询延迟。检查点:问答首字延迟 < 2 秒。

常见问题

三天真的能做完一个全栈 AI 应用吗?

能,但做的是 MVP,而且 scope 被砍到只剩骨头:论文检索、摘要、翻译、RAG 问答四件事。用户登录是 stub,没有权限、支付和管理后台。前提是进入”描述需求、验证输出、迭代优化”的循环,而且你得清楚自己在建什么、能判断 AI 生成的代码质量。

Vibe Coding 适合大项目吗?

看部分。CRUD、表单、流式问答、管理后台这种标准化功能,它快得离谱;复杂业务逻辑、性能关键路径、需要深挖底层原理的场景,手写代码仍然不可替代。一个项目里两种模式混着用最实在。

用 Vibe Coding 还需要会写代码吗?

需要,而且要求更高。AI 写的 CORS 漏了 Authorization header、第一版 SSE 缺响应头、ChromaDB 默认参数数据量一大就慢——这些全得人来修。你的角色从”写代码的人”变成”指挥代码的人”,裁判席不能空。

前端描述有什么技巧?

不要试图一次描述整个页面,拆成小组件逐个描述,prop 接口你先定好。“一个搜索框,防抖 300ms,下拉显示论文标题和作者,最多 8 条,键盘可选”一次可用;“做一个搜索页面”返工三次。

RAG 分块参数怎么选?

没有银弹,实测。我试过 1000 tokens 一块,50 个 query 人工抽查 top-1 命中掉了约 8 个百分点,又调回 500 tokens、overlap 100。先跑通,再拿真实 query 抽查,别信默认值。

本篇的 X 速览版

1/ 三天,16 小时,约 1460 行代码,我做出了一个能搜论文、自动写摘要、还能 RAG 问答的全栈 AI 应用。后端 85% 的代码不是我写的。是的,你没看错。

2/ 先说前提:这不是魔法,是 scope 砍到只剩骨头。MVP 只做 4 件事:论文检索、智能摘要、多语言翻译、RAG 问答。用户登录?stub。权限?没有。支付?不存在。

3/ Day 1:后端 6 小时。架构三句话:FastAPI 做路由和编排;PostgreSQL 存用户和会话(关系型查询 SQL 更顺手);ChromaDB 只存向量干语义检索。别用一个库包打天下。

4/ 具体操作:让 AI 先按你的自然语言描述生成 OpenAPI spec,再基于 spec 生成 FastAPI 路由。这一步只花了 30 分钟,接口文档还是自动的(/docs 打开即用)。

5/ Day 2:前端 5.5 小时。最值钱的一句心得:别描述”页面”,描述”组件”。❌“做一个搜索页面”(返工 3 次)✅“搜索框,防抖 300ms,下拉显示标题+作者,最多 8 条,键盘可选”(一次可用)。

6/ Day 3:集成打磨。AI 写的 CORS 漏了 Authorization header,预检直接 403;SSE 第一版缺 text/event-stream 响应头,前端连上就断。结论:AI 负责写,你负责当裁判。

7/ 量化复盘:16 小时 / 约 1460 行 / AI 生成约 85% / 手改约 220 行(类型、边界、异步细节)。上线实测:问答首字延迟约 1.2 秒(流式),向量检索 p95 约 300ms。

8/ ChromaDB 调优:2 万 chunk 后查询从 80ms 涨到 600ms,两个动作降回 150ms 内:top-k 从 10 降到 5(质量无肉眼下降)+ 嵌入改批量接口一次送 64 条。

9/ 适用边界:CRUD、表单、流式问答、管理后台——快得离谱。复杂业务规则、性能关键路径、要懂底层原理的——手写。三天能成的真正前提:scope 小 + 你能判断代码质量。

10/ 完整过程、架构说明、代码片段和”现在就能动手”的命令清单都在博客里:https://citygenius-blog.pages.dev/article/vibe-coding-3-days ——转发给那个总说”没时间做 side project”的朋友。