Quantify
Quantify is a full-stack simulated trading platform built using the MERN stack, designed to replicate core functionalities of real-world trading systems. It focuses on backend system design, secure transaction handling, and real-time data interaction.
π Features
π Authentication & Security
- Secure user authentication using JWT (JOSE)
- Helmet.js for HTTP security headers
- Rate limiting with Redis (in progress) to prevent API abuse
π Market Data & Visualization
- Real-time market data streaming for stocks and indices
- Interactive charts for price analysis and trends
πΌ Portfolio Management
- Dynamic portfolio tracking with real-time valuation
- Aggregation of holdings and profit/loss calculations
π§Ύ Trade Execution Engine
- Simulated buy/sell order placement
- Validation logic to ensure sufficient balance before execution
- Atomic updates to portfolio and transaction history
π Transaction History
- Persistent logging of all trades
- Efficient querying for user-specific trade history
π§βπ» Backend Architecture
- RESTful API design using Express.js
- Modular structure with routes, middleware, and controllers
- MongoDB for flexible data modeling
- Redis integration for caching and rate limiting
π± Frontend
- React.js with responsive Bootstrap UI
- Axios for API communication
- React Router for navigation
π οΈ Tech Stack
Frontend:
- React.js, React-Bootstrap, Axios, React Router
Backend:
- Node.js, Express.js, MongoDB (Mongoose)
- JWT (JOSE), Redis, Helmet.js, Morgan, CORS
Package Manager:
- pnpm
Initial frontend boilerplate was generated using AI tools (Google Antigravity) (SignUp,login and Services Pages Only) and then customized and extended manually.
- Client sends request (e.g., buy/sell order)
- Request passes through authentication & validation middleware
- Controller processes trade logic
- Database is updated (portfolio + transactions)
- Response is returned to client
Quantify/
β
βββ backend/
β βββ models/
β βββ routes/
β βββ controllers/
β βββ middleware/
β βββ config/
β βββ server.js
β
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ services/
β β βββ App.jsx
β β βββ main.jsx
β βββ index.html
β
βββ .env
βββ pnpm-workspace.yaml
βββ package.json
βββ README.md
Backend-Folder Structure
backend/
β
βββ src/
β βββ config/
β β βββ db.js # MongoDB connection
β β
β βββ models/
β β βββ User.model.js
β β
β βββ controllers/
β β βββ auth.controller.js
β β
β βββ routes/
β β βββ auth.routes.js
β β
β βββ middlewares/
β β βββ auth.middleware.js
β β
β βββ app.js
β βββ server.js
β
βββ .env
βββ package.json
βββ README.md
---
## βοΈ Installation & Setup
### Prerequisites
* Node.js (v18+ recommended)
* PNPM
* MongoDB (local or Atlas)
### Install PNPM (if not installed)
```bash
npm install -g pnpm
git clone https://github.com/jayalloyd/quantify.git
cd Quantifypnpm installcd backend
pnpm run devcd frontend
pnpm run devFrontend will run on:
http://localhost:5173
Backend will run on:
http://localhost:5000
Create a .env file inside backend/:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
- WebSocket-based live price updates
- Payment gateway integration
- Role-based admin dashboard
- Advanced charting (TradingView)
- Watchlists & alerts
This project is for educational purposes only and is a demo project and is not affiliated with any trading platform.
Quantify
Jaya Rani.Y.S
Linkedin:jayarani y s Github: jayalloyd