r/AskProgramming • u/JaseciLabs • 3d ago
Architecture We counted 12 notations in a pretty standard React/FastAPI/Postgres setup. Where do you draw the line on seams?
Take a pretty standard stack for a task manager with an AI feature: React and TypeScript, FastAPI, Postgres with an ORM and migrations, Redis doing double duty as cache and Celery broker, a hosted LLM API, all of it in Docker with GitHub Actions, Terraform and Kubernetes around it. Nothing weird, every piece is the usual choice for what it does.
If you tally what someone has to read to work in that repo, it comes to twelve notations. Four carry logic (TypeScript, Python, SQL, shell in CI), two are presentation (JSX and CSS) and six are config (JSON, TOML, three unrelated YAML schemas, Dockerfile, HCL, dotenv). That's an undercount, since it leaves out the ORM's query language and the prompt templates that are half English and half JSON.
What bothers us more than the number is what happens to a single click. "Prioritize my tasks" goes from a TypeScript handler to a generated client, then JSON over HTTP, a Python route, schema validation, a queue job, a prompt, the model, a parsed reply, an ORM write, and finally a cache invalidation where the key is just a string two codebases agree on because people remember to. By our count that's at least eight times the same intent changes shape, and no compiler sees both sides of any of those changes.
We'd put the real cost in the crossings, not in any single tool. Each one is two descriptions of the same thing that humans keep in sync by hand, so each side can pass its own tests while the pair is wrong. That's probably why drift bugs get through review and CI so reliably. We suspect a lot of it is inherited convention and not something the problem requires.
Full disclosure, this is the exact question our founder, Jason Mars, spent about a decade on. Jac, the language he created, is where he landed: one language and one type checker across the frontend, backend and data layer, so those seams are the compiler's problem and not yours. We're more curious about the other side of it, though.
Where do you draw the line? Do you accept the seams and put your effort into contract tests and codegen, or have you found ways to cut down how many there are?