◀ Title screen◀ All entries
  • Concept → launch
  • Django REST + React + MySQL
  • containerized on AWS
  • validated LLM output

The problem

A new product with no code yet, and two jobs at once: build the app itself, and make its AI features dependable enough to ship. An LLM demo is easy. An LLM feature that behaves the same way on the thousandth request is not.

The app: boring on purpose

I owned the architecture from the first sketch to launch, and the rule was to keep every part ordinary so the hard thinking could go into the product.

  • Django REST backend. One API that every client talks to, so the frontend never knows how the data is stored.
  • React frontend. A separate app that only speaks to that API.
  • MySQL schema designed up front. The tables were planned around what the product needed to answer, before the screens were built, because a schema is the most expensive thing to change later.
  • Containers on AWS. The same image runs on a laptop and in production, so "it works on my machine" stops being an excuse.
text
React app ──▶ Django REST API ──▶ MySQL
                    │
                    └──▶ LLM pipeline ──▶ checked result

The LLM part: a pipeline, not a prompt

Calling a model with one big prompt and showing whatever comes back is how AI features embarrass you. Each feature became a short pipeline instead:

  1. Build the context. Give the model only what this task needs, in a fixed structure. Less noise, more consistent answers.
  2. Ask for a fixed shape. The model answers in a known format, not free text.
  3. Validate before use. The answer is checked against that format and the feature's rules.
  4. Handle failure on purpose. An answer that fails the checks never reaches the user as if it were fine.

Why guardrails in code beat guardrails in prompts

"Please always answer in this format" works most of the time, which is exactly the problem. Prompt instructions make good answers more likely. Validation in code makes bad answers visible. You need both, but only the second is a guarantee.

Takeaway

Keep the app plain and put the effort where the risk is. A standard stack got the product to launch, and wrapping every LLM call in context, a fixed shape and validation is what made the AI features safe to put in front of real people.

Building something like this? Send a message ▶