A modern financial learning platform that gamifies stock market education for young investors, combining real-time market data with interactive games and smart assistance.
The application follows a modern full-stack architecture with:
- Frontend: React 18 with TypeScript, styled using Tailwind CSS and shadcn/ui components
- Backend: Python services using FastAPI and Flask for different microservices
- External APIs: Integration with Yahoo Finance for real-time stock data and Google Gemini AI for intelligent chatbot assistance
- Data Layer: JSON and CSV files for static data, browser local storage for user state
- Deployment: Frontend on Vercel, Backend on Render with CI/CD pipelines
- Interactive Financial Dashboard
- Live Market Graphs
- Smart Investment Assistant
- Stock Market Games
- Financial Education Quizzes
- Leaderboard System
- Portfolio Management
- News Integration
- React 18.3.1 - Modern UI library with hooks and concurrent features
- TypeScript 5.8.3 - Type-safe JavaScript development
- Vite 5.4.19 - Lightning-fast build tool and dev server
- Tailwind CSS 3.4.17 - Utility-first CSS framework
- shadcn/ui - High-quality React component library built on Radix UI
- Radix UI - Unstyled, accessible component primitives
- Recharts 2.15.4 - Composable charting library for data visualization
- React Router 6.30.1 - Declarative routing for React
- TanStack Query 5.83.0 - Powerful asynchronous state management
- Lucide React - Beautiful & consistent icon toolkit
- Python 3.11+ - Modern Python with enhanced performance
- FastAPI 0.104.1 - High-performance async API framework
- Flask 3.0.0 - Lightweight WSGI web application framework
- Uvicorn - Lightning-fast ASGI server
- Gunicorn 21.2.0 - Production-grade WSGI HTTP server
- Pandas 2.1.4 - Powerful data analysis and manipulation
- HTTPX 0.25.0 - Modern HTTP client for Python
- Flask-CORS 4.0.0 - Cross-Origin Resource Sharing support
- Yahoo Finance API - Real-time stock market data
- Google Gemini AI - Advanced AI-powered chatbot assistant
- ESLint - Code quality and consistency
- PostCSS & Autoprefixer - CSS processing and vendor prefixing
- Vercel - Frontend hosting with global CDN
- Render - Backend service hosting
- Node.js v16 or higher
- Python 3.11 or higher
- npm or bun package manager
- pip (Python package installer)
# Install dependencies
npm install
# Start development server (runs on port 8080)
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview# Navigate to backend directory
cd backend
# Install Python dependencies
python install_dependencies.py
# Start all servers (FastAPI + Flask)
python start_all_servers.py
# Or start servers individually:
# - FastAPI server (stock data)
python start_server.py
# - Flask server (chatbot)
python chatbot_server.pyCreate a .env file in the backend directory:
GEMINI_API_KEY=your_gemini_api_key_hereStock_Verse/
โโโ src/ # Frontend source code
โ โโโ components/ # React components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ StockCard.tsx # Stock display components
โ โ โโโ StockChart.tsx # Chart visualizations
โ โ โโโ FinancialGameModal.tsx
โ โ โโโ PortfolioManager.tsx
โ โ โโโ StockBot.tsx # AI Chatbot interface
โ โ โโโ ... # Other components
โ โโโ pages/ # Application pages
โ โ โโโ Index.tsx # Main dashboard
โ โ โโโ NotFound.tsx # 404 page
โ โโโ services/ # API service layer
โ โ โโโ marketData.ts # Market data services
โ โโโ hooks/ # Custom React hooks
โ โโโ data/ # Static JSON data files
โ โ โโโ stocks.json # Stock information
โ โ โโโ student_events.json # Game events
โ โ โโโ ... # Quiz questions
โ โโโ lib/ # Utility functions
โ โโโ assets/ # Static assets
โ
โโโ backend/ # Python backend services
โ โโโ server.py # FastAPI server (stock data API)
โ โโโ chatbot_server.py # Flask server (AI chatbot)
โ โโโ data.csv # Historical stock data (OHLC)
โ โโโ requirements.txt # Python dependencies
โ โโโ start_all_servers.py # Multi-server launcher
โ โโโ install_dependencies.py # Dependency installer
โ โโโ templates/ # Flask HTML templates
โ
โโโ public/ # Static public assets
โโโ architecture.svg # Architecture diagram
โโโ package.json # Node.js dependencies
โโโ vite.config.ts # Vite configuration
โโโ tailwind.config.ts # Tailwind CSS configuration
โโโ tsconfig.json # TypeScript configuration
โโโ vercel.json # Vercel deployment config
โโโ README.md # This file
- Real-time stock price updates from Yahoo Finance API
- Multiple theme support (Default, Doraemon, Pikachu, Shinchan)
- Live candlestick charts and trend graphs
- News ticker with latest financial updates
- Stock Market Simulator: Practice trading with virtual money
- Ten Year Bet Game: Predict long-term stock performance
- Financial Quiz: Test your knowledge with interactive questions
- News Flash Events: Random market events to challenge decision-making
- AI-powered chatbot using Google Gemini
- Context-aware investment advice
- Real-time stock data integration
- Natural language query understanding
- Track virtual investments
- Performance analytics
- Profit/Loss calculations
- Transaction history
- XP and leveling system
- Global leaderboard
- Achievement badges
- Student and adult quiz modes
GET /next_data- Fetch next OHLC data pointGET /health- Health check endpoint
POST /api/chat- Chatbot message endpointGET /api/stock-data- Current stock dataGET /- Chatbot interface
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License
Built with โค๏ธ for aspiring investors and financial learners
โญ Star us on GitHub | ๐ Report Bug | โจ Request Feature