An MVP web app for company analysis with:
- market snapshot (Yahoo Finance)
- company news feed (Google News RSS)
- scenario commentary (OpenAI if key exists, otherwise heuristic fallback)
Important: this app provides educational commentary, not investment advice.
- Next.js App Router + TypeScript
- Tailwind CSS
- Server API route:
/api/company/analyze
- Install dependencies:
npm install- Optional AI setup:
cp .env.example .env.localSet OPENAI_API_KEY in .env.local if you want LLM-based scenarios. Without this key, the app uses deterministic heuristic scenarios.
- Run development server:
npm run devOpen http://localhost:3000.
Run all project checks with:
npm run validateThis command executes lint and production build checks in sequence.
The app now includes a login screen at /login and route protection via middleware.
Defaults (if env vars are not set):
- Email:
admin@ekonomi.local - Password:
ChangeMe123!
Recommended: set ADMIN_EMAIL, ADMIN_PASSWORD, and AUTH_COOKIE_VALUE in .env.local and Vercel project settings.
Endpoint:
POST /api/company/analyzeRequest body:
{
"symbol": "AAPL",
"company": "Apple"
}Response fields include market snapshot, latest headlines, and scenario blocks (baseCase, bullCase, bearCase).
- Push repository to GitHub.
- Import project in Vercel.
- Add environment variable in Vercel Project Settings:
OPENAI_API_KEY(optional)
- Deploy.
- In Vercel Project Settings, open Domains.
- Add your domain.
- Apply DNS records requested by Vercel at your registrar.
- Wait for SSL issuance and DNS propagation.
- add persistent cache (Upstash Redis)
- add rate limiting middleware
- add company autocomplete list for BIST + US tickers
- add saved analyses and usage analytics