GithubHelp home page GithubHelp logo

zoeque / limitchecker-spring-boot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 414 KB

The web application that notify the expiration date of food items. DDD + clean architecture with Java.

License: MIT License

Java 85.79% JavaScript 0.56% HTML 0.46% CSS 2.46% TypeScript 10.73%

limitchecker-spring-boot's Introduction

LimitChecker

Overview

The application manages expiration dates and automatically sends caution or warning e-mails as needed.
This application is being developed for self-learning and my own life, and is not for commercial use or related to my work.

Service

The validation process is performed as a periodic process using the Schedule annotation.
Basically, validation is performed at exactly 8:00 AM to determine which foods to alert or warn.

Scheduled validation

If the expiration date is within the number of days specified in the AlertDefinition associated with the ItemType, the food is notified by e-mail as a caution item. For example, if a food item has an AlertDefinition of 3 days and an expiration date of October 10, a warning e-mail will be sent at 8:00 a.m. on October 7. The alert email notifies the expiration date has passed. Specifically, the Service class will send an email notification if there is a consumption date that matches today's date as a warning item. This process is also executed at 8:00 AM.

User Interface

The application provides the registration screen and a list view with all saved data in DB.

Controller

The interface of the visible process and the back-end process handles the REST API with full specified messages.
The controller receives the message and handle the information about item bellow;

  • Create a new stored item into the database
  • Delete a stored item when it is consumed
  • Modified an item name and expiration date

Development

This application is built with the environment bellow;

Back end

  • OpenJDK 17.0.7
  • Spring boot 3.1.1
  • IntelliJ IDEA 2023.1.2
  • embedded H2DB 2.2.220

Front end

  • Vite 4.4.5
  • React 18.2.0
  • TypeScript 5.0.2

Architecture

The architecture of this program is based on Domain driven development model. There is only one aggregate model to manage the expiration date.

This application is built with the Clean Architecture, this is the first attempt for me to develop with this model.

  • adapter : perform as a gateway that input in UI
  • application : contains use-case, perform as a business logic
  • domain : entity, model(enum), specification, that describes the knowledge of components

Aggregate pattern

StoredItem is designed by the given diagrams bellow;
All variable parameters are modified by the method in root of the aggregate model.

limitchecker-spring-boot's People

Contributors

zoeque avatar

Watchers

 avatar

limitchecker-spring-boot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.