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 and processes the information with robust error handling and efficient caching, and leverages OpenAI for comprehensive analysis.
- ๐ Real-time stock data fetching from Yahoo Finance and Alpha Vantage
- ๐ฐ Comprehensive financial metrics including:
- Company profiles and key statistics
- Real-time market data
- Historical price data with interactive charts
- Dividend information
- News feeds with full article content
- ๐ Interactive price charts with multiple timeframes (1D, 1W, 1M, 3M, 1Y, 5Y)
- โ๏ธ Robust error handling with custom error types and structured logging
- ๐ Efficient caching system using both in-memory and file-based strategies
- ๐งฎ Data standardization utilities for dates, numbers, and currencies
- ๐ค OpenAI-powered analysis integration
- ๐จ Modern, responsive UI with dark mode support
- Framework: Next.js 14+ with App Router
- Language: TypeScript
- UI Components: shadcn/ui (based on Radix UI primitives)
- Styling: Tailwind CSS
- Charts: Lightweight Charts
- Icons: Lucide React
- Framework: Next.js API Routes (serverless functions)
- Language: TypeScript
- Data Sources:
- Yahoo Finance API
- Alpha Vantage API
- Caching: Hybrid in-memory and file-based caching system
- Error Handling: Custom error classes with detailed logging
- Provider: OpenAI
- Purpose: Enhanced financial analysis and insights
- Integration: Direct API integration via Next.js API routes
- Clone the repository:
git clone [repository-url] cd [repository-name]- Install dependencies:
npm install- Set up environment variables: Create a
.env.localfile with:
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_api_keyOPENAI_API_KEY=your_openai_api_key- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
Fetches market data with support for:
- Real-time quotes
- Historical price data with customizable timeframes
- Volume data
Fetches comprehensive stock data including:
- Current market data (price, volume, etc.)
- Company profile & key statistics
- Dividend information
- Latest news with full article content
- Financial metrics (income statements, balance sheets, cash flows)
โโโ app/ โ โโโ api/ โ โ โโโ market/ โ โ โโโ stock/ โ โโโ stock/ โ โ โโโ [ticker]/ โ โโโ layout.tsx โ โโโ page.tsx โ โโโ globals.css โโโ components/ โ โโโ stock/ โ โ โโโ PriceChart.tsx โ โ โโโ [other components] โ โโโ ui/ โโโ lib/ โ โโโ market-service.ts โ โโโ stock-service.ts โ โโโ openai-service.ts โ โโโ alpha-vantage-service.ts โ โโโ stock-news-service.ts โ โโโ cache.ts โ โโโ utils/ โโโ types/ โโโ public/ โโโ [configuration files] - Enhanced AI-powered analysis features
- Portfolio tracking and management
- Advanced technical analysis tools
- Real-time price alerts and notifications
- User authentication and personalized watchlists
- Additional data sources integration
- Performance optimizations and caching improvements
- Comprehensive testing suite
- 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.