Skip to content

jayalloyd/Quantify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

Notes

Initial frontend boilerplate was generated using AI tools (Google Antigravity) (SignUp,login and Services Pages Only) and then customized and extended manually.

πŸ”„ Request Flow

  1. Client sends request (e.g., buy/sell order)
  2. Request passes through authentication & validation middleware
  3. Controller processes trade logic
  4. Database is updated (portfolio + transactions)
  5. Response is returned to client

πŸ“ Project Structure

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

Clone the Repository

git clone https://github.com/jayalloyd/quantify.git
cd Quantify

Install Dependencies

pnpm install

▢️ Running the Project

Start Backend

cd backend
pnpm run dev

Start Frontend

cd frontend
pnpm run dev

Frontend will run on:

http://localhost:5173

Backend will run on:

http://localhost:5000

πŸ” Environment Variables

Create a .env file inside backend/:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key

πŸ§ͺ Future Enhancements

  • WebSocket-based live price updates
  • Payment gateway integration
  • Role-based admin dashboard
  • Advanced charting (TradingView)
  • Watchlists & alerts

πŸ“œ License

This project is for educational purposes only and is a demo project and is not affiliated with any trading platform.


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

Quantify

Jaya Rani.Y.S

Linkedin:jayarani y s Github: jayalloyd

About

🚧 Work in Progress-> Quantify is a full-stack finance platform built with the MERN stack.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors