The thesis
Most stack debates optimise for the wrong thing: how quickly you can build a demo. That is a real cost, but it is paid once. The costs paid every week for years are different — onboarding a new developer, changing a feature nobody remembers writing, diagnosing a slow endpoint at 2 a.m., and upgrading dependencies without breaking production.
This stack is unusually good at those, for one reason that runs through all four choices: nothing important is hidden. The SQL is visible. The types are checked end to end. The framework's decisions are inspectable. The database is honest about what it is doing.
Pick this stack when the application will outlive the team that wrote it. Pick something lighter when it will not.
The four choices in one table
| Layer | Choice | The one-sentence reason | Full case |
|---|---|---|---|
| Front end | Angular | A complete, versioned framework means two teams write the same code, and upgrades are a command rather than a project. | Read → |
| Application | Spring Boot | The JVM's throughput and tooling, with the configuration already done and the best observability story in the industry. | Read → |
| Data access | MyBatis | You keep the SQL, so performance is something you control rather than something you discover. | Read → |
| Database | PostgreSQL | One engine that does relational, JSON, full-text, geospatial and queues — correctly, and for free. | Read → |
Why they fit together
Any four technologies can be made to work. These four reinforce each other in specific ways.
-
Types run the whole way down
A PostgreSQL
numeric(12,2)becomes a JavaBigDecimalthrough a MyBatis type handler, is serialised by a typed DTO, and arrives in Angular as anumberon a declared interface. Rename a column and the build breaks in three places before a user ever sees it — which is exactly what you want. -
The database boundary is explicit
MyBatis makes the SQL a first-class artifact. That means a PostgreSQL feature —
JSONBcontainment, a window function,ON CONFLICT, aMERGE— is just something you write. With a generating ORM those features live behind a native-query escape hatch, so teams avoid them and reimplement them badly in Java. -
One transaction, one boundary
Spring's
@Transactionalwraps MyBatis mappers with no special configuration. The unit of business work and the unit of database work are the same thing, declared in one place. -
Observability that reaches the SQL
Actuator and Micrometer give you request latency; a MyBatis interceptor gives you
per-statement timing; PostgreSQL's
pg_stat_statementsgives you the same query from the database's point of view. Three views of one request, correlated by a trace id. - Everything runs in one container each An Angular bundle behind nginx, a Spring Boot jar, and a managed Postgres. Three moving parts, no message broker or cache required until you actually need one.
How it compares
When this is the wrong stack
Recommending a stack for every problem is how you lose credibility. This one is a poor fit for at least five common cases.
| If you are building… | Use instead | Because |
|---|---|---|
| A content or marketing site | Astro, Next.js, Hugo | You need SEO and fast first paint, not a client-side application |
| A weekend prototype or a hackathon | Rails, Django, Supabase | Scaffolding speed dominates; the ten-year view is irrelevant |
| Spiky, mostly-idle workloads | Serverless functions | A JVM that idles all night costs money for nothing |
| A team of two who all know JavaScript | Node + TypeScript | One language beats a marginally better runtime |
| A pure CRUD admin over a schema you own | Spring Boot + JPA | Hibernate's automation genuinely saves work when the model is simple |
Three objections worth answering
"Angular is dying — everyone uses React."
React has a larger share and always will; it started earlier and has a lower barrier to entry. That is not the same as Angular declining. It ships a major release every six months, it is what most large enterprises standardise on, and signals plus standalone components removed the specific complaints people had. Hiring is not a problem at the scale most companies operate.
"Writing SQL by hand is a step backwards."
The alternative is not "no SQL" — it is SQL you did not write and cannot see. Every team that adopts a generating ORM eventually learns to read its generated SQL anyway, usually during an incident. MyBatis moves that learning to the start, where it is cheap. See the full argument.
"Java is verbose and slow to develop in."
Java 17–21 has records, sealed types, pattern matching, text blocks and virtual threads. The verbose Java people remember is Java 8 with XML configuration. What remains is explicitness — which reads as verbosity in a tutorial and as clarity in a 200,000-line codebase maintained by people who did not write it.
Where to go next
Why Angular
The framework-versus-library argument, and what it costs.
Why Spring Boot
Why the JVM is still the default for serious backends.
Why MyBatis
Owning your SQL without owning the boilerplate.
Why PostgreSQL
The database that keeps making other infrastructure unnecessary.
Build it
An order management system using all four, end to end.
Ship it
Containerise the whole stack and deploy it to the cloud.