做产品 PMaker
空格的键盘
浏览器
我的订单
前端
请求
→
←
响应
服务器
GET /api/orders
校验登录态
查这个人的订单
200 [ …12 条 ]
后端
查
→
←
数据
数据库
iduseramount
2048u_31124.00
2047u_3138.80
2046u_88271.50
存储

你在屏幕上看到的每一条数据,都走过这条路。理解这张图,就够跟 AI 和工程师对话了。

Understanding Technology

You don't need to write code, but you do need to know which layer something happens on. Confuse the layers and your needs won't land—and the errors you see will be unreadable.

After reading, you can answer
  • 「这个改前端就行」和「要动后端」的区别在哪
  • 为什么登录状态会莫名其妙掉,token 是个什么东西
  • AI 写的代码里,哪几个地方是安全隐患的高发区

Frontend and backend

One-sentence dividing line: anything changeable in the user's browser is frontend; anything that has to compute on your server is backend. Anything involving money, permissions, or someone else's data always lives on the backend.

这件事在哪一层为什么
按钮改个颜色前端纯展示,跟数据无关
列表加个筛选前端后端数据量小前端筛,量大要后端出接口
判断能不能删后端前端的判断能被绕过,权限必须在后端拦
算价格和优惠后端前端算的价格用户能改,这是常见的漏洞
页面加载慢看情况可能是图片太大(前端),也可能是查询太慢(后端)
Before letting AI run a database script for you, confirm which environment it's connected to. This is the single step in vibecoding most likely to cause irreversible damage.

How login works

Login isn't "verify once and done." It's "verify once, then carry a token on every request after."

用户这边 服务器这边 账号 + 密码 核对,签发凭证 存下 token 之后每次请求都带上它 验凭证,认人 只在登录这一次传密码
Before letting AI run a database script for you, confirm which environment it's connected to. This is the single step in vibecoding most likely to cause irreversible damage.

What a database looks like

Just tables. Each table stores one kind of thing, and tables relate to each other by id. When you sketch a data model, this is what you're drawing.

users 表
idnamecreated_at
u_31李明2026-03-04
u_88王芳2026-05-19
orders 表
iduser_idamountstatus
2048u_31124.00已付
2047u_3138.80待付
Before letting AI run a database script for you, confirm which environment it's connected to. This is the single step in vibecoding most likely to cause irreversible damage.

Deployment and environments

The same code runs in three places. When something breaks, first ask which one.

环境谁在用数据是真的吗
本地只有你自己假数据,随便删
预发你和少数几个人验收接近真实,但删了不心疼
线上所有真实用户真的,删了就没了
Before letting AI run a database script for you, confirm which environment it's connected to. This is the single step in vibecoding most likely to cause irreversible damage.

Six security basics

AI-generated code fails most often in these six spots. Give them a scan after every generation.