An AI-powered stock analysis platform that provides real-time market intelligence, sentiment analysis, and trend insights.
- Real-time Stock Analysis: AI agent searches and analyzes market data for any stock ticker
- Streaming Search Process: Watch the AI agent work in real-time as it gathers information
- Market Sentiment: Get insights on social media opinions and market perception
- Trend Analysis: Understand current market trends and future outlook
- News Integration: Latest headlines and market-moving news
- Python 3.8+
- Node.js 16+
- npm or yarn
-
Backend Setup:
cd backend pip install -r requirements.txt -
Create
.envfile in backend directory:REKA_API_KEY=your_reka_api_key_here BRIGHTDATA_API_KEY=your_brightdata_api_key_here BRIGHTDATA_PROXY_USER=your_proxy_user BRIGHTDATA_PROXY_PWD=your_proxy_password BRIGHTDATA_BROWSER_USER=your_browser_user BRIGHTDATA_BROWSER_PWD=your_browser_password
-
Frontend Setup:
cd frontend npm install
Option 1: Use the startup script (Recommended)
python start_dev.pyOption 2: Manual startup
# Terminal 1 - Backend
cd backend
python api.py
# Terminal 2 - Frontend
cd frontend
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Search for a Stock: Enter any stock ticker (e.g., NVDA, TSLA, AAPL) in the search bar
- Watch the AI Work: See real-time updates as the AI agent searches and analyzes data
- Get Insights: Receive comprehensive analysis including:
- Market trends and sentiment
- Recent news and social media opinions
- Technical analysis and outlook
- Key market drivers
- FastAPI: REST API with streaming support
- Agent Search: AI-powered web search and analysis
- Reka AI: Language model for analysis and summarization
- Bright Data: Web scraping and data collection
- React + TypeScript: Modern web interface
- Vite: Fast development and build tool
- Tailwind CSS: Utility-first styling
- Radix UI: Accessible component library
Analyze a stock with AI agent
Request:
{
"prompt": "Analyze NVDA stock trends and sentiment",
"max_steps": 6,
"stream": true
}Response (Streaming):
data: {"type": "init", "timestamp": "2025-01-25T10:30:00Z", "prompt": "..."}
data: {"type": "step_update", "step": 1, "action": "serp_search", "payload": {...}}
data: {"type": "tool_result", "preview": {"text": "Found 10 results...", "data": [...]}}
data: {"type": "final_answer", "content": "Analysis summary..."}
data: {"type": "complete", "success": true, "final_result": "..."}
├── backend/ # FastAPI backend
│ ├── api.py # Main API server
│ ├── agent_search.py # AI search agent
│ ├── serp_search.py # Web search functionality
│ └── browse_url.py # Web scraping
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ └── App.tsx # Main application
└── start_dev.py # Development startup script
- Backend: Add new endpoints in
api.pyor extend agent capabilities inagent_search.py - Frontend: Create new components in
src/components/and integrate inApp.tsx
- CORS Errors: Ensure backend CORS is configured for your frontend URL
- API Key Issues: Verify all required API keys are set in
.env - Port Conflicts: Change ports in respective config files if needed
- Backend logs: Check terminal running
python api.py - Frontend logs: Check browser developer console
- Network issues: Verify API endpoints in browser Network tab
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.