Stock X
NEPSE analytics: live floorsheet plus AI insights on your portfolio.
Stock X is a NEPSE analytics platform for following Nepal's stock market and understanding your own portfolio.
Problem
NEPSE data is public but scattered and awkward to use. Investors who want floorsheet detail, a clear view of their portfolio and plain-language analysis end up stitching it together by hand.
What I built
A dashboard with portfolio value, unrealised P&L, the NEPSE index and a market summary; per-stock pages with a full floorsheet broken down by broker; watchlists, alerts, news and paper trading; and AI portfolio insights that combine computed signals (such as concentration in a single holding) with an LLM-written summary. Access is closed-group, with optional Google sign-in and MFA.
Feature reel
Floorsheet
Every trade in a NEPSE stock, broker by broker.
Login
Closed-group access with email or username sign-in.
Dashboard
Portfolio value, P&L and the NEPSE index at a glance.
Architecture & stack
- Spring Boot 3.4 (Java 21) REST API with Flyway-managed PostgreSQL schema (60+ versioned migrations)
- Next.js 16 frontend, deployed on Vercel
- Scheduled scrapers for NEPSE market data and floorsheets, wrapped in a circuit breaker, rate limiter and retries because the upstream source is unreliable
- Argon2id password hashing, short-lived access tokens and rotating refresh tokens in an HttpOnly cookie
- Pluggable LLM providers (Gemini or a local Ollama model) with per-user quotas; when no model is available the insight still returns its computed signals and withholds only the narrative
- Docker for the backend and database
What I learned
When you depend on a data source you do not control, resilience is a feature: breakers, retries and clear failure states matter as much as the happy path. Keeping the AI layer on top of deterministic signals means the analysis stays explainable and degrades gracefully instead of failing outright.