Ledger Attachments: Multiple File Upload with Per-File Queues

Part of the Sanchayam series. What The ledger is Sanchayam’s expense and income tracker. Every entry can carry supporting documents stored in S3: receipts, invoices, settlement reports. The first version of the attachment panel accepted one file per trip through the file picker. Adding five receipts to one entry meant opening the picker five times and waiting for each upload to finish before starting the next. The panel now accepts a whole batch in one pick. This post covers how that works: per-file queues, sequential uploads, up-front validation, and retryable failures. ...

June 14, 2026 · 4 min · 847 words · Sagar Nayak

Parsing NSE Announcements with DeepSeek

Part of the Sanchayam series. Expands Stage 2 of the corporate actions pipeline. What Sanchayam computes FIFO cost basis and XIRR from historical prices. Prices are fetched by trading symbol. When a company changes its symbol (INFOSYSTCH to INFY) or its name (Hindustan Lever to Hindustan Unilever), a price lookup by the current symbol silently misses every week before the change. The backfill pipeline fixes this with an alias table. One row per symbol-and-name period, so each historical date range is queried with the symbol that was live at the time. Yahoo Finance supplies splits and bonuses. NSE corporate announcements supply name changes, symbol changes, and mergers. ...

June 2, 2026 · 7 min · 1398 words · Sagar Nayak

Deploying Sanchayam

Part of the Sanchayam series. Overview Sanchayam has two deployable components: Backend: Node.js process running as a systemd service behind nginx Frontend: Static React build deployed to S3, served via CloudFront Prerequisites A Linux server with Node.js 18+ and PostgreSQL An AWS account with an S3 bucket and CloudFront distribution for the frontend A domain with DNS pointing to your server (for TLS) A Twelve Data API key (free tier at twelvedata.com - 8 calls/minute) Backend Clone and install: ...

May 26, 2026 · 3 min · 511 words · Sagar Nayak

Corporate Actions and the Backfill Pipeline

Part of the Sanchayam series. The Problem When an Indian equity undergoes a 2-for-1 stock split, a holding that showed 100 shares should now show 200 shares at half the price. The historical lot prices need to be adjusted retroactively - otherwise the cost basis and XIRR calculations are wrong. Similarly, when a company changes its name or trading symbol (Infosys was previously INFOSYSTCH, Hindustan Unilever was Hindustan Lever), historical price data retrieved by the current symbol will not cover periods before the name change. ...

May 20, 2026 · 5 min · 865 words · Sagar Nayak

Friday Snapshots: Weekly Portfolio and Historical Backfill

Part of the Sanchayam series. Why Friday Portfolio performance is tracked week by week, not day by day. Daily snapshots would generate a large amount of data for a view that is displayed weekly at best. Friday is chosen because Indian markets close at 3:30 PM IST on Friday. The snapshot cron runs at 11:00 AM UTC, which is 4:30 PM IST - 30 minutes after market close, giving price feeds time to settle. ...

May 14, 2026 · 4 min · 811 words · Sagar Nayak