What

Sanchayam is a self-hosted multi-asset portfolio tracker. It tracks equity (Indian and US markets), mutual funds, crypto, bank balances, and real estate under one unified schema. It computes FIFO cost basis, realized P&L, and XIRR per holding and across the entire portfolio. It handles multiple currencies with automatic FX conversion. Multiple users can share a family portfolio view.

Why

Most portfolio trackers are either too narrow (they handle equities but not real estate), too opinionated (they force a specific cost basis method), or they require handing your financial data to a third party. Sanchayam is self-hosted, schema-driven, and designed for the full breadth of assets a typical Indian investor actually holds: listed equities, unlisted holdings, mutual fund NAVs, crypto, bank balances across currencies, and illiquid real estate.

The core question it answers: what is my net worth today, what has each holding returned, and how has the total portfolio performed over time - across asset classes, across currencies, and across family members.

Asset Classes

Six data types, each with distinct behavior for pricing, quantity tracking, and cost basis:

Data typeExamplesPrice sourceCost basis
equity_indiaNSE/BSE stocksTwelve Data APIFIFO lots
equity_usNASDAQ/NYSE stocksTwelve Data / Yahoo FinanceFIFO lots
mutual_fund_indiaAny AMFI-registered fundmfapi.inFIFO lots
cryptoBTC, ETH, USDTTwelve DataFIFO lots
bank_balanceSavings accountsManual entry (1 unit = 1 currency unit)Lot-based balance
real_estateProperty, landManual valuationFixed or floating

All six flow through the same assets catalog and holdings tables. The difference is in the schema flags that control pricing behavior, quantity tracking, and whether FIFO applies.

The Schema-Driven Design

Every asset in Sanchayam is a row in an admin-managed catalog table. The catalog specifies behavior: does this asset have discrete units or a single lump value, does price come from an API or manual entry, how is cost basis computed. User holdings reference catalog assets and inherit all of those behaviors.

Adding a new tradable instrument does not require code changes. The admin registers it in the catalog with the right flags and the system routes it correctly through pricing, snapshots, and XIRR.

Deliberately Slow-Paced

Sanchayam is not built for people who check their portfolio three times a day. If that is you, this is not your tool.

It is built for investors who have a lot to track but do not need to watch it constantly. You log your transactions when they happen - a buy, a sell, a deposit. Then you close the tab. The system runs its Friday snapshot, fetches the week’s prices, computes XIRR across all your holdings, and has everything ready. When you come back - maybe next week, maybe next month - the numbers are already there, warmed up.

The weekly cadence is a design choice, not a limitation. Daily snapshots would generate more data for a view nobody uses daily. A price feed that runs every minute would burn API quota on assets nobody is looking at. The 48-hour consumption window that gates price refreshes exists precisely because assets that nobody has checked in two days do not need fresh prices. The system is calibrated to be useful for the investor who shows up occasionally, not the one who refreshes obsessively.

If you plug in your numbers and come back in a week to find a clean portfolio chart, realized P&L, and XIRR across every asset class - that is the intended experience.

Stack

Backend: Node.js + TypeScript + Fastify

Frontend: React + Vite

Database: PostgreSQL

Price feeds: Twelve Data (equity, crypto, FX), mfapi.in (Indian mutual funds), Yahoo Finance (corporate actions, historical weekly prices)

Corporate action extraction: DeepSeek (parsing NSE announcement text into structured events)

Infrastructure: Backend as a systemd service, frontend on S3 + CloudFront via GitHub Actions

This Series