Skip to content

Real-time Indian stock market tracker with live data, interactive charts, and personalized watchlists. Built with Next.js & TypeScript.

Notifications You must be signed in to change notification settings

ateendra24/Realtime_Stock_Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Signal Logo

๐Ÿ“ˆ Real-time Stock Tracker

Track Indian Stock Market in Real-Time with Advanced Analytics

Next.js React TypeScript MongoDB TailwindCSS

Demo โ€ข Features โ€ข Installation โ€ข Usage โ€ข Tech Stack

๐Ÿ“ธ Demo

Dashboard Preview

Real-time Indian Stock Market Dashboard with Interactive Charts

โœจ Features

๐ŸŽฏ Core Features

  • Real-time Stock Data - Live prices and market data for Indian stocks (NSE/BSE)
  • Interactive TradingView Charts - Professional-grade candlestick, baseline, and technical analysis charts
  • Market Overview - Comprehensive dashboard with heatmaps and market quotes
  • Stock Search - Powerful search functionality to find Indian stocks instantly
  • Watchlist Management - Create and manage your personalized stock watchlist
  • Company Insights - Detailed company profiles and financial data

๐Ÿ“Š Market Analytics

  • Technical Analysis - Real-time technical indicators and analysis
  • Company Financials - Balance sheets, income statements, and key metrics
  • Market Heatmap - SENSEX sector visualization with performance tracking
  • News Feed - Latest market news and company-specific updates

๐Ÿ” User Features

  • Authentication - Secure sign-up/sign-in with Better Auth
  • Personalized Experience - Custom watchlists and preferences
  • Email Notifications - Daily market summaries and news updates
  • User Profiles - Investment goals, risk tolerance, and preferred industries

๐ŸŽจ UI/UX

  • Dark Mode - Modern, eye-friendly dark theme
  • Responsive Design - Optimized for desktop, tablet, and mobile
  • Keyboard Shortcuts - Quick access with Cmd/Ctrl + K
  • Beautiful Components - Built with Radix UI and Shadcn/ui

๐Ÿš€ Tech Stack

Frontend

Backend & Database

APIs & Integrations

Development Tools

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js 20+ installed
  • MongoDB database (local or cloud)
  • Finnhub API key (Get it here)
  • Better Auth credentials

Setup Steps

  1. Clone the repository
git clone https://github.com/ateendra24/Realtime_Stock_Tracker.git
cd Realtime_Stock_Tracker
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
  1. Environment Configuration

Create a .env.local file in the root directory:

# MongoDB
MONGODB_URI=your_mongodb_connection_string

# Better Auth
BETTER_AUTH_SECRET=your_secret_key_here
BETTER_AUTH_URL=http://localhost:3000

# Finnhub API
FINNHUB_API_KEY=your_finnhub_api_key
NEXT_PUBLIC_FINNHUB_API_KEY=your_finnhub_api_key

# Inngest (Optional)
INNGEST_EVENT_KEY=your_inngest_event_key
INNGEST_SIGNING_KEY=your_inngest_signing_key

# Email (Optional - for notifications)
EMAIL_USER=[email protected]
EMAIL_PASS=your_email_app_password
  1. Test Database Connection
npm run test:db
  1. Run the development server
npm run dev
  1. Open your browser
http://localhost:3000

๐ŸŽฎ Usage

For Visitors (No Login Required)

  1. Browse Dashboard - View real-time Indian market data
  2. Explore Stocks - Search and view individual stock details
  3. View Charts - Access TradingView charts and technical analysis

For Registered Users

  1. Create Account - Sign up with email and preferences
  2. Build Watchlist - Add your favorite Indian stocks
  3. Set Alerts - Configure price alerts (coming soon)
  4. Get Updates - Receive daily market summaries via email

Keyboard Shortcuts

  • Cmd/Ctrl + K - Open stock search
  • Navigate through stocks quickly with keyboard

๐Ÿ“‚ Project Structure

stock/
โ”œโ”€โ”€ app/                      # Next.js App Router
โ”‚   โ”œโ”€โ”€ (auth)/              # Authentication pages
โ”‚   โ”‚   โ”œโ”€โ”€ sign-in/
โ”‚   โ”‚   โ””โ”€โ”€ sign-up/
โ”‚   โ”œโ”€โ”€ (root)/              # Main application
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx         # Dashboard
โ”‚   โ”‚   โ””โ”€โ”€ stocks/[symbol]/ # Stock details page
โ”‚   โ”œโ”€โ”€ api/                 # API routes
โ”‚   โ””โ”€โ”€ layout.tsx           # Root layout
โ”œโ”€โ”€ components/              # React components
โ”‚   โ”œโ”€โ”€ ui/                  # Shadcn/ui components
โ”‚   โ”œโ”€โ”€ forms/               # Form components
โ”‚   โ”œโ”€โ”€ Header.tsx
โ”‚   โ”œโ”€โ”€ SearchCommand.tsx
โ”‚   โ””โ”€โ”€ TradingViewWidget.tsx
โ”œโ”€โ”€ lib/                     # Utilities and actions
โ”‚   โ”œโ”€โ”€ actions/             # Server actions
โ”‚   โ”œโ”€โ”€ better-auth/         # Auth configuration
โ”‚   โ”œโ”€โ”€ inngest/             # Background jobs
โ”‚   โ”œโ”€โ”€ nodemailer/          # Email templates
โ”‚   โ”œโ”€โ”€ constants.ts         # App constants
โ”‚   โ””โ”€โ”€ utils.ts             # Helper functions
โ”œโ”€โ”€ database/                # Database models
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ mongoose.ts
โ”œโ”€โ”€ hooks/                   # Custom React hooks
โ”œโ”€โ”€ middleware/              # Next.js middleware
โ”œโ”€โ”€ public/                  # Static assets
โ””โ”€โ”€ types/                   # TypeScript definitions

๐ŸŒŸ Key Features Explained

1. Indian Stock Market Focus

  • Supports NSE (National Stock Exchange) and BSE (Bombay Stock Exchange)
  • 45+ popular Indian stocks across all sectors
  • SENSEX heatmap visualization
  • Indian market news feed

2. TradingView Integration

Six professional widgets:

  • Symbol Information
  • Candlestick Chart
  • Baseline Chart
  • Technical Analysis
  • Company Profile
  • Financial Statements

3. Smart Authentication

  • Public access to dashboard and stock pages
  • Seamless sign-in/sign-up experience

4. Background Jobs with Inngest

  • Automated daily news summaries
  • Personalized email notifications
  • Welcome emails for new users

๐Ÿ”ง Available Scripts

# Development
npm run dev          # Start development server with Turbopack

# Production
npm run build        # Build for production
npm start            # Start production server

# Utilities
npm run lint         # Run ESLint
npm run test:db      # Test database connection

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

๐Ÿ“ Environment Variables

Variable Description Required
MONGODB_URI MongoDB connection string โœ… Yes
BETTER_AUTH_SECRET Secret key for auth โœ… Yes
BETTER_AUTH_URL Application URL โœ… Yes
FINNHUB_API_KEY Finnhub API key โœ… Yes
INNGEST_EVENT_KEY Inngest event key โŒ Optional
EMAIL_USER Email for notifications โŒ Optional
EMAIL_PASS Email password โŒ Optional

โญ Star this repo if you find it helpful!

About

Real-time Indian stock market tracker with live data, interactive charts, and personalized watchlists. Built with Next.js & TypeScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published