Harness the power of AI for smarter, simpler stock trading.
beğenirseniz projeye yıldız vermeyi düşünün ⭐
StockSage is a modern web application designed to demystify the stock market. It combines real-time market data with powerful AI-driven insights from Google's Gemini API, providing users with predictive analysis, stock comparisons, and a beautiful, intuitive interface to track their favorite companies.
- 📈 Dynamic Stock Charts: View interactive historical data graphs for 30+ days, powered by Recharts.
- 🧠 AI-Powered Predictions: Leverage Google's Gemini to receive AI-generated stock price forecasts and investment advice.
- ⚖️ AI Stock Comparison: Get a comprehensive, side-by-side analysis of any two stocks, complete with an AI-generated recommendation.
- 📊 Real-Time Market Data: Access up-to-the-minute stock information pulled from the Yahoo Finance API.
- ⭐ Personalized Watchlist: Keep track of your favorite stocks with an easy-to-use favoriting system.
- 📱 Fully Responsive UI: A sleek and modern interface built with Tailwind CSS that works beautifully on any device.
| Frontend | Backend | Database |
|---|---|---|
| React.js: For building a fast, component-based UI. | Node.js / Express: For a robust and scalable server. | PostgreSQL: For reliable and structured data storage. |
| Tailwind CSS: For modern, utility-first styling. | Gemini API: For all AI-powered features like prediction and comparison. | |
| Recharts: For creating beautiful and interactive charts. | Yahoo Finance API: As the primary source for stock market data. | |
| Axios: For making promises-based HTTP requests to the backend. | CORS / Dotenv: For server configuration and security. |
To get a local copy up and running, follow these simple steps.
You need to have npm (or yarn) and Node.js installed on your machine.
-
Clone the repo
git clone [https://github.com/your-username/stocksage.git](https://github.com/your-username/stocksage.git) cd stocksage -
Setup Backend
# Navigate to the backend folder cd backend # Install NPM packages npm install # Create a .env file and add your variables touch .env
Your
backend/.envfile should look like this:PORT=5001 DATABASE_URL="your_postgresql_connection_string" GEMINI_API_KEY="your_gemini_api_key"
Then, run the development server:
npm run dev
-
Setup Frontend
# Navigate to the frontend folder from the root cd frontend # Install NPM packages npm install # Create a .env file and add your backend URL touch .env
Your
frontend/.envfile should contain the URL of your local backend server:VITE_API_BASE_URL=http://localhost:5001
Then, run the development server:
npm run dev
The frontend will now be running on http://localhost:5173 (or another available port).
This project is deployed using a monorepo pipeline on two separate services:
- Frontend: Deployed on Vercel, configured to use the
frontenddirectory. - Backend: Deployed on Render, configured to use the
backenddirectory.
Render's free web services spin down after 15 minutes of inactivity, which can cause a delay on the first request. To prevent this, this project uses a free cron job from UptimeRobot to send a request to the backend's health check route (/) every 10 minutes. This keeps the service active and ensures instant response times.
If you found this project useful or learned something from it, please consider giving it a ⭐!





