Back to projects
WebFrontend · Team project

Investra - Investment Platform

Full-stack investment management platform with real-time trading and portfolio tracking.

Next.jsTypeScriptJavaSpring BootSpring SecuritySQL ServerDockerRedis

Financial institutions need a secure, scalable platform to manage stock trading, multi-currency portfolios, and customer accounts - all in one place. Investra is a full-stack simulation of that platform, built by a four-person intern team during my internship at Infina Yazılım: a Spring Boot backend fronting a Next.js dashboard, with role-based access for ADMIN, TRADER, and USER accounts.

Investra trading dashboard

My role

Investra was a four-person team project, and I was the main frontend developer. I set up the Next.js/TypeScript app and built most of its pages and components: the trading flows (stock list, buy/sell pages with market and limit orders, order tracking with settlement status and cancellation), the customer and employee management screens, the client portfolio page, the login and password-reset flows, and role-based access that restricts pages and navigation by user role.

My teammates built the Java/Spring Boot backend, JWT authentication and security, the SQL Server data layer, Redis caching, the Docker Compose setup, and Prometheus/Grafana monitoring. The sections below describe the platform as a whole, including the team's backend work.

Settlement and fees, not just CRUD

The interesting part of a trading platform isn't the forms - it's getting the money math right. Every buy/sell order has to price the trade, apply a commission rate that depends on client type, stack a tax on top of that commission, and net it all against the trade amount. On the backend, the team centralized that in OrderCalculationService so the buy and sell flows can't drift out of sync with each other:

BigDecimal commissionRate = client.getClientType() == ClientType.INDIVIDUAL
        ? INDIVIDUAL_COMMISION_RATE   // 0.2%
        : CORPORATE_COMMISION_RATE;   // 0.1%
 
BigDecimal totalAmount = orderPrice.multiply(quantityBD)
        .setScale(DECIMAL_SCALE, RoundingMode.HALF_UP);
BigDecimal commission = totalAmount.multiply(commissionRate)
        .setScale(DECIMAL_SCALE, RoundingMode.HALF_UP);
BigDecimal bsmv = commission.multiply(BSMV_FEE_RATE) // 5% banking tax on the commission
        .setScale(DECIMAL_SCALE, RoundingMode.HALF_UP);
 
// Sell: net = total - fees. Buy: net = total + fees.
BigDecimal netAmount = orderType == OrderType.SELL
        ? totalAmount.subtract(commission.add(bsmv))
        : totalAmount.add(commission.add(bsmv));

Every order also carries a hard-coded "T+2" settlement label, simulating the two-business-day gap between trade date and value date that real equity settlement uses.

Stack

  • Backend (team): Java 17 / Spring Boot 3.5, layered into controller → service (+ service/impl) → repository → entity, with JWT auth (JwtUtil, AuthFilter) and role-based SecurityConfig
  • Frontend (my part): Next.js + TypeScript, TanStack Table for the account/order/portfolio tables that make up most of the dashboard
  • Data (team): SQL Server for persistence, Redis for caching stock lookups and account/client lists (10-minute TTLs)
  • Ops (team): Docker Compose wiring the API, frontend, SQL Server, Redis, Prometheus, and Grafana together, plus a health-check.sh script that checks the app, Redis ping, and DB pool status

Result

A platform that supports market and limit orders, real-time portfolio valuation, KYC-style customer management, and Excel/PDF report export - with commission and settlement logic centralized enough that both the buy and sell sides trust the same numbers, and a Grafana dashboard to watch it run.