A modern, full-stack stock market analysis and portfolio tracking application built with Next.js, React, and TypeScript. Signalist provides real-time market data, advanced charting tools and personalized news summaries for individual investors.
- Real-Time Market Overview - Interactive TradingView widgets displaying market heatmap, overview, quotes, and timeline
- Stock Search & Discovery - Advanced search with autocomplete and keyboard shortcuts (Cmd/Ctrl + K)
- Detailed Stock Analysis - Multi-chart view including candlestick charts, technical analysis, and company financials
- Market News & Headlines - Curated news feed powered by Finnhub API
- Authentication - Secure email/password authentication with better-auth
- Personalized Onboarding - AI-generated welcome emails based on investment profile
- Daily News Summaries - Automated email digests of market news tailored to watched stocks (powered by Inngest & Gemini AI)
- Dark Mode - Built-in theme switching with next-themes
- Responsive Design - Mobile-first design with Tailwind CSS
- Smooth Animations - Enhanced UX with tailwindcss-animate
- TradingView Integration - Multiple embedded chart widgets for comprehensive market analysis
- Intelligent Job Queue - Inngest-powered background jobs for email delivery and AI processing
- MongoDB Atlas - Persistent data storage with Mongoose ODM
- Email Service - Nodemailer integration for transactional and marketing emails
- React Compiler - Babel React Compiler enabled for optimized rendering
- Next.js 16.1 - React framework with App Router
- React 19.2 - UI library with concurrent rendering
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first styling
- Shadcn/ui - High-quality UI components
- Radix UI - Accessible component primitives
- Sonner - Toast notifications
- React Hook Form - Efficient form handling
- React Select - Searchable dropdown selects
- Next.js API Routes - Serverless API endpoints
- Better Auth - Full-featured authentication
- MongoDB - NoSQL database
- Mongoose - MongoDB ODM
- Finnhub API - Stock data, news, and market information
- Inngest - Event-driven job queue and workflows
- TradingView - Professional charting widgets
- Nodemailer - Email delivery
- Gemini AI - Personalized content generation
- Node.js 18+ and npm/yarn
- MongoDB Atlas account and connection string
- Finnhub API key (free at finnhub.io)
- Inngest account (free at inngest.com)
- Gmail or other email service for nodemailer
- Clone and install:
git clone <repository-url>
cd stocks_app
npm install- Configure environment variables:
Create a .env.local file:
# Database
MONGODB_URI=your_mongodb_connection_string
# Authentication
BETTER_AUTH_SECRET=your_random_secret_key_here
BETTER_AUTH_URL=http://localhost:3000
# APIs
FINNHUB_API_KEY=your_finnhub_api_key
NEXT_PUBLIC_FINNHUB_API_KEY=your_finnhub_api_key
# Inngest (background jobs)
INNGEST_API_KEY=your_inngest_api_key
INNGEST_EVENT_KEY=your_inngest_event_key
# Email (Nodemailer)
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
EMAIL_FROM=noreply@signalist.app
# Gemini AI (for personalized content)
GEMINI_API_KEY=your_gemini_api_key- Run development server:
npm run devOpen http://localhost:3000 to view the application.
stocks_app/
βββ app/ # Next.js App Router
β βββ (auth)/ # Auth pages (sign-in, sign-up)
β βββ (root)/ # Main app pages
β β βββ page.tsx # Dashboard with market overview
β β βββ stocks/[symbol]/ # Stock detail pages
β βββ api/ # API routes
β βββ inngest/ # Background job webhooks
β
βββ components/ # React components
β βββ TradingViewWidget.tsx # Chart embedding component
β βββ SearchCommand.tsx # Stock search with cmd+k
β βββ WatchlistButton.tsx # Watchlist management
β βββ UserDropdown.tsx # User menu
β βββ Header.tsx # Navigation header
β βββ forms/ # Form components
β
βββ lib/ # Utilities and server actions
β βββ actions/ # Server-only actions
β β βββ auth.actions.ts # Auth helpers
β β βββ finnhub.actions.ts # Stock data fetching
β β βββ user.actions.ts # User management
β β βββ watchlist.actions.ts # Watchlist operations
β βββ better-auth/ # Auth configuration
β βββ inngest/ # Background job definitions
β β βββ client.ts # Inngest client
β β βββ functions.ts # Job functions
β β βββ prompts.ts # AI prompts
β βββ nodemailer/ # Email service
β βββ constants.ts # App constants & configs
β βββ utils.ts # Helper utilities
β
βββ database/ # Database configuration
β βββ mongoose.ts # MongoDB connection
β βββ models/ # Mongoose schemas
β βββ watchlist.model.ts # Watchlist document
β
βββ hooks/ # React hooks
β βββ useDebounce.tsx # Debounce hook
β βββ useTradingViewWidget.tsx # Widget loading hook
β
βββ middleware/ # Next.js middleware
β βββ index.ts # Auth guard middleware
β
βββ public/ # Static assets
βββ assets/ # Icons and images
Reusable component for embedding professional chart widgets from TradingView:
- Market Overview
- Stock Heatmap
- Advanced Charts (Candlestick, Baseline)
- Technical Analysis
- Company Financials
- Symbol Info
Command palette-style search with:
- Keyboard shortcut (Cmd/Ctrl + K)
- Real-time stock filtering from Finnhub
- Direct links to stock detail pages
- Users sign up with email, password, and investment profile
- Profile includes country, investment goals, risk tolerance, and preferred industries
- Welcome email generated by Gemini AI based on profile
- Better-auth manages sessions and cookies
- Middleware protects authenticated routes
- MongoDB document stores user watchlist entries
- Add/remove stocks with one click
- Filtered news summaries based on watched symbols
- Daily email digests of relevant market news
- Sign-up email: Triggered on user creation, generates personalized welcome
- Daily news digest: Scheduled job for watchlist-based news summaries
- Uses Gemini AI for content generation and personalization
npm run build
vercel deployConfigure environment variables in Vercel dashboard with all values from .env.local.
- MongoDB Atlas must allow connections from Vercel IPs
- Inngest webhooks require public API endpoint
- Email service credentials must be environment variables
- Gemini API key should be kept secret
- Stock search and metadata
- Company news by symbol
- General market news
- Real-time quote data
- Embedded professional charts
- No API calls (server-side rendering)
- Lightweight iframe integration
- Event-driven job scheduling
- Background task processing
- Function chaining for workflows
- Session-based authentication with better-auth
- Middleware protection for authenticated routes
- API key validation and environment variable isolation
- MongoDB unique indexes prevent duplicate watchlist entries
- Secure email delivery with app passwords
Edit dark/light mode in components/ui/ components. Theme switching uses next-themes.
Modify chart configs in lib/constants.ts:
- Colors, timeframes, and display options
- Widget-specific configurations
- Market data preferences
Update email templates in lib/nodemailer/templates.ts for onboarding and news digests.
Customize personalization prompts in lib/inngest/prompts.ts for Gemini AI content generation.
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection string | mongodb+srv://... |
BETTER_AUTH_SECRET |
Auth secret key | random_32_char_string |
BETTER_AUTH_URL |
Auth callback URL | http://localhost:3000 |
FINNHUB_API_KEY |
Finnhub API key | sk_... |
INNGEST_API_KEY |
Inngest API key | fnst_... |
EMAIL_USER |
Email sender address | noreply@example.com |
EMAIL_PASSWORD |
Email service password | app_specific_password |
GEMINI_API_KEY |
Google Gemini API key | AIzaSy... |
Contributions are welcome! Please:
- Create a feature branch
- Make your changes
- Submit a pull request
For issues and questions:
- Check existing GitHub issues
- Open a new issue with details and reproduction steps
- Contact the development team
- Next.js Documentation
- React Documentation
- Finnhub API Docs
- TradingView Widgets
- Inngest Documentation
- better-auth Docs
- Tailwind CSS