https://github.com/johndev19/java-stock-tracker
Stock Tracker Server is a simple Java-based web application that provides a mock stock tracking interface.
https://github.com/johndev19/java-stock-tracker
java stock stock-price-tracker
Last synced: 11 months ago
JSON representation
Stock Tracker Server is a simple Java-based web application that provides a mock stock tracking interface.
- Host: GitHub
- URL: https://github.com/johndev19/java-stock-tracker
- Owner: JohnDev19
- License: mit
- Created: 2024-11-03T03:57:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-03T04:04:57.000Z (over 1 year ago)
- Last Synced: 2025-03-25T07:14:55.085Z (about 1 year ago)
- Topics: java, stock, stock-price-tracker
- Language: Java
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stock Tracker Server
## Description
Stock Tracker Server is a simple Java-based web application that provides a mock stock tracking interface.

## Features
- Simple web interface for querying stock information
- Display of current stock price, change percentage, and trading volume
- Historical price chart using Chart.js
- Mock data for demonstration (currently includes AAPL and GOOGL)
## Prerequisites
- Java Development Kit (JDK) 15 or later
- Web browser (Chrome, Firefox, Safari, or Edge recommended)
## Installation and Running
1. Clone the repository or download the `StockTrackerServer.java` file.
2. Open a terminal or command prompt.
3. Navigate to the directory containing `StockTrackerServer.java`.
4. Compile the Java file:
> Run the server:
```java
java StockTrackerServer
```
6. Open a web browser and go to `http://localhost:8080`.
## Usage
1. Enter a stock symbol (e.g., AAPL or GOOGL) in the input field.
2. Click the "Get Stock Info" button.
3. View the displayed stock information and historical price chart.
## Limitations
- This is a demo application with mock data.
- Only AAPL (Apple) and GOOGL (Google) stock symbols are available in the mock database.
- The server runs locally and is not suitable for production environments without modifications.
## Customization
To add more stocks or modify existing ones, edit the `initializeStockDatabase()` method in the `StockTrackerServer.java` file.
## Security Note
This server is intended for local use and demonstration purposes only. It does not implement any security measures and should not be exposed to the public internet.
## License
This project is open-source and available under the MIT [License](License).
## Contributing
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.
## Author
[JohnDev19]
## Acknowledgments
- Chart.js for the interactive stock price charts
- Java HttpServer for the simple web server implementation