How open-dev-society/openstock works
OpenStock is a stock research and watchlist web app. Users search for a symbol, open its market and company information, and can manage personal watchlists and alerts; authentication and onboarding personalize that experience. The graph also preserves documented market-overview, sentiment, and scheduled email capabilities. The tree, README, and sampled files support these boundaries, but unsampled page and automation implementations limit certainty about some wiring.
Main entry points: functions.ts Scheduled workflows · SearchCommand.tsx Stock search · page.tsx Stock details · auth.actions.ts Auth actions
Components 28
Stock experience
- Market overview
app/(root)/page.tsx - Stock search
components/SearchCommand.tsx - Stock details
app/(root)/stocks/[symbol]/page.tsx - Market widgets
components/TradingViewWidget.tsx - Sentiment insights
components/stocks/StockSentimentCard.tsx
Identity and profiles
- Sign-in and signup
app/(auth)/sign-in/page.tsx - Auth actions
lib/actions/auth.actions.ts - Better Auth
lib/better-auth/auth.ts - Route protection
middleware/index.ts
Watchlists and alerts
- Watchlist page
app/(root)/watchlist/page.tsx - Watchlist manager
components/watchlist/WatchlistManager.tsx - Watchlist actions
lib/actions/watchlist.actions.ts - Alert actions
lib/actions/alert.actions.ts - Watchlist records
database/models/watchlist.model.ts - Alert records
database/models/alert.model.ts
Automation and messaging
- Inngest endpoint
app/api/inngest/route.ts - Scheduled workflows
lib/inngest/functions.ts - Email delivery
lib/nodemailer/index.ts
Data and integrations
- MongoDB connection
database/mongoose.ts - Market data actions
lib/actions/finnhub.actions.ts - Sentiment actions
lib/actions/adanos.actions.ts - AI provider
lib/ai-provider.ts
Other components
- Visitor
- Signed-in user
- Finnhub
- TradingView
- Inngest
- Gmail transport
Connections 33
- Visitor → Market overview: browses
- Visitor → Sign-in and signup: signs in or up
- Signed-in user → Stock search: searches
- Stock search → Market data actions: queries symbols
- Market data actions → Finnhub: fetches market data
- Stock search → Stock details: opens symbol
- Stock details → Market widgets: displays charts
- Market widgets → TradingView: loads widgets
- Stock details → Sentiment insights: shows insights
- Sentiment insights → Sentiment actions: requests analysis
- Sentiment actions → AI provider: requests inference
- Sign-in and signup → Auth actions: submits credentials
- Auth actions → Better Auth: calls auth API
- Better Auth → MongoDB connection: connects database
- Better Auth → Gmail transport: sends reset email
- Route protection → Signed-in user: checks session cookie
- Signed-in user → Watchlist page: opens watchlist
- Watchlist page → Watchlist manager: renders manager
- Watchlist manager → TradingView: embeds watchlist
- Watchlist manager → Watchlist actions: manages symbols
- Watchlist actions → Watchlist records: reads and writes
- Watchlist records → MongoDB connection: uses connection
- Signed-in user → Alert actions: manages alerts
- Alert actions → Alert records: reads and writes
- Alert records → MongoDB connection: uses connection
- Auth actions → Inngest: sends signup event
- Inngest → Inngest endpoint: invokes endpoint
- Inngest endpoint → Scheduled workflows: registers workflows
- Scheduled workflows → Email delivery: sends summaries
- Email delivery → Gmail transport: delivers email
- Scheduled workflows → Alert records: checks stored alerts
- Scheduled workflows → AI provider: requests inference
- Market overview → Market widgets: shows market views