The creation of this stock data application was driven by a dual ambition: to challenge myself with real-world problem-solving within web development and to deepen my expertise in React and Express.js. This project was an avenue for practical application of my knowledge, a testbed for encountering and overcoming unexpected hurdles, and a deliberate effort to learn through doing. It wasn't just about building something functional—it was about pushing my boundaries, exploring new technologies, and growing as a developer.
By integrating these technologies, the project not only achieved its functional objectives but also served as a significant learning experience. It underscored the importance of state management for timely data rendering, demonstrated the application of asynchronous JavaScript in a real-world scenario, and highlighted the effectiveness of containerization and performance optimization techniques in modern web development.
This image of code details a comprehensive Express.js application designed as an API for fetching stock data, including real-time and historical data, as well as EDGAR data for financial disclosures. This implementation showcases an adept use of Express.js, asynchronous JavaScript, and integration with third-party APIs.
The application incorporates several libraries and technologies:
Key components of the application's structure include:
.env
file for secure configuration.Development achievements highlighted by this project:
This project underscores a significant expertise in backend JavaScript development with a focus on Express.js, asynchronous JavaScript, and strategic API integration, including the critical incorporation of EDGAR data for comprehensive financial analysis.
In this section, I'm excited to share with you a JavaScript class I've crafted, named DataManager
. This class plays a pivotal role in a stock data handling application I've developed. It's a testament to my proficiency in asynchronous JavaScript, API integration, and state management using Redux.
The DataManager
class is pivotal in fetching and managing data related to specific stock tickers, leveraging Redux to maintain and update the application state with new data:
updateCompanyNews
updateError
updateTickerData
updateHistoricalData
updateFinancialData
updateCurrentValue
updateSECFilings
updateMarketNews
Each action is dispatched with data payloads to update the Redux store, ensuring the state reflects the most current stock information.
Redux plays a crucial role in the DataManager
class, streamlining state management across the application:
_fetchFinancialData
exemplifies this by fetching financial data for a stock ticker, followed by dispatching the updateFinancialData
action with the fetched data to refresh the Redux store.This development effort underscored several key learnings and skills enhancement:
This project stands as a testament to advanced capabilities in JavaScript and Redux, highlighting deep insights into state management, asynchronous operations, and API integration.
This stock data application represents a practical application of my skills in React and Redux, focusing on dynamic data rendering and user interaction. The project was an opportunity to apply and enhance my abilities in key areas of web development, particularly data visualization and API integration.
The integration of react-chartjs-2 was pivotal in visualizing stock data through interactive charts. This deep dive into data visualization techniques allowed me to present complex financial information in a clear, engaging format, emphasizing the role of effective data representation in user comprehension and decision-making.
Key to the project's success was the effective integration with third-party APIs, such as Yahoo Finance and Finnhub. Implementing robust error handling and managing API rate limits were essential for ensuring data integrity and application stability, reinforcing the application's reliability for users.
Welcome to a glimpse into the rigorous testing methodologies I've employed in developing a comprehensive financial data visualization application. Through this journey, I've leveraged the power of Jest, Supertest, Testing Library for React, and jest-mock-axios to ensure every piece of code not only meets its functional requirements but also enhances user trust and application reliability.
In the heart of the application, the backend API - specifically, the GET /api/stocks/:id
route - underwent extensive testing. Utilizing Jest alongside Supertest, I focused on ensuring robust responses to both valid and invalid stock symbol requests. This was not just about asserting the right HTTP status codes; it was about verifying the integrity of the data returned, ensuring every piece of information was precisely where and what it should be.
Turning to the frontend, the FinancialGraph
component became my canvas for testing user interactions and data visualization. By integrating the Testing Library for React and jest-mock-axios, I simulated real-world user behaviors and API responses, ensuring the interface was not only intuitive but also responsive to each user's needs. Whether testing theme adaptability or the accuracy of financial charts, my goal was to create an engaging and informative user experience.
Through the development of these test suites, I've deepened my understanding of several key areas:
Welcome to an overview of how Docker Compose facilitated the development of a robust, multi-container stock data application. Through the docker-compose.yml
file, I orchestrated three main services: api-server
, react-app
, and sql-server-db
, leveraging Docker Compose version 3 for seamless service integration and management.
The heart of this setup involved configuring three distinct services to work in harmony:
api-server: Built from a Dockerfile located in the ./server
directory, this service acted as the backbone of our application, providing the API endpoints. It was configured to expose port 8080, ensuring seamless communication between the container and the host machine.
react-app: Representing the front-end of our application, this service was also constructed from a Dockerfile, designed to run the React application and mapped to port 3000 for easy browser access.
sql-server-db: Utilizing the mcr.microsoft.com/mssql/server:2019-latest
image, this service established our database environment. Careful attention was paid to environment variables for security and compliance, and port 1433 was mapped to facilitate database connectivity. A db_data
volume ensured data persistence beyond the container lifecycle.
Embarking on this journey, I not only reinforced my understanding of containerization principles but also acquired new insights into multi-container application architecture. Key accomplishments include:
docker-compose.yml
, optimizing the development environment setup.sql-server-db
service, ensuring data integrity and availability.