A social platform for stock traders where users can share ideas, track sentiment, and get AI-powered insights on market discussions.
Stolk (Stocks + Stalking) is a Twitter-style platform built specifically for stock traders. Users can:
- Write posts and tag stocks using the $TICKER format (e.g., $AAPL, $TSLA)
- Mark their sentiment as Bullish, Bearish, or Neutral on each post
- View aggregated community sentiment for any stock
- Get AI-generated summaries of what the community is saying
- See news sentiment analysis with recent headlines
The goal is to help traders quickly understand market sentiment without reading through hundreds of individual posts.
Real-time sentiment aggregation from user posts with interactive donut chart and AI-generated insights.
AI-powered analysis of recent news headlines with sentiment classification and key themes.
Interactive price charts with multiple timeframe options (1D, 5D, 1M, 3M, 6M, 1Y, 5Y).
Community posts with sentiment badges, AI quality ratings, and engagement features.
User profile pages showing post history and account information.
- Real-time sentiment aggregation from user posts
- Breakdown by Bullish / Bearish / Neutral percentages
- Filter by time period (24h, 7d, 30d)
- Visual donut chart showing sentiment distribution
- Claude AI analyzes quality posts and extracts key themes
- Generates summaries of community discussions
- Sentiment strength indicators (Strong, Moderate, Weak, Mixed)
- Confidence ratings for analysis accuracy
- Fetches recent news articles for each stock
- AI-powered sentiment classification of headlines
- Displays latest headlines with source attribution
- 30-minute refresh cycle via background jobs
- Real-time quotes from Yahoo Finance
- Interactive price charts with multiple timeframes
- Key stats: market cap, volume, 52-week range
- Authentication via Clerk (sign up, sign in, profile)
- Post creation with $TICKER auto-detection
- Stock search with autocomplete
- User profiles showing post history
| Category | Technology |
|---|---|
| Framework | Next.js 16, React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS 4, shadcn/ui |
| Database | Neon (PostgreSQL) |
| ORM | Prisma |
| Auth | Clerk |
| Stock Data | yahoo-finance2 |
| AI | Anthropic Claude (claude-sonnet-4-20250514) |
| Background Jobs | Inngest |
| Charts | Recharts |
| Deployment | Vercel |
- Node.js 18+
- npm or yarn
- PostgreSQL database (recommend Neon for serverless)
- API keys for Clerk, Anthropic, and Finnhub
- Clone the repository
git clone https://github.com/yourusername/stolk.git
cd stolk- Install dependencies
npm install- Set up environment variables
cp .env.example .env-
Configure your
.envfile with the required keys (see Environment Variables below) -
Set up the database
npx prisma generate
npx prisma db push- Run the development server
npm run devCreate a .env file with the following:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Database
DATABASE_URL=postgresql://...
# Anthropic (AI)
ANTHROPIC_API_KEY=sk-ant-...
# Finnhub (News)
FINNHUB_API_KEY=...
# Inngest (Background Jobs - optional for local dev)
INNGEST_SIGNING_KEY=...
stolk/
├── app/ # Next.js app router
│ ├── api/ # API routes
│ │ ├── posts/ # Post CRUD
│ │ ├── stocks/ # Stock data, sentiment
│ │ └── webhooks/ # Clerk webhooks
│ ├── stock/[symbol]/ # Stock detail pages
│ └── profile/[username] # User profiles
├── components/
│ ├── post/ # Post form, card, list
│ ├── stock/ # Charts, sentiment displays
│ ├── layout/ # Header, navigation
│ └── ui/ # shadcn/ui components
├── lib/
│ ├── anthropic.ts # Claude AI integration
│ ├── yahoo-finance.ts # Stock data fetching
│ ├── finnhub.ts # News API
│ ├── inngest/ # Background job definitions
│ └── db.ts # Prisma client
└── prisma/
└── schema.prisma # Database schema
- User writes a post with $TICKER mentions
- Post is saved to database with parsed tickers
- Inngest triggers background job to analyze post quality with Claude
- Analysis results (quality score, themes, summary) are stored
- API counts posts by sentiment for requested ticker and time period
- If enough quality posts exist, Claude generates a summary
- Results are cached for 15 minutes to reduce API calls
- Frontend displays breakdown with donut chart and AI insights
- Inngest scheduled job runs once per month to keep background costs low
- Fetches recent news from Finnhub for active stocks
- Claude analyzes headlines and calculates sentiment percentages
- Results cached in database, served to frontend
- The
PAUSE_ALLflag inlib/anthropic.tscan disable AI calls to save costs during development - Yahoo Finance requires Node.js runtime (not Edge) - stock API routes have
runtime = "nodejs" - Clerk webhooks sync user data to the database; there's also an inline fallback in the posts API
MIT
Built by Edward Tran




