A Full-Stack Real-Time Paper Trading Application
Eazy Trade is a simulated paper trading platform that allows users to experience the thrill of the cryptocurrency markets without financial risk. Built with a modern Next.js and Node.js architecture, the platform features real-time data streaming, virtual wallet management, and secure simulated payment gateways.
- Real-Time Market Data: Integrated Socket.io and the Twelve Data API to stream low-latency, live pricing for cryptocurrencies directly to the client.
- Risk-Free Paper Trading: Users can execute buy/sell orders in a simulated environment that mirrors live market conditions.
- Virtual Wallet Top-Ups: Integrated the Stripe API (Checkout Sessions) to securely process simulated account funding.
- Full-Stack Architecture: Decoupled Next.js frontend and Express.js backend, ensuring scalable performance and secure API routing.
- Secure Authentication & Management: Robust REST APIs handle user sessions, trade history, and portfolio tracking.
- Framework: Next.js (React)
- Language: TypeScript
- Styling: Tailwind CSS / CSS
- Real-Time Client: Socket.io-client
- Deployment: Vercel
- Runtime: Node.js
- Framework: Express.js
- Real-Time Server: Socket.io
- Payment Processing: Stripe API
- Market Data: Twelve Data API
- Language: TypeScript
- Deployment: Vercel
To run this project locally, you will need to start both the client and the server.
- Node.js (v16+ recommended)
- A Stripe Developer Account (for test API keys)
- A Twelve Data Account (for API keys)
git clone https://github.com/Sourabh-awasthy/eazy-money.git
cd eazy-moneyNavigate to the server directory and install dependencies:
cd server
npm installCreate a .env file in the /server directory and add your keys:
PORT=5000
FRONTEND=http://localhost:3000
STRIPE_SECRET_KEY=your_stripe_test_key
TWELVE_DATA_API_KEY=your_twelve_data_key
# Add your database URI or other secret keys hereRun the backend development server:
npm run devOpen a new terminal window, navigate to the client directory, and install dependencies:
cd client
npm installCreate a .env file in the /client directory:
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_public_keyRun the frontend development server:
npm run devThe app should now be running locally at http://localhost:3000.
POST /api/auth- Handles user registration, login, and session tokens.GET /api/user- Fetches user portfolio, current balance, and settings.POST /api/trade- Processes buy and sell orders, validating against current virtual wallet balance.POST /api/payment- Generates Stripe Checkout sessions for virtual wallet top-ups.
- The server maintains a persistent WebSocket connection with the frontend using Socket.io.
- Emits live pricing updates polled from the Twelve Data API to keep the UI perfectly synchronized with the market without overwhelming the client with HTTP requests.
eazy-money/
├── client/ # Next.js Frontend
│ ├── app/ # Next.js App Router (Pages & Layouts)
│ ├── components/ # Reusable UI components (e.g., StockCard)
│ ├── public/ # Static assets
│ └── package.json
├── server/ # Node.js/Express Backend
│ ├── controllers/ # Route logic (Auth, Trade, Payment)
│ ├── routes/ # API endpoint definitions
│ ├── server.ts # Entry point & Socket.io setup
│ └── package.json
└── README.md
- Ensure that
.envand.env.localfiles are added to your.gitignoreto prevent leaking sensitive API keys. - If a database (like MongoDB or PostgreSQL) is integrated in the future, ensure the connection string is safely stored in the backend
.env.
Sourabh Awasthy
- GitHub: @Sourabh-awasthy
- Live Project: Eazy Trade
Note: Contributors are most welcome ... No real money is traded, and Stripe operates strictly in test mode.