A full-stack web application for exploring and visualizing Magnificent 7 (MAG7) stock data with an interactive frontend and a Python-powered backend.
Mag7 Viewer provides a modern UI for analyzing stock data (e.g., Apple, Microsoft, Google, etc.) with charts, date selection, and real-time querying. It combines a React + Vite frontend with a Python backend (FastAPI/Flask) for data fetching and processing.
- 📊 Interactive stock data visualization (charts & trends)
- 📅 Date-based filtering and selection
- ⚡ Fast frontend powered by Vite
- 🔄 Backend API for fetching financial data
- 📡 Data sourced via Yahoo Finance (
yfinance) - 🎨 Modern UI with Tailwind CSS and Radix UI
mag7viewer/
│
├── backend/ # Python backend API
│ ├── main.py # Entry point (FastAPI/Flask server)
│ ├── routes/ # API route definitions
│ ├── services/ # Data fetching & processing logic
│
├── src/ # Frontend source (React + TypeScript)
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Shared logic
│ ├── utils/ # Helper functions
│ ├── App.tsx # Root component
│ ├── main.tsx # Frontend entry point
│
├── public/ # Static assets
├── dist/ # Production build output
│
├── package.json # Frontend dependencies & scripts
├── yarn.lock # Yarn lockfile
├── requirements.txt # Python dependencies
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.js # Linting rules
├── README.md # Documentation
[ React Frontend ] ---> [ Backend API ] ---> [ yfinance ]
│ │
│ └── Data processing (Pandas)
└── Charts (Recharts)
- React 19
- TypeScript
- Vite
- Tailwind CSS v4
- Radix UI
- Framer Motion
- Recharts
- TanStack React Query
- Lucide React
- Python 3
- FastAPI / Flask
- Uvicorn
- Pandas
- NumPy
- yfinance
- BeautifulSoup4
- Yarn 4
- ESLint
- Prettier
- gh-pages
git clone https://github.com/mpokumt/mag7viewer.git
cd mag7vieweryarn installFirst off ensure that you have Python 3.14 + installed on your computer
Set up virtual environment
python3 -m venv .venv
Activate virtual environment
source .venv/bin/activate
Install Libraries
pip install -r requirements.txtyarn devyarn backendOr manually:
cd backend
python3 main.pyThe application focuses on the Magnificent 7 stocks:
- AAPL (Apple)
- MSFT (Microsoft)
- GOOGL (Alphabet)
- AMZN (Amazon)
- META (Meta)
- TSLA (Tesla)
- NVDA (Nvidia)
-
Fetch
- Uses
yfinanceto retrieve historical stock prices - Typically pulls daily OHLC (Open, High, Low, Close) data
- Uses
-
Process
- Cleaned and structured using Pandas
- Dates are normalized across all tickers
- Missing values handled appropriately
-
Aggregate
-
Stocks combined into a unified dataset
-
Optional transformations:
- Normalization (e.g., base index = 100)
- Percentage change over time
- Relative performance comparison
-
-
Serve
- Data exposed via REST API endpoints
- JSON responses optimized for frontend consumption
-
Visualize
- Rendered using Recharts
- Supports line charts, comparisons, and time-series views
- Uses React Query for API state management
- Tailwind utilities (
clsx,tailwind-merge) for styling - Modular component structure for scalability
- Backend supports async processing (FastAPI-ready)
Open an issue on GitHub for questions or suggestions.