Skip to content

Mmaneesh007/india-trade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ IndiaTrades - Real-Time Indian Stock Market Platform

React Node.js Socket.io Supabase Tailwind CSS License

A production-ready, enterprise-grade stock market trading and analytics platform for Indian equities (NSE/BSE)

Live Demo β€’ API Docs β€’ Architecture β€’ Developer Guide


🎯 Executive Summary

IndiaTrades is a full-stack fintech application that provides real-time stock market data, trading capabilities, portfolio management, and market analytics for Indian equities. Built with modern technologies and designed with enterprise-grade architecture patterns, it demonstrates proficiency in:

  • Real-Time Systems - WebSocket-based live price streaming
  • Event-Driven Architecture - Pub/Sub pattern for efficient data distribution
  • Microservices-Ready Design - Modular, scalable backend structure
  • Secure Authentication - JWT-based auth with Row Level Security (RLS)
  • Modern Frontend - React 18 with advanced state management

πŸ—οΈ System Architecture

IndiaTrades System Architecture


✨ Key Features

πŸ“Š Real-Time Dashboard

  • Live price streaming with WebSocket connections
  • Interactive candlestick charts (Lightweight Charts)
  • Customizable watchlist with instant updates
  • Portfolio value tracking with P&L calculations

πŸ“ˆ Market Analytics

  • Top Gainers/Losers - Real-time market movers
  • Volume Shockers - Unusual volume detection
  • Price Shockers - Significant price movements
  • 52-Week High/Low tracking

πŸ’Ή Trading System

  • Buy/Sell order placement (NSE/BSE)
  • Delivery and Intraday options
  • Real-time order status updates
  • Transaction history with P&L summary

🎯 IPO Tracker

  • Upcoming IPO calendar
  • Subscription status tracking
  • GMP (Grey Market Premium) updates
  • Listing gain analysis

πŸ’° Mutual Funds

  • Fund categorization (Equity, Debt, Hybrid)
  • NAV tracking and returns analysis
  • Star rating display
  • AUM and asset size metrics

πŸ” Authentication & Security

  • Supabase Auth integration
  • JWT-based session management
  • Row Level Security (RLS) policies
  • Secure API endpoints

πŸ› οΈ Technology Stack

Layer Technologies
Frontend React 18, Vite 5, TailwindCSS 3.3, Framer Motion
State Management React Context API, Custom Hooks
Charts Lightweight Charts (TradingView)
Backend Node.js 18+, Express 4.18, Socket.io 4.7
Database Supabase (PostgreSQL), Row Level Security
Authentication Supabase Auth (JWT)
APIs Yahoo Finance, RapidAPI (Indian Stock Exchange)
Deployment Render (Backend + Frontend), Vercel (Alternative)

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Git
  • Supabase account (for database)

1. Clone the Repository

git clone https://github.com/Mmaneesh007/india-trade.git
cd india-trade

2. Backend Setup

cd backend
npm install

# Create .env file
cp .env.example .env
# Add your Supabase credentials to .env

npm run dev

Backend runs on http://localhost:4000

3. Frontend Setup

cd frontend
npm install
npm run dev

Frontend runs on http://localhost:5173

4. Environment Variables

Backend (.env)

SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
PORT=4000

Frontend (.env)

VITE_API_URL=http://localhost:4000
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

πŸ“ Project Structure

indian-stock-live/
β”œβ”€β”€ backend/                    # Node.js API Server
β”‚   β”œβ”€β”€ routes/                 # API Route Handlers
β”‚   β”‚   β”œβ”€β”€ quotes.js           # Stock quotes endpoints
β”‚   β”‚   β”œβ”€β”€ movers.js           # Market movers (gainers/losers)
β”‚   β”‚   β”œβ”€β”€ transactions.js     # Trading transactions
β”‚   β”‚   β”œβ”€β”€ watchlist.js        # Watchlist management
β”‚   β”‚   β”œβ”€β”€ ipo.js              # IPO data endpoints
β”‚   β”‚   └── mutualfunds.js      # Mutual funds data
β”‚   β”œβ”€β”€ services/               # Business Logic
β”‚   β”‚   └── marketData.js       # Yahoo Finance integration
β”‚   β”œβ”€β”€ socket.js               # WebSocket server setup
β”‚   β”œβ”€β”€ supabaseClient.js       # Database client
β”‚   └── server.js               # Express app entry point
β”‚
β”œβ”€β”€ frontend/                   # React Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/              # Route Components
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx   # Main trading dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ MarketMovers.jsx# Market analytics page
β”‚   β”‚   β”‚   β”œβ”€β”€ TradePage.jsx   # Stock trading page
β”‚   β”‚   β”‚   └── MutualFunds.jsx # Mutual funds explorer
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.jsx      # Navigation & search
β”‚   β”‚   β”‚   β”œβ”€β”€ StockChart.jsx  # Candlestick charts
β”‚   β”‚   β”‚   β”œβ”€β”€ TopMovers.jsx   # Gainers/Losers widget
β”‚   β”‚   β”‚   └── Watchlist.jsx   # Watchlist component
β”‚   β”‚   β”œβ”€β”€ context/            # React Context Providers
β”‚   β”‚   └── api.js              # API client configuration
β”‚   └── vite.config.js          # Build configuration
β”‚
β”œβ”€β”€ docs/                       # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md         # System design document
β”‚   β”œβ”€β”€ API_DOCUMENTATION.md    # API reference
β”‚   β”œβ”€β”€ DATABASE_SCHEMA.md      # Database design
β”‚   β”œβ”€β”€ DEVELOPER_GUIDE.md      # Developer onboarding
β”‚   β”œβ”€β”€ DEVOPS_GUIDE.md         # Operations guide
β”‚   └── INTERVIEW_PREP.md       # MNC interview talking points
β”‚
└── render.yaml                 # Render deployment config

πŸ“š Documentation

Document Description
Architecture System design, data flow, scalability
API Documentation Complete API reference
Database Schema Supabase tables, RLS policies
Developer Guide Setup, conventions, testing
DevOps Guide Deployment, monitoring, operations
Interview Prep System design discussion points

🎀 For Interviewers

This project demonstrates:

  1. System Design Skills - Scalable real-time architecture
  2. Full-Stack Proficiency - React + Node.js + PostgreSQL
  3. API Design - RESTful + WebSocket hybrid approach
  4. Security Best Practices - RLS, JWT, secure configurations
  5. DevOps Knowledge - CI/CD, containerization-ready
  6. Code Quality - Modular, maintainable structure

πŸ“– See INTERVIEW_PREP.md for detailed system design discussion points.


🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Manish
Full-Stack Developer | Fintech Enthusiast

GitHub LinkedIn


⭐ Star this repository if you find it helpful!

Built with ❀️ for the Indian Stock Market

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages