Code Monkey home page Code Monkey logo

rishiraj88 / leasing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2 MB

to take vehicles on lease, respect such leasing contracts and returning the lease vehicles to the providers. For use by customers (vehicle users)

Home Page: https://hub.docker.com/repository/docker/i50729/contract/general

Java 33.06% HTML 25.83% TypeScript 37.32% CSS 2.74% Dockerfile 0.33% Shell 0.30% JavaScript 0.42%
angular angular-cli automotive bash contract docker-compose end-user-experience gradle java-8 leasing nodejs spring-boot

leasing's Introduction

Leasing Application for All Mobility Groups [B2C, B2B]

Note: Tech upgrade of the app is underway. WIP code is available in repos for quick review by peers and feedback.

This project is a utility app for the following classes of end-users:

  • lessee, called customer in the project for easier reference, and
  • lessor, called provider.

The app is designed in the form of two modules:

  • backend modules, in the directory contract, and
  • frontend modules, in the directory clientng. (under development currently)

Using this app, Lessees can perform these actions about vehicles and leasing contracts:

  • take vehicles on lease,
  • respect such leasing contracts, and
  • return the leased vehicles to the providers.

The usage scenarios for lessors are not available in the current version of the app as it has been planned to essentially be a User Self-Help Portal. However, the app may be easily extended to add lessor and administrator use cases.

Technologies Used to Build the Application

  • React 18 (Frontend app with React 18, TypeScript and Vite/Bun is being developed activels on 'develop' branch.)
  • Angular 18 (Frontend app with Angular 18 will be developed after the React client has been readied.)
  • Java 17 (working well with container runtime)/ Java 21 (experiencing runtime issues)
  • Spring Boot 3.2.5
  • MySQL 8.0.31 (containerized)
  • JPA 3.1.0 (Jakarta Persistence API)
  • Hibernate 6.4.4 for ORM
  • Docker with docker-compose
  • Gradle with Maven
  • Flyway for database migration
  • SLF4j for logging
  • lombok for boilerplate code generation
  • ELK stack (ELK Stack: Elasticsearch, Kibana, Logstash) for log monitoring and analysis

Open task with high priority

  • to implement and use Docker secrets for enhanced security (in docker compose yml)

Screenshots [Newer screenshots to be published to cater to React-based UI]

The following are the older screenshots:

Contract Manager

Contract manager to access vehicle lease contract

Customer Manager

Customer manager to add, update and view customer details

Vehicle Manager

Vehicle manager to add, update and view vehicle details

Home View

  • Top of home view (home page)

  • Bottom of home view (home page)

Business Scenario and Use Cases

Main Actors

  • Customer, with properties: name, birthdate
  • Vehicle, with properties: brand, model, year of manufacture, VIN, price
  • Lease Contract, with essential properties: lease contract number, monthly rate (for billing)

Viewing Contract Summary [under development]

The following details are shown at summary level:

  • lease contract number
  • customer name
  • vehicle details (branc, model, year)
  • VIN separately ("--" shown if VIN is not available)
  • contract rate
  • vehicle price
  • anchor link to view more details

Indicative illustration is below:
|----------Contract Overview---------------------------------------------------------------------------------------------|
|Contract Nr. |Customer Name |Vehicle |VIN |Contract Rate (Monthly) |Vehicle Price More Details |
|134856 |Maximill Muster |Audi A20 (2023) |A65413 |654,20 |33465,80 |
|146349 |Angel Angle |Neo X4 (2024) |-- |453,00 |40321,00 |
|------------------------------------------------------------------------------------------------------------------------|

Customer Entry Form [under development]

It is a form with fields to enter customer name and birthdate, along with "Update" and "Cancel" buttons.

Vehicle Entry Form [under development]

It is a form with fields to enter all five properties (detail points) of vehicle to add or update, with "Update" and "Cancel" buttons.

Lease Contract Entry Form [under development]

A form to enter contract number, monthly rate of contract, related customer name and related vehicle details. Customer name and vehicle details may be picked out of database in order to select existing data about customer and vehicle, respectively.

Preconditions to Run the Application

This application requires the following software packages to run properly:

  • a command line interpreter. Bash is preferred. CMD for Windows also works. The command in this readme run very well with Bash. For having Bash on a Windows box, you may install Git Bash.
  • Docker
  • a web browser. Chrome is preferred. Other web browsers may work for most functionalities.

Installation

The application can be set up and started in two distinct methods.

1. Local build and execution

  • Using your favorite Terminal app for shell, clone the files (source code and configuration) from GitHub repository:
git clone https://github.com/rishiraj88/leasing.git
  • In your file explorer, go to leasing/contract directory:
cd leasing/contract
  • Build the project locally with gradle wrapper:
./gradlew build

2. Pulling the pre-built Docker image

  • Run this command in Terminal app to pull and start the latest contract image published on Docker Hub for project backend:
docker run i50729/contract

In its current stage of development, the backend app runs well with locally available mysql container and the accompanying frontent leasingclient.

One important point to note here: All three (mysql, backend and frontend) must be in a common(=single,shared) network in order to work together. For non-tech-savvy users, it is not an easy feat. Currently work on this is going on.

How to Start the Application

  • Now you may use the application by visiting this URL:
http://localhost:4200/home
  • Freely navigate to and use the sections Customers, Vehicles and Leasing Contracts under Manage menu.

Reason of Chosen Solution

The chosen solution corresponds to the use the modern technologies available so as to model complex dynamic systems easily. Hence it enables the businesses to work on heavy-cash businesses more conveniently.

General Notes

Due to some constraints, I have built the MVP. For enhancing and fostering the solution, tech discussions on relevant parameters and methods are always cited and welcome.

Notes for Developers

The backend of the app has been packaged and published with the following commands:

  • In your file explorer, go to leasing/contract directory:
cd leasing/contract
  • Build the project locally with gradle wrapper:
./gradlew build
  • Build Docker image with:
docker build -t i50729/contract:latest .
  • Push the Docker image for publishing with:
docker push i50729/contract:latest

The Frontend of the app can be started as follows:

  • Build the Docker container network by running:
`docker-compose build
docker-compose up -d
  • Go to leasingclient directory under leasing.
cd leasingclient
  • Build and run the Angular-based frontend with these commands:
npm install
ng serve

Current Status of Functionalities

  1. Only creating and updating customer data is possible. Listing or deleting customer data is not provided for security purpose as the app is to be used by customers.
  2. Only creating and updateing vehicle data is possible for secure use by customers.
  3. Policy contracts can be listed and viewed by respective customers for the vehicles leased to them.

For Feedback, Queries, Collaboration

leasing's People

Contributors

rishiraj88 avatar

Watchers

 avatar

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.