Projects.

HOME

Vehicle Inventory Management System MVC

Background:
After graduating college, I started to relearn Python and Java. This project started as a Python app that ran through the IDE console and stored data in an excel spreadsheet. My desire to learn backend development and proficiency in Java led me to changing the language this app was written in. After learning about the MVC design pattern, I was able to produce the model and view components in Java, but my grasp on Controllers (HttpSerlvet specicially) wasn't so great, so I decided to learn Spring in order to make my application more robust and modular. This is by far the largest software project I've worked on as a programmer, but I hope to grow and eventually use this knowledge in the industry.

Abstract:
To create a program that manages vehicle inventory data for a car dealership. This project teaches me about Java development at the enterprise level by implementing technologies offered by the Spring project. I am focusing on the Model-View-Controller design pattern with interactions between three main entities (Vehicle, CustomerAccount, FinanceRecords). As entities are added to this project, especially ones with relationships with existing ones, complexity grows at a nonlinear rate. Due to the benefits of dependency injection and the annotation-based configuration magic offered by Spring, users of this application have free control over data input.

Tools/Technologies:
I) ENTITIES/MODELS:
The fields of the object contain data that is relevant to the consumer. These fields are to be stored in the database. Here, basic principles of OOP such as encapsulation with the get and set methods are employed. Because the object has so many fields, I found that using the creational builder design pattern would help simply and organize the instantiation of the vehicle object. 3/8/22 update: I've found that because Spring's dependency injection offers inversion of control, the components of the builder pattern within the Vehicle class may be unecessary.

Vehicle Fields:
year (int) mileage (int) vehicleIdNumber(String) make (String) model(String) condition(String) interiorColor(String) exteriorColor(String) titleStatus (String) drivetrainType (String) transmissionType (String) fuelType (String) price (double) II) DATABASING:
Using jdbc as the driver connector for mySQL, it becomes possible to permanentize and update the states of the vehicle object. Here, I learned how to set up the mySQL server and instances of databases which I can manage through mySQLworkbench. I had familiarized myself with SQL about two years ago so half of this was re-learned. Within databases, I dove into schemas and learned how to populate tables within the schemas. The class VehicleDbComm.java is design to setup a connection to the database from the Eclipse. From here specific queries will be writing to do things such as display data for a specific vehicle(s) and also be able to update the data whenever the user wishes. At the moment of writing this, I have thought about splitting the table I’ve created in mySQL into several smaller tables; I’ll have to see if there are any advantages to this.
One idea is to separate the methods by search and update/edit. Search function ideas: Update function ideas: III) FRONTEND/VISUALS: Furthering the project (ideas):
thought: I’m realizing the redundancy of creating a vehicle object and having a database. Perhaps I can store the vehicle objects in a data structure and use them to somehow make my program more efficient? Maybe having “two copies” of the same data can provide some insurance incase the database server goes down/is offline.

Ultimately, deploying this application online will be its moonlanding.

CHANGELOGS:

11/10/21:
Up until now, I haven’t been documenting the changes and ideas chronologically. I will be doing so moving forward to track my progress in detail. I have been refining the Vehicle class this week to ensure type compatibility when writing to the database and the current structure/complexity of the object is satisfactory for now. I have established that there will be a separate client file that will call the methods from the database communication file. There are many similarities between methods written for the query methods (especially the search methods). Adding features such as ordering data adds a need for another method so I will have to figure out how to refactor parts of the code as I did with the establishConnection() method.

12/30/21:
This project has been revamped once again to include user accounts that can be associated with vehicles in the lot. Using JSP and the MVC model, html/css can be used to display data in a web browser so I have writing object models for both the vehicles and the users, which I have created database access layers for each. Another table in the database was created for the users. Launching the now web app on the Tomcat Server lists all user and vehicle details from the database. Its important to note that each time the database reads a user/vehicle, an object is usually returned. Each DAO has CRUD functionality. I am looking to add options and create JSP forms that will enable the client to edit details about the users/vehicles. After this, the controller component is the in line to be created. The next major goal is to create another table that lists any offers or currently financed vehicle. Also another table for cars that have been sold.

3/8/22:
After spending time learning Spring and how to better use Maven, I am able to turn this into a dynamic web MVC application with annotation based configuration. I have started to overhaul a lot of the code in the entity and DAO layers. I have implemented the basic CRUD functions and I am working on connecting the User Account and Finance Record entities to the Vehicle object. More to come...

3/9/22:
I have refactored much of the FinanceRecord class so that the loan calculations and fields work the way I desired. For simplicity's sake, the customer will be limited to making monthly payments of exact amounts, this is calculated by the amortization formula A = principal * ((apr * ((1 + apr) ^ termLength)/(((1 + apr) ^ termLength) - 1))).

3/18/22:
I've spent a fair amount of time this past week understanding how to further use Hibernate mappings to create relationships between my tables. Current schema setup: 3 tables: Cars, CustomerAccounts, FinanceRecords Each of these tables are connected to the backend by a DAO layer, and all three of these DAOs pass through a service layer called VehicleSerivce.class Foreign key setup: financeId in Vehicle is the FK to financeId PK in FinanceRecord, customerId in financeRecord is FK to customerId PK in CustomerAccount. Vehicle object holds a one-to-one bidirectional relationship with FinanceRecord. Vehicle is the owner object, a FinanceRecord needs a Vehicle to exist. FinanceRecord holds a many-to-one relationship with CustomerAccount, as one CustomerAccount can finance multiple Vehicles. Therefore, a CustomerAccount holds a OneToMany relationship with FinanceRecord. Alongside learning the mappings, I have been altering the JSP and CSS files to improve the visuals of the webapp. I have also used Affinity Designer to create svg images headers for each of the JSPs. Most of this week was spent on refining the CustomerAccount components of this project. With most of the groundwork built, I just need to complete integration of the FinanceRecord component, which will probably be the most difficult.

Here is a diagram of the entity relationships generated in MySQL workbench:
Entity relationships




Stock Screener REST

Background/Abstract:
To create a stock screening program that takes advantage of automation to notify the user in real time when a stock hits a certain price.

Background:
As a hobbyist trader myself, I got tired of constantly checking my watchlist. This program seeks to solve that problem. Now, I'm neither a frequent trader, nor do I invest in quantities a seasoned trader would. The simplicity of this program supports the aforementioned notion. On to the process. Initially, a public API such as Alpha Vantage or Yahoo_fin is used to retrieve real-time stock prices. This data is processed by a Python script, which will feed into the database. As long as the scheduled Cron task is active, the system will periodically retrieve prices at set time intervals. Having stored the data in MySQL, Spring Boot is used to build a REST service that will feed into an in-browser stock screener.

Tools/Technologies: Notes:
It could be a good idea to create some sort of watch list using a data structure and looping through the watch list at set times. Most real-time financial data requires a paid-service, but Alpha Vantage is free and the functionality is enough for the purposes of this project. I am not expecting the Alpha Vantage API to retrieve data with accuracy of under a minute.

Phase 1:
Establishing a connection to the Alpha Vantage API/Yahoo_fin and being able to grab the stock price of any ticker symbol.

New things I learned:
Idea: Mapping timestamps to their respective data in the database.

Phase 2: Using SQL qeuries within the Python script to store data in the database.

Phase 3: Creating a entity model for a stock ticker. Employing the MVC pattern in Spring Boot and creating the REST service.

Phase 4: Feed REST service into frontend.

Furthering the project (ideas):

Changelogs

11/17/21 update:
It has been a few weeks since I have touched on this project but I have been looking for a way to parse the JSON files. After doing a bit of research, it came down to Jackson and GSON, because of Jackson’s alleged speed edge, Jackson seems to be the better choice. Now how do I go about installing Jackson? This led me to learning more about Maven and ultimately installing it.

After turning the JSON object into a Java Map, I was able to understand the structure of the data which is boiled down to two components: 1) The meta data, 2) The time series. From here, I wanted to understand what was best for displaying and recording the data offered by the JSON output. At this moment, I am trying to turn the time series data into a single array.


Solar Panel Optimization

Background:
Alternative/renewable energy has always been something I cared about; especially since it can benefit our environment and natural resources on this earth are finite. Since the sun is so prevalent in our everyday lives, solar energy seems like a good place to start since it's so abundant. There are many impediments that reduce the energy that is captured by photovoltaic cells. One of my tasks is to understand which of those roadblocks can be eliminated and which will inevitably affect photon availability. I hypothesize that the angle of the surface area of solar cell placement will greatly affect the energy absorbed. Therefore, I want to build a circuit with a motor that can change the angle of the panel such that it will absorb the most energy. Detection of light is done via photoresistor sensors. If this application is successful for a single small solar panel, it's size can be scaled down and woven into a flexible solar panel 'blanket'.

Abstract:
Can I build a home-made circuit such that it optimizes the energy that solar panels can retain by automating the movement of solar cells?

Physics/laws of nature to understand:
Questions and challenges:


TOP

©2026