Skip to content

Production-style MERN trading simulation with real order execution, portfolio tracking, and brokerage-aware P&L logic.

Notifications You must be signed in to change notification settings

Manideepsainell/TradeMint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TradeMint πŸš€

TradeMint is a full-stack MERN trading simulation platform designed to demonstrate how modern brokerage systems handle order execution, portfolio tracking, and brokerage-aware profit calculation.

It focuses on real trading logic and production-style backend architecture, not just UI β€” making it an internship-ready fintech engineering project.

MERN JWT MongoDB


✨ Core Highlights

πŸ” Secure Authentication

  • JWT httpOnly cookie-based authentication
  • Protected frontend & backend routes
  • Session restoration via /auth/me
  • Secure logout handling

πŸ“ˆ Trading Execution System

  • Buy/Sell order placement workflow
  • Holdings & positions tracking
  • Order history with execution logic
  • User-level portfolio management

πŸ’° Brokerage-Aware Profit Engine

Unlike basic dashboards, TradeMint calculates:

βœ” Gross Profit
βœ” Brokerage & exchange charges
βœ” Taxes (GST, STT, etc.)
βœ” Net Profit after charges

This mirrors how real brokerage apps compute returns.

πŸ“Š Portfolio Analytics

  • Real-time portfolio value tracking
  • Individual stock P&L
  • Investment vs current value comparison

πŸ”” Smart Portfolio Insights

  • Exposure monitoring
  • Activity tracking
  • Performance-focused dashboard design

🌐 Live Market Data

  • Integrated Yahoo Finance API
  • Dynamic quote fetching
  • Real-time portfolio updates

---## πŸ“Έ Platform Screenshots

🏠 Landing Page β€” Platform Overview

Entry point showcasing TradeMint’s purpose, architecture focus, and dashboard preview.
TradeMint Landing Page

πŸ“Š Dashboard Overview

Central portfolio dashboard with investment summary, P&L, alerts, and recent activity.
Dashboard Overview

πŸ“ˆ Holdings & Portfolio Analytics

Detailed holdings table with allocation charts and real-time portfolio value tracking.
Holdings & Analytics

πŸ“ Orders & Trade Execution

Buy/sell execution workflow with order history and status tracking.
Orders Execution

πŸ’° Brokerage & Charges Transparency

Execution-level charge breakdown showing net profit after brokerage and taxes.
Brokerage Charges

πŸ”” Smart Alerts & Insights

Portfolio-driven alerts including exposure warnings and performance signals.
Smart Alerts

πŸ†˜ Help Center

Structured documentation explaining platform modules and internal workflows.
Help Center

🧠 Backend Architecture

High-level system design showing API layers, services, and data flow.
System Architecture

⚠️ Disclaimer TradeMint is an educational trading simulation built for learning and demonstration. It does not execute real trades or provide financial services.

🧠 Smart Backend Engineering

TradeMint applies real-world backend practices:

  • In-memory caching for live market prices (performance optimization)
  • Zod validation for critical request payloads (orders, authentication)
  • Secure cookie-based JWT authentication middleware
  • Modular business logic for trade execution & portfolio updates

βš™οΈ Backend Architecture

TradeMint follows a production-style backend structure:

Routes β†’ Controllers β†’ Services β†’ Models β†’ Database
  • REST API communication between React and Node.js
  • User-level data separation using userId
  • MongoDB schemas for Orders, Holdings, Positions
  • Middleware-based authentication & request handling

πŸ›  Tech Stack

Frontend

  • React.js
  • React Router
  • Context API
  • Bootstrap

Backend

  • Node.js
  • Express.js
  • JWT Authentication (httpOnly cookie-based)
  • Zod schema validation
  • In-memory caching layer
  • Middleware-based architecture

Database

  • MongoDB + Mongoose

Tools & Deployment

  • Git & GitHub
  • Postman
  • Render (Backend Deployment)
  • AWS Amplify (Frontend Hosting)

πŸ“‚ Project Structure

TradeMint/
β”‚
β”œβ”€β”€ backend/     # Node.js + Express REST API
└── dashboard/   # React frontend application

⚑ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/Manideepsainell/TradeMint.git
cd TradeMint

πŸ”§ Backend Setup

cd backend
npm install

Create a .env file:

PORT=8000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:3000

Run backend:

npm start

Backend runs on:
πŸ‘‰ http://localhost:8000


πŸ’» Frontend Setup

cd ../dashboard
npm install
npm start

Frontend runs on:
πŸ‘‰ http://localhost:3000


πŸ”Œ Key API Endpoints

Auth

  • POST /api/auth/signup β€” Register
  • POST /api/auth/login β€” Login
  • GET /api/auth/me β€” Restore session
  • POST /api/auth/logout β€” Logout

Trading Data

  • GET /api/orders
  • GET /api/holdings
  • GET /api/positions
  • GET /api/watchlist

πŸ›£ Roadmap

Planned production upgrades:

  • Advanced trade reports & analytics
  • WebSocket-based live price streaming
  • Performance monitoring & logging
  • Mobile responsiveness improvements

πŸ‘¨β€πŸ’» Author

Manideep Sai Nellutla
MERN Stack Developer

πŸ”— GitHub: https://github.com/Manideepsainell
πŸ”— LinkedIn: https://linkedin.com/in/manideep-sai-97681a330


⭐ If you found this project interesting, consider giving it a star!

About

Production-style MERN trading simulation with real order execution, portfolio tracking, and brokerage-aware P&L logic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published