AI-Powered Stock Analysis & Trading Platform
A comprehensive financial analysis platform that combines real-time market data with advanced AI capabilities for stock analysis, diagram generation, and intelligent trading insights.
- π Real-time Stock Data - Live quotes, historical charts, and market indices
- π€ AI-Powered Analysis - Multiple specialized AI agents for different analysis types
- π Interactive Charts - Advanced charting with technical indicators
- π Smart Stock Screener - Filter stocks by custom criteria
- π° Market News - Real-time news with sentiment analysis
- π Watchlist Management - Track your favorite stocks
- π¨ AI Diagram Generation - Create visual diagrams for company relationships and supply chains
- πΌοΈ AI Image Generation - Generate financial visualizations and concepts
- π Floating Windows - Detachable UI components for multi-tasking
The platform includes specialized AI agents:
- General Advisor - Portfolio advice and investment guidance
- News Analyst - Market news analysis and explanations
- Quant Analyst - Technical analysis and trading signals
- Sentiment Analyst - Market psychology and timing advice
- Deep Analysis - Comprehensive stock analysis with recommendations
- Diagram Generator - Visual diagrams for business relationships
- Image Generator - Financial visualization concepts
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- API Keys:
- Polygon.io API key (for market data)
- Google AI API key (for AI features)
git clone <repository-url>
cd Insighter# Navigate to backend directory
cd backend
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .envConfigure your .env file:
POLYGON_API_KEY=your_polygon_api_key_here
GOOGLE_AI_API_KEY=your_google_ai_api_key_here# Navigate to frontend directory
cd insighter
# Install dependencies
npm install
# Create environment file (optional)
cp .env.example .env.localConfigure your .env.local file (if needed):
NEXT_PUBLIC_API_URL=http://localhost:8001/apicd backend
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8001The backend API will be available at http://localhost:8001
cd insighter
npm run devThe frontend will be available at http://localhost:3000 (or http://localhost:3001 if 3000 is occupied)
Open your browser and navigate to the frontend URL. You should see the Insighter dashboard with:
- Real-time market data
- AI chat interface
- Stock watchlist
- Interactive charts
-
Polygon.io API Key:
- Sign up at polygon.io
- Get your free API key from the dashboard
- Free tier includes 5 API calls per minute
-
Google AI API Key:
- Go to Google AI Studio
- Create a new API key
- Enable the Gemini API
Backend (backend/.env):
POLYGON_API_KEY=your_polygon_api_key_here
GOOGLE_AI_API_KEY=your_google_ai_api_key_hereFrontend (insighter/.env.local): (Optional)
NEXT_PUBLIC_API_URL=http://localhost:8000/api- Open the application
- Navigate to the AI Chat tab
- Try these example prompts:
- "Analyze AAPL stock"
- "Create a diagram showing Apple's supply chain"
- "Generate an image of bull vs bear market"
- "What's the market sentiment today?"
Use keywords like:
- "diagram", "flowchart", "visualize"
- "supply chain", "company relationships"
- "network structure", "flow"
Use keywords like:
- "image", "picture", "photo"
- "create", "generate", "show me"
- "illustration", "infographic"
Insighter/
βββ backend/ # Python FastAPI backend
β βββ api/ # API routes
β βββ services/ # Business logic and AI services
β βββ models/ # Data models
β βββ main.py # FastAPI application entry point
βββ insighter/ # Next.js frontend
β βββ src/
β β βββ app/ # Next.js app router
β β βββ components/ # React components
β β βββ lib/ # Utilities and API client
β β βββ contexts/ # React contexts
β βββ package.json
βββ README.md
-
Backend won't start:
- Check if Python dependencies are installed
- Verify your API keys in
.envfile - Ensure port 8000 is not occupied
-
Frontend won't start:
- Run
npm installto ensure all dependencies are installed - Check if Node.js version is v18 or higher
- Try deleting
node_modulesand reinstalling
- Run
-
API calls failing:
- Verify your Polygon.io API key is valid
- Check if you've exceeded rate limits (5 calls/minute on free tier)
- Ensure backend server is running
-
AI features not working:
- Verify your Google AI API key is configured
- Check backend logs for AI service initialization
- Ensure you have internet connectivity
# Backend
cd backend
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000
# Frontend
cd insighter
npm run dev # Development server
npm run build # Production build
npm run start # Production server
npm run lint # Lint code- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues:
- Check the troubleshooting section above
- Review the console logs for error messages
- Ensure all API keys are properly configured
- Verify both backend and frontend servers are running
Happy Trading! ππ