A modern web application that provides data-driven fundamental analysis for stocks. The system fetches financial data from multiple sources including Yahoo Finance and Alpha Vantage, standardizes the information, and leverages a Retrieval-Augmented Generation (RAG) approach with an LLM for comprehensive analysis.
- 📊 Real-time stock data fetching from multiple sources
- 📈 Comprehensive financial metrics
- 📑 Company profiles and key statistics
- 📰 Latest news with full article content
- 💹 Dividend information and analysis
- 🔄 Efficient data caching
- 🤖 RAG-powered analysis (Coming Soon)
- Framework: Next.js 14+ with App Router
- Language: TypeScript
- UI Components: shadcn/ui (based on Radix UI primitives)
- Styling: Tailwind CSS
- Icons: Lucide React
- Framework: Next.js API Routes (serverless functions)
- Language: TypeScript
- Data Sources:
- Yahoo Finance API
- Alpha Vantage API
- Caching: In-memory caching system
- Language: Python
- Purpose: Wrapper for LLM interaction
- Integration: API endpoint to connect frontend with Python backend
- Clone the repository:
git clone [repository-url]
cd [repository-name]
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env.local
file with:
ALPHA_VANTAGE_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open http://localhost:3000 with your browser.
Fetches comprehensive stock data including:
- Current market data
- Company profile
- Financial metrics
- Key statistics
- Dividend information
- Latest news with full article content
- Income statements
- Balance sheets
- Cash flow statements
- Earnings data
Example response:
{
"quote": {
"symbol": "AAPL",
"regularMarketPrice": 232.8,
// ... more market data
},
"profile": {
"longName": "Apple Inc.",
"industry": "Consumer Electronics",
// ... more company info
},
"fundamentals": {
"incomeStatements": [...],
"balanceSheets": [...],
"cashFlows": [...],
"earnings": [...]
},
// ... financial data, news, etc.
}
├── app/
│ ├── api/
│ ├── layout.tsx
│ ├── page.tsx
│ ├── globals.css
│ └── favicon.ico
├── lib/
│ ├── types/
│ ├── stock-news-service.ts
│ ├── alpha-vantage-service.ts
│ ├── alpha-vantage.ts
│ ├── cache.ts
│ └── stock-service.ts
├── public/
├── .next/
├── node_modules/
├── .env.local
├── package.json
├── package-lock.json
└── [configuration files]
- RAG Integration for AI-powered analysis
- Additional financial data sources
- Advanced data visualization
- User authentication
- Saved analysis reports
- Portfolio tracking
- Enhanced caching strategies
- Performance optimization
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.