Skip to content

taran-r/Insighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Insighter πŸ“ˆ

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.

✨ Features

  • πŸ“Š 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

πŸ€– AI Agents

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

πŸš€ Quick Start

Prerequisites

  • 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)

1. Clone the Repository

git clone <repository-url>
cd Insighter

2. Backend Setup

# 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 .env

Configure your .env file:

POLYGON_API_KEY=your_polygon_api_key_here
GOOGLE_AI_API_KEY=your_google_ai_api_key_here

3. Frontend Setup

# Navigate to frontend directory
cd insighter

# Install dependencies
npm install

# Create environment file (optional)
cp .env.example .env.local

Configure your .env.local file (if needed):

NEXT_PUBLIC_API_URL=http://localhost:8001/api

πŸ–₯️ Running the Application

Start Backend Server

cd backend
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8001

The backend API will be available at http://localhost:8001

Start Frontend Development Server

cd insighter
npm run dev

The frontend will be available at http://localhost:3000 (or http://localhost:3001 if 3000 is occupied)

Access the Application

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

πŸ”§ API Configuration

Getting API Keys

  1. 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
  2. Google AI API Key:

Environment Variables

Backend (backend/.env):

POLYGON_API_KEY=your_polygon_api_key_here
GOOGLE_AI_API_KEY=your_google_ai_api_key_here

Frontend (insighter/.env.local): (Optional)

NEXT_PUBLIC_API_URL=http://localhost:8000/api

πŸ§ͺ Testing the Features

Test AI Chat

  1. Open the application
  2. Navigate to the AI Chat tab
  3. 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?"

Test Diagram Generation

Use keywords like:

  • "diagram", "flowchart", "visualize"
  • "supply chain", "company relationships"
  • "network structure", "flow"

Test Image Generation

Use keywords like:

  • "image", "picture", "photo"
  • "create", "generate", "show me"
  • "illustration", "infographic"

πŸ“ Project Structure

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

πŸ” Troubleshooting

Common Issues

  1. Backend won't start:

    • Check if Python dependencies are installed
    • Verify your API keys in .env file
    • Ensure port 8000 is not occupied
  2. Frontend won't start:

    • Run npm install to ensure all dependencies are installed
    • Check if Node.js version is v18 or higher
    • Try deleting node_modules and reinstalling
  3. 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
  4. AI features not working:

    • Verify your Google AI API key is configured
    • Check backend logs for AI service initialization
    • Ensure you have internet connectivity

Development Commands

# 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

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ†˜ Support

If you encounter any issues:

  1. Check the troubleshooting section above
  2. Review the console logs for error messages
  3. Ensure all API keys are properly configured
  4. Verify both backend and frontend servers are running

Happy Trading! πŸš€πŸ“ˆ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors