From frontend to full stack: how to review a backend feature like a backend developer
The author, who has moved from frontend to full stack, says that AI tools make backend code easy to produce, but developers still need backend thinking to see how it fails in production. The example is an order-placing feature: a Spring Boot endpoint generated from one prompt checks stock, reduces it, creates the order and sends an SMS. It works in the normal flow, but the author says it can create two orders when a user clicks twice, or sell more than the stock when many people buy at once. The article calls the protection against this idempotency[1].
The article lists 12 backend thinking points in three groups: data must stay correct, the service must handle load, and failures must be survivable. For data, it advises storing the product name and price at the time of purchase, keeping money in DECIMAL or whole cents rather than floating-point numbers, and not exposing auto-increment IDs in URLs. The server must also check on every request that the data belongs to the current user and take the user ID from the token rather than the request, otherwise horizontal privilege escalation[2] is possible. Because one server process runs for weeks and all requests share memory, CPU and database connections, and production usually runs several instances, the service must be stateless[3], so sessions and uploaded files cannot live on a single machine.
The article mainly covers single-service, mid-sized systems; at large companies these functions are usually built as shared platform components. It ends with a checklist of the 12 points for reviewing AI-written backend code.
Discussion
One commenter says they are willing to go full stack but do not want to write Java, and asks whether Node, Go or Rust is better. Another comment just says the article is long. No one answers the language question.
Sources
-
CNJuejin ZH
前端转全栈,要学会后端看项目的思维


