A sophisticated stock market analytics and portfolio management platform that combines real-time market data, AI-powered sentiment analysis, and advanced portfolio optimization.
- Real-Time Market Data: Live stock prices, market indicators, and trading volumes.
- AI-Powered Sentiment Analysis: Market sentiment analysis using news and social media data.
- Portfolio Optimization: Advanced portfolio optimization using modern portfolio theory.
- Asset Correlations: Interactive correlation analysis between different assets.
- Price Predictions: AI-driven stock price predictions with confidence intervals.
- Sector Performance: Detailed sector-wise market performance analysis.
- Financial News Aggregation: Curated financial news from multiple reliable sources.
- Custom Watchlists: Personalized stock watchlists with real-time updates.
- React 18 with TypeScript
- Vite (build tooling)
- TailwindCSS (styling)
- shadcn/ui (UI components)
- Recharts (data visualization)
- TanStack Query (data fetching/caching)
- Alpha Vantage: Market data & technical indicators
- Finnhub: Real-time stock data & social sentiment
- Financial Modeling Prep: Company financials & market news
- Polygon.io: Historical market data
- Yahoo Finance: Additional market data
- News API: Financial news aggregation
- TypeScript
- ESLint
- Prettier
- Bun (package management)
- Node.js 18.0 or higher
- Bun (recommended) or npm
- API keys for:
- Alpha Vantage
- Finnhub
- Financial Modeling Prep
- Polygon.io
- News API
-
Clone the repository:
git clone <repository-url> cd portview-ai-insights
-
Install dependencies:
# Using bun (recommended) bun install # Using npm npm install
-
Create a
.envfile in the root directory with your API keys:VITE_ALPHA_VANTAGE_API_KEY=your_key_here VITE_FINNHUB_API_KEY=your_key_here VITE_FMP_API_KEY=your_key_here VITE_POLYGON_API_KEY=your_key_here VITE_NEWS_API_KEY=your_key_here
-
Start the development server:
# Using bun bun dev # Using npm npm run dev
The app will be available at http://localhost:5173.
src/
├── components/ # Reusable UI components
│ ├── dashboard/ # Dashboard-specific components
│ ├── layout/ # Layout components
│ ├── theme/ # Theme components
│ └── ui/ # Base UI components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and configurations
│ └── api/ # API integration modules
├── pages/ # Page components
└── types/ # TypeScript type definitions
- Dashboard Components:
PortfolioPerformanceCard,SentimentCard,StockPriceChart,TopStocksTable - Layout Components:
Layout,Navbar,Sidebar - Data Visualization:
Custom charts (Recharts), interactive data grids, correlation heat maps
- React Query for server state
- React Context for theme/settings
- Local state for UI
- Market Data: Alpha Vantage, Polygon.io, Yahoo Finance
- News & Sentiment: Finnhub, News API, Financial Modeling Prep
Data Flow:
- Data fetching with React Query
- Server-side caching
- Real-time updates via WebSocket
- Fallbacks for API rate limits
- Real-time sentiment from news/social media
- Historical analysis and trends
- Keyword extraction, topic modeling
- Sentiment impact on prices
- Modern Portfolio Theory
- Risk-adjusted return optimization
- Efficient frontier calculation
- Rebalancing suggestions
- Custom constraints
- Interactive correlation matrix
- Cross-asset/sector correlation trends
- Risk diversification insights
- ML-based price forecasting
- Multiple timeframe predictions
- Confidence intervals, risk metrics
- Technical indicator integration
- Comprehensive historical data
- Custom date range
- Technical overlays
- Volume profile analysis
- Live price updates, indicators
- Volume analysis
- Price alerts & notifications
# Lint
npm run lint
# Format
npm run format
# Type check
npm run typecheck
# Run all checks
npm run check# Unit tests
npm run test
# E2E tests
npm run test:e2e
# Specific test file
npm run test -- path/to/testnpm run build
npm run preview- Efficient data caching (React Query)
- WebSocket for real-time updates
- Lazy loading, code splitting, dynamic imports
- Tree shaking, asset optimization
- Optimistic UI updates
- API key management via environment variables
- Rate limiting, request validation
- Error handling, logging
- Secure data storage
- User authentication/authorization
- Data encryption in transit
- Regular security audits
- Node.js environment
- Configured environment variables & API keys
- SSL certificate for HTTPS
- Build production version
- Configure environment variables
- Set up reverse proxy (if needed)
- Deploy static assets
- Monitor performance
- Vercel (recommended)
- Netlify
- AWS Amplify
- Docker
- Static hosting
- Fork the repo
- Create a feature branch
- Make changes
- Submit a pull request
Guidelines:
- Follow code style
- Write meaningful commits
- Add tests for features
- Update docs
MIT License – see LICENSE for details.
- Check the documentation
- Open an issue
- Contact the development team
- Data providers & API services
- Open source libraries/tools
- Contributors & maintainers





