What we are building
An internal order management tool — the kind of application that actually gets built in industry. Operators search orders, open one, change its state, and create new orders. It is small enough to finish and realistic enough to teach something.
Search & list
Server-side paging, six optional filters, sorting, and a CSV export.
Order detail
Header, lines, payment, shipment and an audit timeline of every state change.
Create & edit
A multi-step reactive form with line items, live totals and server-side validation.
State transitions
Place, pay, fulfil, cancel and refund — each guarded and audited.
Roles
Viewer, operator and admin, enforced on the API and reflected in the UI.
Operations
Health probes, metrics, structured logs and a transactional outbox.
The architecture
The domain rule that shapes everything
An order is a state machine. Almost every requirement — which buttons appear, which API calls are allowed, what gets audited — falls out of this one diagram.
Chapters
Domain and schema
Aggregates and invariants, the PostgreSQL schema with real constraints, enums, the outbox table, indexes, and Flyway migrations.
02MyBatis persistence
Mapper interfaces, result maps for the order aggregate, dynamic search SQL, keyset paging, optimistic locking and batch inserts.
03Service layer and REST API
Transaction boundaries, the state machine, DTOs and validation, ProblemDetail errors, and the transactional outbox.
04Authentication and roles
JWT issuance and validation, the filter chain, method security, and testing every role against every endpoint.
05The Angular application
Routing and guards, a signal store, the search screen, the detail view, the create form, and the auth interceptor.
NextContainerise and deploy →
Docker images for both applications, Compose for local development, and a real cloud deployment.
Repository layout
oms
├── docker-compose.yml
├── api/ Spring Boot + MyBatis
│ ├── pom.xml
│ ├── Dockerfile
│ └── src/main
│ ├── java/com/bitsnippets/oms
│ │ ├── OmsApplication.java
│ │ ├── order/ the aggregate: domain, mapper, service, controller
│ │ ├── customer/
│ │ ├── product/
│ │ ├── security/
│ │ └── common/ errors, config, outbox
│ └── resources
│ ├── application.yml
│ ├── db/migration/ V1__init.sql, V2__outbox.sql …
│ └── com/bitsnippets/oms/order/OrderMapper.xml
└── web/ Angular
├── package.json
├── Dockerfile
├── nginx.conf
└── src/app
├── core/ auth, http interceptors, models
├── features/orders/ list, detail, form, order.store.ts
└── shared/
The API contract changes on both sides at once. A single repository means one pull request, one review and one CI run for a change that spans both — which is worth far more than the theoretical independence of separate repos until you have separate teams.
Before you start
| Requirement | Version | Covered in |
|---|---|---|
| JDK | 21 | Spring Boot ch. 2 |
| Node | 20 LTS | Angular ch. 2 |
| Docker | Recent | Deployment course |
| PostgreSQL | 16, via Docker | PostgreSQL ch. 1 |
You do not need to finish the four courses first. Each chapter links back to the relevant one when it introduces something new.