This project is a simulation of a Snacks Vending Machine built using Spring Boot and Angular frameworks. The aim of the project is to demonstrate the design and implementation of a vending machine system that allows users to select snacks and make payments using a digital platform.
The backend of the system was developed using Spring Boot, a Java-based framework that provides a robust and scalable infrastructure for building enterprise-level applications. The backend was designed with a focus on modularity, extensibility, and maintainability, and adheres to the principles of object-oriented programming.
To provide a clear understanding of the system's architecture and design, a UML diagram was created to represent the backend's structure. The UML diagram displays the various classes and their relationships, including controllers, services, repositories, and models.
The frontend of the system was developed using Angular, a TypeScript-based framework that provides a powerful set of tools for building dynamic web applications. The frontend was designed with a clean and intuitive user interface, allowing users to select snacks, make payments, and receive their orders seamlessly.
To ensure the system's reliability and functionality, a suite of unit tests was added to the project. The unit tests cover various aspects of the system, including the backend's controllers, services, and repositories, as well as the frontend's components and services.
- Put top-level design
- Use websockets to exchange process messages instead of using HTTP requests to lock resourses in the vending machine
- Enhance code documentation
- Add REST API documentation using Swagger
- Enhance UI/Ux
- Increase unit testing coverage
- Add unit tests to frotend application
- Add e2e tests
- Models
- Services
- Controllers
- Objects Factory
To install and run this project locally, please follow the instructions below:
- Clone the repository to your local machine:
git clone <repository-url>
- Navigate to the backend directory and build the project using Maven:
cd vending_machine_simulator-backend
mvn clean install
- Start the Spring Boot server:
mvn spring-boot:run
- Navigate to the frontend directory and install the dependencies:
cd vending-machine-simulator-frontend
npm install
- Start the Angular server:
ng serve
- Open your web browser and navigate to http://localhost:4200