-
Notifications
You must be signed in to change notification settings - Fork 0
System Modeling with Unified Modeling Language (UML)
This document summarizes key concepts from our System Modeling with UML lecture and shows how we can apply them to the Affordable & Healthy Eating Hub project. By defining system boundaries, actors, interactions, and internal structures, we can better understand and communicate our overall system design.
System modeling uses abstract representations (models) to describe:
- The system context and environment (what is inside vs. outside),
- The way different parts of the system interact,
- The structure of data and components in the system,
- The behavior of the system and its responses to events.
Benefits for our Affordable & Healthy Eating Hub:
- Clarifies project scope (what features are inside our platform, and what external services we might integrate),
- Helps the team and stakeholders (dietitians, store owners, developers, testers) understand and discuss requirements,
- Serves as a reference during development for verifying features.
UML (Unified Modeling Language) offers several diagram types. Here are the ones we are most likely to use:
-
Context Diagram (informal or UML-based)
- Shows high-level boundaries and external systems.
-
Use Case Diagram (behavioral/interaction)
- Illustrates interactions between actors (people or other systems) and the system.
-
Class Diagram (structural)
- Depicts classes, attributes, and relationships (associations, inheritance, etc.) among classes.
-
Sequence Diagram (interaction)
- Details object interactions over time for a specific use case or scenario.
-
Activity Diagram (behavioral)
- Shows process flows, decisions, and concurrency (fork/join).
-
State Diagram (behavioral)
- Portrays the states a system or component can be in, and transitions between those states.
Below, we describe each diagram briefly and provide examples relevant to our project.
A context diagram illustrates the system as a single box (our platform) and the external entities with which it interacts. This helps define what’s inside (Affordable & Healthy Eating Hub) and what’s outside (e.g., external payment gateways, local store APIs).
Example (informal notation):

In our case, major external actors might be:
- User (general consumer, dietitian, store owner),
- Local Grocery API (if we decide to fetch real-time pricing),
- External Payment Gateway (if we handle online payments).
A Use Case Diagram describes what the users (actors) can do with the system and which features the system provides in response. It’s especially helpful during requirements elicitation.
- General User: Can search recipes, view meal plans, create shopping lists.
- Dietitian: A special user who can post nutrition tips, share verified advice.
- Store Owner: A user who lists products (grocery options) and manages inventory.

Each use case can be further detailed with a Use Case Description:
- Actor: Who is involved.
- Description: High-level overview of the task.
- Stimulus: Trigger event (e.g., user clicks “Search”).
- Response: System response (e.g., displays matching recipes).
- Comments: Additional notes or constraints.
A Class Diagram shows the static structure of the system by detailing classes, their attributes, and their relationships.
A possible conceptual diagram for some core entities:

-
User
- Attributes:
username
,email
,passwordHash
,allergies
, etc. - Relationships: can create Post items.
- Attributes:
-
Post (general forum post)
- Attributes:
postID
,content
,creationDate
, etc.
- Attributes:
-
Recipe inherits from Post
- Additional Attributes: list of Ingredients, steps, cost breakdown, nutrition info.
-
Dietitian, Store Owner might be specialized types of User.
-
Ingredient
- Attributes:
name
,nutritionScore
,cost
, etc.
- Attributes:
A Sequence Diagram focuses on how objects (or actors) interact step by step over time. It’s especially useful for showing the flow of data for specific use cases.
- User selects “Create Meal Plan.”
- System fetches user’s allergies and budget.
- System suggests possible recipes.
- User finalizes selections and saves the meal plan.
A textual representation might look like this:

An Activity Diagram describes a flow of actions, decisions, and possible parallel steps.

A State Diagram shows how an entity moves between states based on events. For example, a Post might transition from Draft → Published → Reported → Removed or Resolved.

-
Decide on a Modeling Scope
- We don’t need to model everything. Focus on critical or complex processes, like meal planning or inventory management.
-
Keep Diagrams Understandable
- Use short labels, limit diagram size, and add textual explanations.
-
Refine Diagrams Iteratively
- Start with high-level overviews and add details (e.g., method calls, data flows) over time.
-
Update the Glossary
- Refer to the Glossary page for consistent terminology (e.g., “Recipe,” “Nutrition Score,” “Grocery Option,” “Allergy”).
- Continue adding or revising terms as the system evolves to ensure alignment within the team.
Modeling the Affordable & Healthy Eating Hub using UML diagrams helps our entire team—from developers to dietitians—visualize the system’s structure and behavior. These diagrams serve as a blueprint for discussing requirements, refining designs, and ensuring everyone has a shared understanding of how features fit together.
If you have feedback or terms that need further explanation, please contribute to the Glossary section in our repository. After review and final approval, we will integrate the glossary into the main requirements page.


-
Use Cases:
- Template
- Scenario 1: Community Sharing
- Scenario 2: For a Dietitian
- Scenario 3: Maintaining a Personal Inventory (as a Producer)
- Scenario 4: Proposing a Product and Adding a Recipe to Weekly Meal Plan
- Scenario 5: Creating a Meal Plan
- Scenario 6: Resetting Password
- Scenario 7: Moderator Actions
- Scenario 8: Searching for and Proposing a New Food Item
- Scenario 9: Budget-Conscious Grocery Shopping
- Scenario 10: Creating a New Store
- Scenario 11: User Profile Management
- Git: In a Nutshell
- Example GitHub Repositories
- System Modeling & UML
- Frontend Tutorial
- Frontend Roadmap
- Frontend Styling Guide
- Docker Summary
- Writing Endpoints
- Yusuf AKIN
- Arda SAYGAN
- Fatih Furkan Bilsel
- Berk GOKTAS
- Berkay BILEN
- Yusuf Anıl YAZICI
- Taha Topaloglu
- Nuri Basar
- Onur Kucuk
- Hasancan Keles
- Mete Damar