Skip to content
Abhishek KolgeSenior AI Product Engineer
Index

Hedged, trading guidance for people who have never hedged anything, served to three clients from one API and one socket gateway.

Fintech · Regulated advice · Web, iOS & Android · hedged.in (opens in a new tab)

Role
Full-stack: the API, the realtime layer, and the web and mobile clients
Team
4 engineers · 5 months to launch
Stack
Node.js, Socket.io, MySQL, Next.js, React Native, Docker on AWS
hedged.in today, still leading with the problem the product was built around: almost everything sold to a retail investor is long only

Problem

Almost everything sold to a retail investor in India is long only, so a first-timer learns about risk the hard way, in a month when the market falls. The product’s answer was hedged ideas with the instruction spelled out, down to the capital required and the worst case. That made it an engineering problem with a deadline, because an idea is only worth something while its price holds. The same instruction has to reach the web app, an iPhone and an Android phone within seconds and look identical on all three.

Approach

One Node API owns the ideas, the positions and who may see what. A socket gateway pushes new ideas, price moves and alerts to whoever is connected, so nothing depends on a client remembering to ask. The clients are deliberately thin. They render the payload, and the numbers on the card come from the server instead of being calculated twice in two languages. The app advises and stops there, so nobody’s money moves inside it.

A published idea in the app today: the structure, the capital it needs, the most it can make and the most it can lose, with placing the order left to your own broker

By the numbers

3 clients
web, iPhone and Android served by one Node API and one socket gateway
5 months
from first commit to a launch on all three, with four engineers
0 orders
placed inside the app by design, because the broker moves the money
100k+
Play Store installs today, the client’s own work after the build I shipped
4.5★
on Play from 344 ratings, and 4.8★ on the App Store
Still shipping
live and updated under the client’s team, now with macOS and Apple Vision builds alongside the phones

Architecture

Clients
Next.js on the web, one React Native codebase for iOS and Android
API
Node.js REST, one contract for all three clients
Realtime
Socket.io gateway for published ideas, price moves and alerts
Data
MySQL through Sequelize
Access
Three tiers, free through to one with a minimum capital requirement, deciding which ideas an account can see
Infra
Docker images on AWS, same image in every environment

Decisions

  • Keeping access rules in one backendPublishing an idea is one write and one push, and everything deciding who sees it lives in that one place. Otherwise each client decides for itself, and a paid idea showing on a free account becomes a problem for the advice business.
  • Pushing updates over socketsDuring market hours a polling client is either late or expensive. Prices, alerts and new ideas go out over sockets as they happen, and the phones hold the connection while the app is open instead of waking every few seconds to ask what changed.
  • The app stops at adviceWe drew the line at the instruction. The card tells you the trade, the capital it needs, the most you can make and the most you can lose. Then you place it with your broker. That kept a regulated product clear about what it does, and kept order execution, where things go badly wrong, out of a five-month build by four people.
  • Choosing a relational databasePositions, entitlements and published ideas went into MySQL with constraints rather than something flexible. A recommendation is a record you may have to show someone later, so the schema should refuse a half-written one.
  • Containerised from day oneThe same Docker image runs in dev, staging and production. Four people cannot afford to spend a market morning finding out the server has a different Node version than the laptop that passed the tests.

Outcome

We launched on web, iOS and Android inside five months from one API and one socket gateway, with four engineers and no separate mobile team. The client’s own team has carried it since: past 100,000 installs on Play at 4.5 stars, 4.8 on iOS, and it now ships for macOS and Apple Vision too. I shipped the launch, and the growth since then is their work.

Résumé (opens in a new tab)