Standardizing the Ingestion Interface: OpenBrokerCSV and the MIT Importer
We open-source a financial interaction workflow — not a bag of UI widgets. The concrete artifact is @pocket-portfolio/importer packages/importer, MIT on npm. It normalises br...
Persistence Honesty: Guests, Firebase, Cache, and User-Owned Sync
“Local-first” in our prose means interaction and ingestion default to the device — not “no server for signed-in users.” This part is the mode matrix every writer and growth campaign ...
The Stateless Inference Pipeline: Ephemeral Payloads and Quota Metadata
POST /api/ai/chat is Pocket Analyst’s inference hop. The route header in app/api/ai/chat/route.ts states the contract plainly:
/
Stateless: request payload message, context,...
Sanitization by Construction: Bounded Context Before the Network
Regex redaction on arbitrary broker exports fails the moment a column renames, a locale shifts decimal separators, or a merged cell appears. We chose structural exclusion: the Ask AI ...
The Architecture of Invariant Boundaries: One Deployment, Two Audiences
Procurement teams ask whether Open Portfolio is a separate product codebase. Engineers ask whether Pocket and Open can drift into incompatible releases. Both questions have the...
Interview: Pocket Portfolio × CoderLegion
1. An Overview of Your Professional Trajectory in Software Development
My introduction to programming commenced at age fifteen with Java, spanning from Standard to Enterprise editions J2SE to J2EE at Emerg...
Route to Rise: Code as the Global Language
Closing thesis: Local-first and stateless inference are portable ideas — they travel farther than any single city’s hype cycle. This serial tied every claim to how the product is actually built.
What we...
Stateless Gateway for Institutional Inference
Part 11 is vision: it describes how the Sovereign architecture Pocket Portfolio already ships in consumer form maps onto institutional connectivity VPC, managed browser, private gateways. It is not a p...
Beyond the CSV: Statements as a Product Surface
Part 10 looks past today’s CSV importers at broker statements often PDF. The architecture below is directional: we are spelling out constraints and a credible pipeline, not announcing a finished PDF-...
Measuring Loop Velocity Without Portfolio Rows
/admin/analytics is an operator console—revenue, referrals, npm packages, viral email blast stats, Pocket Analyst usage metadata. It is not a SQL console into user holdings.
API surface: GET /api/ad...
Engineering the Viral Loop
We measure referral codes and events, not holdings. K-factor style thinking applies to clicks → conversions, instrumented in Firestore, without reading the user’s portfolio.
Ingest: POST /api/referral-event
app/api/re...
Prompt Grounding in a Stateless World
When we say “CFA-grade” in product language, we mean three engineering layers: domain-scoped system text, client portfolio summary, and server-injected live quotes—plus an optional attachment lane for paid use...
Local-First: The Browser as the Vault
“IndexedDB for everything” is a marketing shorthand. Engineers need the three real persistence lanes in this codebase: guest localStorage, authenticated cloud trades, and Zustand prefs-only—plus Firestore Inde...
Growth Truth: Handling the Referral Spike
When traffic spikes, what breaks first — routing, LLM quotas, or database write paths? Here is how we framed a real referral window against a stateless chat surface.
Headline traffic GA4
Figures below a...
Sanitization by Construction: The "Edge Compiler"
Regex-based PII stripping on arbitrary exports is fragile: one new column, one merged cell, one localization change—and you leak. We chose structural exclusion: the network never sees a free-form l...
Split-Brain: Analyst-Grade Reasoning Without Raw Transactions on the Server
To deliver analyst-grade answers without centralizing the transaction tape, we engineered a deliberate split-brain: the server never needs your raw history to answer “What...
The End of Data Export: Why the Cloud is a Compliance Trap
Privacy is not a feature you bolt on at the end — it is infrastructure. For anyone with real capital at stake, the sharp risk is often not “using AI” in the abstract; it is routing the ful...
Sovereign Intelligence: The Complete 25,000 Word Blueprint Download
This 12-part series has walked through the full architecture of Pocket Analyst—the local-first financial AI that keeps your data on your device and sends only a sanitized snapshot ...