|
1 | | -# project2-t-03 |
| 1 | +# Coffee Maker Application |
| 2 | + |
| 3 | +## Table of Contents |
| 4 | + |
| 5 | +- [Introduction](#introduction) |
| 6 | +- [File/Folder Structure](#filefolder-structure) |
| 7 | +- [Application Components](#application-components) |
| 8 | +- [How to Run](#how-to-run) |
| 9 | +- [Testing](#testing) |
| 10 | +- [Contributing](#contributing) |
| 11 | +- [License](#license) |
| 12 | + |
| 13 | +## Introduction |
| 14 | + |
| 15 | +The Coffee Maker Application is a Java-based software system designed to simulate a coffee maker. It allows users to update inventory, add a recipe, edit recipes, delete recipes, make coffee, add ingredients, and to do so through a web-based interface. |
| 16 | + |
| 17 | +## File/Folder Structure |
| 18 | + |
| 19 | +The project is organized into the following files and folders: |
| 20 | + |
| 21 | +- `.github`: GitHub-specific configuration files. |
| 22 | +- `CoffeeMaker`: The main project folder. |
| 23 | + - `.mvn/wrapper`: Maven wrapper files for project setup. |
| 24 | + - `src/main`: The main source code directory. |
| 25 | + - `java/edu/ncsu/csc/CoffeeMaker/controllers`: Controllers for handling web requests. |
| 26 | + - `APICoffeeController.java`: Controller for coffee-related API operations. |
| 27 | + - `APIController.java`: General API controller. |
| 28 | + - `APIIngredientController.java`: Controller for ingredient-related API operations. |
| 29 | + - `APIInventoryController.java`: Controller for inventory-related API operations. |
| 30 | + - `APIRecipeController.java`: Controller for recipe-related API operations. |
| 31 | + - `MappingController.java`: Mapping controller. |
| 32 | + - `models`: Model classes representing domain objects. |
| 33 | + - `DomainObject.java`: Base class for domain objects. |
| 34 | + - `Ingredient.java`: Represents an ingredient. |
| 35 | + - `Inventory.java`: Represents the inventory of ingredients. |
| 36 | + - `Recipe.java`: Represents a coffee recipe. |
| 37 | + - `repositories`: Data repositories for interacting with the database. |
| 38 | + - `IngredientRepository.java`: Repository for ingredients. |
| 39 | + - `InventoryRepository.java`: Repository for inventory. |
| 40 | + - `RecipeRepository.java`: Repository for recipes. |
| 41 | + - `services`: Service classes for business logic. |
| 42 | + - `IngredientService.java`: Service for ingredient-related operations. |
| 43 | + - `InventoryService.java`: Service for inventory-related operations. |
| 44 | + - `RecipeService.java`: Service for recipe-related operations. |
| 45 | + - `Service.java`: Base service interface. |
| 46 | + - `CoffeeMakerApplication.java`: Main Spring Boot application class. |
| 47 | + - `resources`: Configuration and static resource files. |
| 48 | + - `static/css`: CSS stylesheets. |
| 49 | + - `templates`: HTML templates. |
| 50 | + - `application.yml.template`: Application configuration template. |
| 51 | + - `test/java/edu/ncsu/csc/CoffeeMaker`: Unit and integration tests. |
| 52 | + - `api`: API tests. |
| 53 | + - `common`: Common test utilities. |
| 54 | + - `unit`: Unit tests for various components. |
| 55 | +- `.gitignore`: Git ignore file. |
| 56 | +- `pom.xml`: Maven project configuration file. |
| 57 | +- `images`: Images related to the project (e.g., diagrams). |
| 58 | +- `README.md`: This README file. |
| 59 | + |
| 60 | +## Application Components |
| 61 | + |
| 62 | +The Coffee Maker Application consists of several components, including: |
| 63 | + |
| 64 | +- **Controllers**: Handle incoming HTTP requests and manage routing. |
| 65 | +- **Models**: Represent the core data structures of the application. |
| 66 | +- **Repositories**: Provide data access methods to interact with the database. |
| 67 | +- **Services**: Handles CRUD operations performed on models. |
| 68 | +- **HTML Templates**: Define the structure of web pages. |
| 69 | +- **CSS Stylesheets**: Define the application's styling. |
| 70 | +- **Unit and Integration Tests**: Ensure the application functions correctly. |
| 71 | + |
| 72 | +## How to Run |
| 73 | + |
| 74 | +To run the Coffee Maker Application: |
| 75 | + |
| 76 | +1. Clone the repository to your local machine. |
| 77 | +2. Open the project in your preferred IDE. |
| 78 | +3. Build the project and resolve any dependencies. |
| 79 | +4. Run the `CoffeeMakerApplication.java` class to start the application. |
| 80 | +5. Access the application in a web browser at `http://localhost:8080`. |
| 81 | + |
| 82 | +## Testing |
| 83 | + |
| 84 | +The project includes unit and integration tests located in the `test` directory. You can run the tests to ensure the correctness of the application's components and functionality. |
0 commit comments