This project was developed for the Lighthall Challenge. The objective of the project is to create a Portfolio Calculator that can provide the current price of a given stock based on its name and a specified date. The application is built using Node.js, React, and Firebase.
The Portfolio Calculator allows users to:
- Input a stock name and a specific date.
- Retrieve the current price of the specified stock.
- View the historical price data of the stock.
- Node.js: Backend server for handling API requests.
- React: Frontend framework for building the user interface.
- Firebase: Used for authentication, database, and hosting.
- Node.js and npm installed on your machine.
- Firebase account.
-
Clone the Repository
git clone https://github.com/yourusername/portfolio-calculator.git
-
Navigate to the Project Directory
cd portfolio-calculator
-
Install Dependencies
npm install
-
Firebase Setup
- Create a new project in Firebase.
- Set up Firebase Authentication.
- Create a Firestore database.
- Update the Firebase configuration in your project.
-
Run the Backend Server
npm run start:server
-
Run the Frontend Application
npm start
Update the firebaseConfig
object in your project with the configuration details from your Firebase project. This is usually found in the Firebase console under project settings.
- Stock Price Retrieval: Get the current price of a stock based on its name and a specified date.
- Historical Data: View the historical price data of the stock.
- User Authentication: Secure login and signup using Firebase Authentication.
- Real-time Database: Store and retrieve user-specific data using Firebase Firestore.
- Enter Stock Details: Enter the stock name and the date for which you want to calculate the price.
- Get Current Price: Click the 'Get Price' button to fetch the current price of the stock.
- View Historical Data: Navigate to the historical data section to view the price trends of the stock.