An AI-powered stock dashboard that allows users to search, track, and analyze stocks with real-time market data, personalized watchlists, and automated AI-driven insights.
Built with a modern full-stack architecture using Next.js 15, Typescript, MongoDB, Gemini AI, and Inngest workflows, the application provides a seamless experience for monitoring stocks and receiving automated financial insights.
https://stocks-market-app-livid.vercel.app/
- Secure user authentication powered by Better Auth
- MongoDB session storage
- Protected routes via middleware and root layout
- Interactive TradingView widgets
- Market overview and stock visualizations
- Real-time financial charts
- Cmd/Ctrl + K command palette
- Debounced search requests
- Powered by Finnhub API
- Default fallback for popular stocks
Users can:
- Add stocks to watchlist
- Edit company category
- Sort and filter watchlist entries
- Navigate directly to stock pages
- Watchlist data is persisted in MongoDB Atlas
The platform integrates Google Gemini AI for intelligent automation.
Capabilities:
- Personalized welcome emails
- AI-generated stock summaries
- Automated daily news digests
Powered by Inngest:
- Event-driven workflows
- Scheduled cron jobs
- AI processing pipelines
Automations include: - Welcome email generation
- Daily financial news summaries
User
โ
โผ
Next.js 15 (App Router)
โ
โโโ Authentication (Better Auth)
โ
โโโ API Routes
โ โโโ Finnhub API
โ โโโ Gemini AI
โ โโโ Watchlist CRUD
โ
โโโ MongoDB Atlas
โ
โโโ Inngest Workflows
โโโ AI Email Generation
โโโ Daily News Automation
โ
โผ
Nodemailer
โ
โผ
Gmail
- Next.js 15 (App Router + Turbopack)
- React 19
- Tailwind CSS V4
- Shadcn/ui
- Next.js API Routes
- Typescript
- MongoDB Atlas
- Mongoose
- Better-Auth
- Finnhub API: stock search and company data
- TradingView Widgets: financial charts and analytics
- Google Gemini API
- AI-powered summaries and email content generation
- Inngest
- Event-driven background tasks
- Cron-based automation
- NodeMailer
- Gmail SMTP transport
- Vercel
- User signs up / signs in
- Server actions in
auth.action.tsprocess credentials - Better-Auth manages sessions with MongoDB
- Middleware protects authenticated routes
The root layout verifies the user session.
If no session exists:
redirect โ /login
Authenticated users gain access to:
- Dashboard
- Stock pages
- Watchlist
- Search
Cmd/Ctrl + K
โ
โผ
Debounced query
โ
โผ
Finnhub API
โ
โผ
Stock result list
โ
โผ
Navigate โ /stocks/[symbol]
On Sign Up:
app/user.created
1๏ธโฃ Event emitted after signup
2๏ธโฃ Inngest function triggers
3๏ธโฃ Gemini generates personalized email content
4๏ธโฃ Nodemailer sends welcome email
A scheduled Inngest cron job runs daily.
CRON: 0 12 * * *
Timezone: Asia/Kuala_Lumpur
Workflow:
Fetch stock-related news
โ
โผ
Gemini generates summaries
โ
โผ
Email digest sent to users
git clone https://github.com/DesmondJS/Stocks_Market_App.git
cd stocks-appnpm installCreate a .env file.
NODE_ENV="development"
NEXT_PUBLIC_BASE_URL=http://localhost:3000
MONGODB_URI=
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=http://localhost:3000
GEMINI_API_KEY=
#NODEMAILER
NODEMAILER_EMAIL=
NODEMAILER_PASSWORD=
#FINNHUB
NEXT_PUBLIC_FINNHUB_API_KEY=
npm run devApp runs on:
http://localhost:3000
In another terminal run:
npx inngest-cli@latest devThis enables:
- Event workflows
- AI automation
- Cron jobs
The app is deployed using Vercel.
Deployment includes:
- Environment-based secrets
- Serverless API routes
- Inngest webhook integration
- MongoDB Atlas cloud database
Live Site:
https://stocks-market-app-livid.vercel.app/
Potential enhancements:
- ๐ Portfolio tracking
- ๐ Price alerts & notifications
- ๐ง AI-powered investment insights



