Updated for Fall 2026
This workshop is part of Milestone 2 — see that page for the milestone’s deliverables, rubric, and deadlines.
In this workshop you and your team will design the backend of the arbitrary ingredients functionality in three views: the UML class diagram (static design), the UML sequence diagram (dynamic design), and the REST API.
Right now there are only four possible ingredients in a recipe — coffee, chocolate, milk, and sugar — and the requirements have been updated so that users can add ingredients of their own. All hardcoded ingredients should be removed; if a user wants coffee, they add it like any other ingredient. The restriction on the number of recipes has also been lifted.
Your team designs the ingredient and inventory side:
You will design how recipes change individually, after this workshop. UC6 Order Beverage will need code changes, but its existing design is likely sufficient.
Before you start, read Backend Design, which describes the system as it exists today, and follow the setup steps in Set Up Your Technical Documents to bring the updated requirements and the design reference into your team repository.
Getting Started
Follow the same processes you would for code. The design documents are deliverables and get the same treatment:
- Create an issue for each design task, with an owner and a description. As per the CSC 326 Issues Process, the issue should describe what is being designed and which use case it comes from.
- Create a branch off
developmentfor the design work, namedunityID/branchName. - Commit your diagrams and document changes to that branch, referencing the issue.
- Open a pull request into
developmentwhen the work is ready for your teammates to review.
Everything you produce this week goes in technical-documents/backend-design.md and technical-documents/images/ in your team repository. Update the document you copied in; do not start a new one. There should be one current description of the backend, and this is it.
Drawing the Diagrams
You have two options, and your team should pick one and use it consistently:
UMLetino is a free online UML tool; the standalone UMLet application reads and writes the same .uxf files, so you can move between them. Download the CoffeeMaker UXF file, use “File Import” in UMLetino to open it, and modify the diagram from there. Hit “Save” to keep changes in your browser, and use “File Export” when you are done. Export both a PNG and a UXF — commit the PNG to technical-documents/images/ so the document renders, and the UXF so you can edit the diagram later.

The sequence diagram from the design reference is at coffee_maker_sequence.uxf if you want to start from it.
Mermaid lets you write class and sequence diagrams as text inside the markdown file, and GitHub renders them. It takes a little longer to learn and gives you less control over layout, but the diagram then shows up in pull request diffs and your teammates can edit it without a tool. The Mermaid app is experimental for the class. You should be able to complete the Milestone 2 activities using the free version. There is an IntelliJ plug-in for workspace integration.
Static Design - Class Diagram
Start from the current class diagram and modify it to cover the new requirements. (We don’t have a starting diagram in Mermaid’s format. If you want to use that tool, you’ll need to create the starting diagram and then make modifications as you update your design for the new requirements.)
Look at UC7 Add Ingredients first. The database currently has tables for Recipe and Inventory, and we now need to store ingredients that the user defines, which suggests a new class in the entity package — Ingredient is a reasonable starting point. A new entity brings a set of companions with it: the corresponding Repository, Service, ServiceImpl, Controller, Dto, and Mapper classes. See Adding New Persistence Classes.
Think carefully about two questions, because they are where designs diverge:
- How do you track what an ingredient is separately from how much of it is in inventory?
- What happens to the four hardcoded fields on
Inventorywhen ingredients are arbitrary?
Focus on ingredients and inventory. Recipes are the individual task.
Deliverable: the Static Design section of technical-documents/backend-design.md, containing
- your team’s class diagram
- a text description summarizing your design changes and why your design will lead to a successful implementation of the arbitrary ingredient functionality
Dynamic Design - Sequence Diagram
Identify one scenario for the new arbitrary ingredient functionality and create a sequence diagram that models the flow of control for the scenario’s execution. Make sure you are calling methods that are in your static design — a sequence diagram that calls methods you never designed is the most common finding in a design inspection, and it is worth catching yourselves.
Deliverable: the Dynamic Design section of technical-documents/backend-design.md, containing
- your team’s sequence diagram
- a text description of the scenario you selected
- a text description of why your dynamic design would lead to a successful implementation of the arbitrary ingredient functionality for that scenario
End Point Design - REST API
Some of the actions in the requirements are things a user performs through the web application — adding a new ingredient, listing the existing ingredients, updating inventory for an arbitrary ingredient, so the API needs endpoints for them.
Document every endpoint you add or change. Each one needs the name of the function, the relative URL, the HTTP verb, a description, and the data details for input and output, including the JSON body for POST and PUT routes and the response status codes for the alternative flows. See End Point Design for the format.
Deliverable: the End Point Design section of technical-documents/backend-design.md, documenting each added or updated endpoint.
Activity: Designing With AI
Do this after your team has a complete design in all three views. The order matters: this activity is about comparing your design to another one, and you need a design of your own first.
A design is a set of decisions, and the trouble with a design you made together is that by the end you cannot remember which decisions were actually decided and which ones just happened. An independently produced alternative is a cheap way to find out.
Generate an Alternative
Working together, in one sitting, ask your AI assistant to design the same functionality from the requirements — without showing it your design.
Here are two use cases from the requirements for a Spring Boot coffee
ordering system:
<paste UC5 and UC7 from technical-documents/requirements.md>
The system uses a layered architecture: JPA entities, Spring Data
repositories, service interfaces with implementations, REST controllers,
and DTOs with mappers between them. It currently has Recipe and Inventory
entities, where Inventory has fixed fields for coffee, milk, sugar, and
chocolate.
Design the backend to support these use cases. Give me a class diagram in
UMLetino/Mermaid, a sequence diagram in UMLetino/Mermaid for one scenario, and the REST
endpoints with verbs, URLs, request and response bodies, and status codes.
Reivew the generated diagram and identify any places where you disagree with the design or have questions about why a decision was made. Ask the AI tool to explain a decision: “why did you model inventory quantity on the ingredient rather than in a separate table?” and determine, as a team, whether the reason holds up.
If you don’t have an AI tool set, you can use an online tool like Google Gemini.
Compare and Decide
Put your team’s design side by side with the AI generated design and identify where they genuinely differ. Ignore naming and layout; look for structural differences, such as:
- where the quantity of an ingredient lives on the ingredient or on the inventory,
- whether adding an ingredient and stocking it are one endpoint or two
- how the alternative flows, like duplicate names, invalid units, are reported to the client
For each real difference, decide, as a team, which approach you are going with. It is fine to keep your own design; it is fine to adopt the alternative; it is fine to end up with a third option that came out of the argument. What is not fine is not noticing the difference.
Deliverable: technical-documents/design-alternatives-m2.md, containing
- the alternative design, or the relevant parts of it
- a table of the structural differences you found
- for each difference, what your team decided and the reason for the decision. This should be a technical reason or a business reason, not “we liked ours better”
Apply anything you decided to change to technical-documents/backend-design.md before the team deadline.
Be honest about what happened. A finding of “the alternative was worse in every way and here is why” is a perfectly good result, and so is “it caught something we had all missed and here is why”
Integrate
Your design work should now be complete. As with code:
- Commit your changes on the design branch.
- Open a pull request to merge into
development, and have a teammate review it. A design pull request is worth reviewing carefully; this is the cheapest point at which to disagree. - Merge
developmentintomain.
Next Steps
Head back to the Milestone 2 Overview and work on the individual portion of the project: designing UC2 Add Recipe and UC4 Edit Recipe for arbitrary ingredients, and then the AI Design Review Activity.
