TradePro is a full-featured web-based trading platform that allows users to manage portfolios, buy and sell stocks, track performance, and manage their wallet. This application provides a comprehensive trading experience with real-time data visualization and user account management.
Secure authentication with login and registration screens
Landing page and personalized dashboard for users
Full trading functionality with stock listings, detailed views, portfolio management, and market insights
Manage your funds with wallet operations and track all transactions
Personalize your account and update your profile settings
Administrative controls for managing users, stocks, and platform operations
- Stock Trading: Buy and sell stocks with real-time price updates
- Portfolio Management: Track your investments and performance
- User Authentication: Secure login and registration system
- Wallet Management: Deposit and withdraw funds
- Transaction History: Review all your trading activity
- Profile Management: Personalize your account with profile pictures
- Market News: Stay updated with the latest financial news
- Responsive Design: Works on desktop and mobile devices
- Frontend: HTML, CSS, JavaScript, EJS templating
- Backend: Node.js, Express.js
- Database: MySQL
- Authentication: Session-based authentication with bcrypt
- File Upload: Multer for handling profile picture uploads
- UI Components: Custom CSS framework with responsive design
trading-platform/
├── db.js # Database connection setup
├── public/ # Static assets
│ ├── css/ # Stylesheets
│ ├── img/ # Images and media
│ └── uploads/ # User uploads (profile pictures)
├── routes/ # Route handlers
│ ├── admin.js # Admin panel routes
│ ├── auth.js # Authentication routes
│ ├── dashboard.js # Dashboard routes
│ ├── portfolio.js # Portfolio management
│ ├── profile.js # User profile routes
│ ├── stocks.js # Stock trading routes
│ ├── transactions.js # Transaction history
│ └── wallet.js # Wallet management routes
├── views/ # EJS templates
│ ├── admin/ # Admin panel views
│ ├── auth/ # Login and registration
│ ├── layouts/ # Page layouts
│ ├── partials/ # Reusable components
│ ├── portfolio/ # Portfolio views
│ ├── profile/ # User profile views
│ ├── stocks/ # Stock trading views
│ ├── transactions/ # Transaction history
│ └── wallet/ # Wallet management views
├── app.js # Main application file
└── package.json # Dependencies and scripts
- Login/Registration with email verification
- Password encryption with bcrypt
- Session-based authentication
- Real-time stock data
- Buy/sell functionality
- Position tracking
- Price charts and visualizations
- Deposit and withdrawal
- Balance tracking
- Transaction history
- Profile information management
- Profile picture upload
- Password management
- User management
- Stock data management
- Transaction oversight
- Node.js (v14 or higher)
- MySQL (v5.7 or higher)
- Create a new MySQL database named
trading_new - Run the SQL script in
database/schema.sqlto set up the tables
- Clone the repository
git clone https://github.com/yourusername/trading-platform.git
cd trading-platform- Install dependencies
npm install- Configure environment variables
Create a
.envfile in the root directory:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=trading_new
SESSION_SECRET=yoursecretkey
PORT=3000
- Create upload directories
mkdir -p public/uploads/profile- Start the application
npm start- Access the application
Open your browser and navigate to
http://localhost:3000
- Regular User:
- Email: demo@example.com
- Password: password
- Admin User:
- Email: admin@tradepro.com
- Password: admin123
To run the application in development mode with auto-restart:
npm run devThis project is licensed under the MIT License - see the LICENSE file for details.
- Stock data visualization powered by Chart.js
- Icons by Font Awesome
- Demo data provided for educational purposes only














