Overview
NepseSage AI is a full-stack, professional-grade market analysis platform purpose-built for Nepal Stock Exchange (NEPSE) investors. Built on a 'Clinical Analyst' philosophy, it combines a Next.js 15 App Router frontend with an Express.js/Node.js backend and MongoDB to deliver institutional-caliber tools — real-time portfolio tracking, AI-powered symbol analysis, behavioral psychology insights, and risk-free strategy simulation — to retail investors who previously had none of this.
Problem Solved
Nepali retail investors are forced to make high-stakes decisions with inadequate data, zero behavioral guardrails, and no professional tooling. NepseSage closes that gap — bringing institutional-grade portfolio analytics, an AI analyst engine, and a dedicated trading psychology layer to anyone with a NEPSE account.
Key Modules
Clinical Dashboard
Mission control for investors. Tracks real-time portfolio value and P&L, surfaces a proprietary 'Discipline Score', and shows live Portfolio Beta alongside volatility ratings — all in one high-density view.
Sage AI Engine
OpenAI-powered analytical core at /sage-ai. Performs technical analysis for NEPSE symbols (NICA, NTC, etc.) — detecting support/resistance levels, interpreting indicators, and aggregating market sentiment signals.
Behavior Lab & Journal
The trading psychologist at /journal. Logs emotional state during every trade, runs automatic pattern recognition to identify FOMO and Revenge Trading behaviors, and auto-flags 'Red Flag' patterns before they become habits.
Strategy Simulator
Risk-free environment at /simulator for testing strategies with real NEPSE market data and virtual capital — validate approaches before committing real money.
Technical Architecture
Structured as a monorepo with two isolated workspaces: /server (Express.js, controllers, Mongoose models for User/Portfolio/Journal, JWT middleware, node-cron background jobs, OpenAI service integration) and /web-app (Next.js 15 App Router, Shadcn/Radix UI components, AuthContext, custom hooks, Zod schema validation). The backend exposes REST endpoints consumed by the frontend via NEXT_PUBLIC_API_URL.
Design Language
Built around a bespoke 'Clinical Navy' design language: OKLCH-based color tokens for mathematically perfect light/dark transitions, hardware-accelerated micro-interactions via Framer Motion, Recharts for financial data visualization, and a dual-typography system using Space Grotesk (headings/impact) paired with DM Sans (data-dense utility readouts). Styled with Tailwind CSS 4.