Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdnkv/expense-tracking
https://github.com/mdnkv/expense-tracking
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdnkv/expense-tracking
- Owner: mdnkv
- License: mit
- Created: 2024-10-14T18:50:34.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T18:56:03.000Z (about 1 month ago)
- Last Synced: 2024-11-27T19:49:13.006Z (about 1 month ago)
- Language: Java
- Size: 350 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Expense tracking application
![](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge&logo=openjdk&logoColor=white)
![](https://img.shields.io/badge/Spring-6DB33F?style=for-the-badge&logo=spring&logoColor=white)
![](https://img.shields.io/badge/Spring_Boot-6DB33F?style=for-the-badge&logo=spring-boot&logoColor=white)
![](https://img.shields.io/badge/Hibernate-59666C?style=for-the-badge&logo=Hibernate&logoColor=white)
![](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge&logo=postgresql&logoColor=white)
![](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
![](https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white)The application “Expense tracking” can be used by users in order to track personal finance situation: expenses and income, as well operations across various accounts (bank cards, cash etc.)
## Project description
The target audience of this project are people who want to track their expenses and income and have an overview of the current financial situation. They are not satisfied by existing solutions and want to have more clear and user-friendly interface and synchronization between different devices (web, mobile). The usage of the project provides following of benefits: operations are categorized and recorded in a clear manner; different reports are generated to present an actual situation etc.
From a domain driven design perspective, the application is divided into 4 core domains: Users, Payment accounts, Categories, Operations.
## How to run the project
The application is a standard Java application that is packaged as fat jar and therefore can run on any environment where you can install Java (local, popular PaaS solutions, any cloud server).
System requirements are:
- Java JDK v.21+
- PostgreSQL server v.16+This section describes how to run application using the development configuration (for local testing) and the production configuration
### Quick run
In order to quickly run the application locally:
1. Create the PostgreSQL database
- Database name ```expense_tracking```
- Username ```expense_tracking```
- Password: ```secret```
2. Open terminal and navigate to the root folder of the project
3. Run Maven to generate a fat jar
- If you have a local Maven installation: ```mvn clean install```
- If you do not have a local Maven installation: ```./mvnw clean install```![](docs_phase3/images/installation-1.png)
4. Run the fat jar ```java -jar target/expense-tracking-0.0.1-SNAPSHOT.jar```
![](docs_phase3/images/installation-2.png)
5. Open your browser and navigate to ```http://localhost:8080```
![](docs_phase3/images/installation-3.png)
### Run in a production mode
The previous section shows how to quickly get the application up and running. If you want to run the application in _production mode_ (for example, deploy it to the VPS), you need to run the ```prod``` profile.
In order to do this please first set following environment variables:
- ```DATABASE_URL``` = the [jdbc url](https://docs.oracle.com/javase/tutorial/jdbc/basics/connecting.html) to the PostgreSQL database
- ```DATABASE_USER```= the database username
- ```DATABASE_PASSWORD``` = the database password
- ```FLYWAY_USER``` = the username used by Flyway to run migrations
- ```FLYWAY_SECRET``` = the password used by Flyway to run migrations
- ```HTTP_PORT``` = the HTTP port number for the application serverOnce all these values are provided, the same sequence of steps applies:
1. Navigate to the root folder for the project
2. Run Maven to generate a fat jar
- If you have a local Maven installation: ```mvn clean install```
- If you do not have a local Maven installation: ```./mvnw clean install```
3. Run the fat jar ```java -Dspring.profiles.active=prod -jar target/expense-tracking-0.0.1-SNAPSHOT.jar```
4. Open your browser and navigate to ```http://localhost:{YourPortNumber}```## Test data
The application comes with some mock data that you can use. There are 5 mock users that have some data populated (such as accounts and operations). All data was created using [FakeNameGenerator.com](https://fakenamegenerator.com) and [Email Generator](https://generator.email/) websites and these are users are not real people!
Test data is integrated into the project using migrations. This means that you do not need to complete any additional steps in order to import it! Just use any of these email accounts to log in to the app:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]All users have the password ```secret1234```.
If you do not use any mock data to be imported, just remove the ```src/main/resources/db/migration/V2__testdata.sql``` file before running the application against the database.
## Author
(C) 2024 Iurii Mednikov
The code is delivered under terms of the MIT software license. For more information, check the ```LICENSE.txt``` file.