Stock Screener SPA
This project is a stock screener SPA built as my React capstone at Microverse. Users can view stock data for selected markets and access company quotes.
It is built with React and Redux, implements the Financial Modeling Prep API, and is tested with React Testing Library and Mock Service Worker.
Project Highlights: view video presentation
stock-screener/src/features/home/Home.js
Lines 30 to 61 in 731015a
stock-screener/src/features/details/Symbol.js
Lines 27 to 58 in 731015a
stock-screener/src/common/components/SplitPane/SplitPane.js
Lines 6 to 15 in 731015a
stock-screener/src/features/home/marketSlice.js
Lines 5 to 43 in f4167e1
- Testing API calls is made at the network level with proper mocking using Mock Service Worker. View my blog post about it.
- Customised React Testing Library's render
method so that tests can access real Redux store and logic and use actual app behaviour
stock-screener/src/test-utils.js
Lines 9 to 33 in f4167e1
- Major languages: JS, SCSS
- Others: JSX, Sass
- Libraries used: React, Redux, Mock Service Worker
Please, view in mobile version: Live Demo Link
To get a local copy up and running, follow the steps below in your terminal.
- Node.js
- npm
For more information, view the section Installation in this guide about Node.js and npm.
Clone the project:
git clone https://github.com/AkashaRojee/stock-screener.git
Install dependencies:
npm install
The assets are in the src
directory.
The output is in the build
directory.
The project is structured as feature folders with ducks slices.
- app //global setup and styling
- common //generic components
- features
- /feature
- Feature.js //main file of feature
- featureSlice.js //feature's reducer
- mocks
- App
- Header
- Route: Home
- HighlightCard
- SectionTitle
- SymbolCard(s)
- Route: Symbols
- HighlightCard
- SectionTitle
- DataRow(s)
- Upon initial render, get list of symbols from
stock
API endpoint, save into store, then display in page. - Clicking on a symbol opens its details page.
- Upon initial render, get data about symbol from
quote
API endpoint, save into store, then display in page. - Clicking on back button returns to home page.
Note: The content of the default output directory of React (build
) is copied to docs
upon build to facilitate publishing from GitHub Pages.
To build the website:
npm run build
To serve the website directly:
npm run start
π€ Akasha Rojee
- GitHub: @AkashaRojee
- Twitter: @AkashaRojee
- LinkedIn: Akasha Rojee
Contributions, issues, and feature requests are welcome!
Give a βοΈ if you like this project!
This project is MIT licensed.