Documentation
Using the Market Lens demo
How to get in, what each page shows, where every number comes from, and the technical detail for anyone running or integrating it.
1. Getting in
- Open marketsapp.ed-edu.online.
- Click Continue with Google and choose your Google account.
- Enter the PIN you were given and press Open the demo. You stay signed in for 7 days on that browser. Story links shared with you open straight to the story after sign-in.
- You land on Today, the front page for the current trading day.
Works in any recent browser on a laptop or phone. Your portfolio is kept in this browser only, for now.
2. A first session
- Read today's front page. The lead tells you how many companies reported results and who the big names were. Below it, the top stories: one per company, large and midcaps first.
- Open a story. Click any headline. You get the summary, key points, the company's latest quarter, and Read the original filing to check it yourself. Copy link gives you a link to send.
- Look up a company. Type a name or symbol in the search box, for example
TrentorTITAN. The company page shows its news and, once it has filed results, a chart of revenue and profit. - Add your holdings. Go to My portfolio and upload the holdings CSV from your broker (Zerodha Console, Groww, Upstox, Angel One or any file with a symbol, ISIN or company-name column), or add companies one by one. The front page and calendar then put your companies first.
- Check the calendar. Calendar lists the next three weeks of results dates and dividends. Switch between Large & midcaps, My holdings and All companies, and use Add to my calendar to subscribe in Google, Apple or Outlook.
- Browse by section. Results, Deals and Orders show one kind of news at a time, filterable by company size.
3. Where the news comes from
Every story starts as a filing a company made to the National Stock Exchange. Market Lens checks NSE's official announcements feed every ten minutes and sorts each filing into a section by its subject.
- Collect. New filings arrive from NSE's RSS feed with the company, subject and a link to the document.
- Sort and rank. Each is classified (results, orders, deals, dividends, management, ratings, legal, upcoming, other updates) and ranked by company size using NSE's index lists. Routine paperwork, such as trading-window notices, is hidden.
- Summarise. For filings that matter, Claude reads the document and writes a headline, a summary and key points. It is told to state only what the filing says, to use Indian number formats and never to give an opinion or advice.
- Extract figures. For results, it also returns the results table: revenue, total income, profit before tax, net profit and EPS, converted to ₹ crore. Figures that don't add up (for example total income below revenue) are rejected rather than stored.
- Publish. The story appears with an
AI summarylabel and a link to the original. Filings without an AI summary show the company's own subject line.
AI summaries can contain mistakes. The original filing is always one click away, and it is the authority.
4. Reading the numbers
| ₹ crore | All amounts. One crore is 10 million rupees; filings in lakh or million are converted. |
| Q2 FY27 | India's financial year runs April to March, so Q2 FY27 is July–September 2026. |
| Consolidated | The whole group including subsidiaries. Shown when the company reports it; otherwise standalone. |
| +21.9% | Change against the same quarter a year earlier. |
| Net profit | Profit attributable to the company's own shareholders where the filing gives it. |
| Size tags | Nifty 50, Next 50, Midcap 150 and Smallcap 250 come from NSE's index lists. Micro cap means listed but outside the Nifty 500. |
5. Known limits
- Financial history starts with the current results season, so most companies show three quarters for now; it grows each quarter.
- The calendar only knows notices published since 28 October 2026, so meetings announced earlier are missing until companies post updates.
- Up to 250 filings a day get AI summaries, biggest companies first; others show the company's own subject line.
- Your portfolio is stored in your browser only. Clearing site data or switching device loses it, until portfolios are saved to your account.
- Event watch covers 29 sites of 12 companies, and those sites are still being verified.
- There are no share prices, ratings or recommendations, and there won't be.
6. Technical architecture
Server. One Node process (no framework) with two dependencies: the Anthropic SDK and Zod. It serves the single-page app and a small JSON API, and runs the pollers on timers.
Pollers. NSE announcements every 10 minutes; NSE board-meeting and corporate-action feeds every 30 minutes; NSE index lists weekly; GDACS and USGS events on request with caching. Each poller records its last success for the health check.
AI queue. Filings are queued by company size, then recency, with two calls in flight and a daily cap that survives restarts. Claude returns structured output validated against a schema; transient failures are retried later.
Storage. SQLite via Node's built-in driver, in WAL mode: filings, financial periods and calendar entries. A copy is taken daily and the newest 14 are kept.
Front end. Plain HTML, CSS and JavaScript with hash routes (#/, #/story/…, #/company/…, #/calendar). The event map uses MapLibre with OpenFreeMap tiles.
Hosting. The server binds to 127.0.0.1 on the VPS under pm2. nginx terminates TLS for marketsapp.ed-edu.online, asks a small sign-in service whether the visitor has signed in with Google and entered the PIN, and forwards to it. The service records each sign-in's email and time.
7. API reference
The app's own JSON endpoints, all read-only except portfolio exposure. They sit behind the same sign-in and may change before a public data API is offered.
GET /api/brief | Today's counts, top stories, results companies, upcoming meetings and feed status |
GET /api/stories?category=&symbols=&tiers=&limit=&before= | Stories, newest first, filterable by section, companies and size |
GET /api/story/:id | One story with its company card and more from that company |
GET /api/company/:symbol | Company facts, size tier, stories and extracted financials |
GET /api/search?q= | Company search by name, symbol or ISIN |
GET /api/universe | Every NSE-listed equity: symbol, name, ISIN |
GET /api/calendar?from=&days=&symbols=&tiers= | Results dates, dividends and corporate actions (up to 60 days) |
GET /api/calendar.ics | The same as an iCalendar file |
GET /api/events · GET /api/assets | Live natural hazards; mapped company sites |
POST /api/exposure | Which of the given holdings have sites near a live event |
GET /api/health | Feed, AI and calendar status; 503 when data is stale |
8. Running it
The app deploys from the project folder with one script, which copies the code to the VPS, installs dependencies, restarts it under pm2 and sets up nginx and the certificate. Sign-in and PINs are handled by a separate service shared by every ed-edu demo. Server data and the API key are never overwritten by a deploy.
ANTHROPIC_API_KEY | Enables AI summaries. Without it, stories use the company's own subject lines. |
ML_MODEL | Which Claude model writes the stories (currently Claude Haiku 5.5). |
ML_MAX_SUMMARIES_PER_DAY | Daily cap on AI summaries (default 250). |
PORT, HOST | Where the server listens (default 127.0.0.1:4180). |
Cost. About 19,000 input tokens per filing summarised. On Claude Haiku 5.5 that is a few dollars a month at today's volume, more in results season.