Updated for Fall 2026
This page outlines the team technical deliverables and activities for Milestone 4.
You’ll start with a workshop that explores a partial solution the the arbitrary ingredients requirements update. You’ll walk you through some initial examples to get you started, and then you’ll implement your own backend design — the persistent classes, the services, the controllers, and the REST API. Then you’ll test the backend using the strategies from the Testing Workshop.
Implementation and testing take longer than design. Plan accordingly. To reflect this, the points available have also increased.
Activity: Team Workshop
You will start Milestone 4 with a workshop that explores adding a composition relationship to the entities in the CoffeeMaker system. This workshop is not a complete implementation of the arbitrary ingredient functionality. Complete it in a branch from development, and do not merge that branch into development or main. Show the branch to your TA during grading to demonstrate completion.
The workshop will help you understand the steps needed to implement arbitrary ingredients, and you are welcome to reuse code where it fits your design.
The sections below should be completed as a team in the team repository.
- Part 0: Process Setup & Recipe Updates
- Part 1: Ingredient Implementation
- Part 2: Recipe Implementation
Activity: Team Design Selection
For Milestone 4 your team implements four use cases:
Your team designed UC5 and UC7 together in Milestone 2. Each of you designed UC2 and UC4 individually. Since the team implements all four, you first have to agree on one design.
Review each teammate’s UC2 and UC4 design and decide which one, or which combination, you are going forward with. Record the result in technical-documents/design-selection-m4.md. For each teammate’s design, list its strengths and weaknesses; if someone did not complete a design, note that. Then describe the design you selected, why, and any modifications you made.
An example of what that document might look like:
# Design Selection - Milestone 4
## Teammate 1 design
+ edit recipe functionality added
- unclear how an ingredient is added to a Recipe
## Teammate 2 design
Missing
## Teammate 3 design
+ relationship between Recipe and Ingredient is well defined
- difference between the inventory of an ingredient and the amount of that
ingredient in a recipe is unclear
## Design Selection
We are moving forward with Teammate 3's design, with edits to X, Y, and Z so
that inventory quantities and recipe quantities are clearly separated.
Once you have selected a design, update technical-documents/backend-design.md so it describes the design you are actually building. The selected design is now the team’s design, and the document should say so. This update is important, especially if you use AI to help with implementation (which you’ll do below).
Activity: Team Technical Deliverables
Before you start this activity, create a branch for the next activity, which will explore AI generation of code and tests for a feature. Then create the branches for this activity and proceed with your own implemenation. The code here should be PR’d into development and then main.
Together with your team, implement and test the backend of UC2, UC4, UC5, and UC7.
You may draw on the team workshop, and reuse code from it. Note that the workshop implementation is not sufficient on its own: its enumerated types do not support dynamic ingredient types when adding or editing recipes.
Your implementation should meet the Done Criteria for all classes associated with UC2, UC4, UC5, and UC7. MakeRecipeService and MakeRecipeController may sit below 60% statement coverage — that functionality is the individual deliverable.
As you implement, you will find places where your design was not sufficient. That is normal and expected. Record those decisions in an Implementation Decisions section of technical-documents/backend-design.md, and update the design itself to match what you built. A design document that no longer describes the system is worse than no design document.
System tests go in technical-documents/system-tests.md, the file you started in Milestone 1. Write at least two system tests for the backend (i.e., start with API calls) for each use case, eight in total, with the actual results of executing them through Postman. Fill in the requirements coverage table while you are there.
Activity: Implementing With AI
After you’ve implemented the design, you will explore an AI implementation of the same design. Create a branch specifically for this task.
Do this as a team, on one use case. UC7 Add Ingredients is a natural choice: it is new code through every layer, so there is something to look at at each level.
Up to now, AI has produced things you then judged — tests, an alternative design, a static page. This milestone it can produce something that ships, with tests behind it. That is genuinely useful and it is where the real risk starts, because generated Spring Boot CRUD is fluent enough to merge without anyone reading it.
The activity is not “can it write this.” It can (this may be dependent on tool). The activity is: can your team stay in control of code it did not write?
Generate
Give your AI assistant three things, in this order:
- the design for UC7 from
technical-documents/backend-design.md— this is the specification - the use case from
technical-documents/requirements.md - an existing class from each layer —
InventoryServiceImplandInventoryControllerare good — as the convention anchor
I am working in a Spring Boot project with a layered architecture: JPA
entities, Spring Data repositories, service interfaces with Impl classes,
REST controllers, and DTOs with mappers between them.
Here is the design I need implemented:
<paste the UC7 section of technical-documents/backend-design.md, including
the endpoint design>
Here is the requirement:
<paste UC7 from technical-documents/requirements.md>
Here are two existing classes; follow their conventions exactly -- package
structure, naming, Javadoc style, and how they handle errors:
<paste InventoryServiceImpl and InventoryController>
Implement the entity, repository, service interface and implementation,
controller, DTO, and mapper for this design. Also write the repository,
service, and controller tests.
That third input is what stops it inventing its own architecture. Without it you will get something that works and looks nothing like the rest of your codebase.
If your team is not using AI, one individual or pair implements UC7 while another individual or pair reviews it against the checklist below without having written it. The review is the graded part either way.
Review before it merges
The teammate who prompted may not approve the pull request. Somebody else reviews it, and that person has to be able to explain what the code does. This is a real control used on real teams, and it is visible in your pull request history, which is where we will look.
Open the pull request, and review it against this checklist:
Does it implement the design?
- Does the code implement the design in
technical-documents/backend-design.md, or a different design? - If it differs, is the difference an improvement, or did nobody notice?
- Is every alternative flow in the use case handled — duplicate name, invalid unit, missing resource — and with the status code the endpoint design specifies?
Architecture
- Does each class stay in its layer? Does the controller reach past the service to a repository? Does the service run its own queries instead of using one?
- Do DTOs cross the API boundary, or do entities leak out of the controller?
- Is the mapping between entity and DTO done in a
*Mapper, rather than by hand in the service? - Does it follow the conventions in the classes that already exist, or invent new ones?
Correctness
- Does it read back what it wrote, where that matters, rather than trusting the object it just saved?
- Are
Optionalreturns handled, rather than assumed present? - Does anything silently swallow an exception?
Tests
- Do the tests assert on behavior, or do they call a method and assert the result is not null?
- Is there a test for each alternative flow, not just the main flow?
- Would any of these tests fail if the method body were deleted and replaced with a hardcoded return?
Craft
- Is every public class and method Javadoced, with the parameters and return described?
- Does
./mvnw checkstyle:checkpass? - Are the names intention-revealing, and consistent with the rest of the codebase?
- Is there dead code, unused imports, or commented-out blocks left behind?
Two of these deserve particular attention, because they are where generated backend code fails most often:
- Alternative flows. Generated code implements the main flow beautifully and quietly skips “what if the name is a duplicate.” Check the use case, not the code.
- Tests that cannot fail.
assertNotNull(result)after a save passes whether or not anything was persisted. Ask of each test: would this fail if the method body were replaced with a hardcoded return?
Deliverable: technical-documents/code-review-m4.md, containing
- which use case you generated and the prompt you used
- who prompted and who reviewed
- every finding from the checklist, with accept or reject and a justification for each rejection
- what changed before the pull request merged
- a link to the pull request
You may keep as much or as little of the generated code as you like. What is graded is the review, that a person read it, found the real problems, and can account for what shipped.
Activity: Independent Technical Deliverables
Integrate your team’s implementation and tests into your individual CoffeeMaker project. We suggest doing this on the file system; IntelliJ will pick up the new files automatically. If it doesn’t, use File > Reload All from Disk (Ctrl+Alt+Y) and reload the Maven project.
Then, individually, implement and test [UC6] Order Beverage.
Your implementation should meet the Done Criteria for all classes associated with UC2, UC4, UC5, UC7, and UC6.
- At least two system tests for UC6 in
technical-documents/system-tests.md, with actual results of execution through Postman. - No regression in the functionality your team delivered.
Then complete the AI Defect Injection Activity against the UC6 code you just wrote, and write technical-documents/backend-design-reflection.md: reflect on your team and individual backend designs and implementations, what changed during implementation, and how the team’s design of UC2, UC4, UC5, and UC7 shaped your implementation of UC6.
Done Criteria
The done criteria are considered on a use case basis.
- Issue for each feature, with an owner
- Commits include the issue number
- Feature branch for each feature, with an owner
- Feature branch merged into
developmentand then intomain - Passing unit and integration tests, run locally from the
mainbranch - At least 60% statement coverage, demonstrated by running tests for coverage locally on the
mainbranch - Two passing system tests for each use case, documented in
technical-documents/system-tests.mdand demonstrated through Postman on themainbranch - Code is fully Javadoced
If you demo your functionality on a branch other than main, we will grade what you have, but there will be a deduction for not merging to main.
Next Steps
Head back to the Milestone 4 Overview for the individual portion of the project, and don’t forget Peer Evaluation 1 by the team deadline.
