The Gas Price Tracker is a simple Java application, which periodically performs API calls for gathering information about gas prices around your area. This data is stored in a PostgreSQL database and can be accessed via a REST API made with Spring. Both Java application and database can be deployed using Docker 🐳.
The main aim of this project is to gather information about the gas prices around your area. Consequently, you can get some insights e.g. what time of the day it's usually the cheapest to buy gas or which gas station is the cheapest one. For optimal data gathering it is recommended to run this software on a server (e.g. a Raspberry Pi), which is running continuously.
💡 Note: It's only possible to track gas stations, which are located in Austria.
- Git installed
- Docker installed
- Docker compose installed
- Open a terminal and clone the repository
- Switch into the gas-price-tracker directory
- Optional: Switch into the api-service directory and run
gradlew build
for building a new .jar file - Run
docker-compose up
in your terminal - The Gas Price Tracker app should be up and running now 😄
- Frontend:
localhost:80
- Backend:
localhost:8080/gas-prices
orlocalhost:8080/gas-prices/chart
The application.properties
file (located in src/main/resources
) allows you to make some configurations:
lat
: Latitude of your positionlon
: Longitude of your positionrate
: The rate (in milliseconds) how often the Java application makes an API call for retrieving new gas price data (e.g. hourly: 3600000)