A full-stack stock trading platform for the Dhaka Stock Exchange (DSE) with real-time data, portfolio management, AI-powered insights, and advanced trading features.
Shanid Sajjatuz Islam
- Email: [email protected]
- LinkedIn: https://www.linkedin.com/in/shanid-sajjatuz-islam
- GitHub: https://github.com/perashanid
- Real-time stock data from DSE
- Buy/Sell stock transactions
- Portfolio management and tracking
- Trade history and performance reports
- Limit orders with automatic execution
- Wishlist for tracking favorite stocks
- Live stock prices and market data
- Top 30 stocks by market cap
- Trending stocks analysis
- Earnings calendar
- News feed integration
- AI-powered stock insights and recommendations
- Price alerts and notifications
- Real-time notification center
- Stock search with autocomplete
- Interactive charts and visualizations
- Export reports (PDF/CSV)
- Responsive modern UI with dark mode
- Node.js + Express
- TypeScript
- MongoDB with Mongoose
- JWT Authentication
- Google Gemini AI
- Routing Controllers + TypeDI
- React 18 + TypeScript
- Vite
- React Router v6
- TailwindCSS
- Chart.js + Recharts
- Framer Motion
- Lucide Icons
- Node.js 18+ and npm
- MongoDB database
- Google Gemini API key
- NewsAPI key (optional)
- Financial Modeling Prep API key (optional)
- Clone the repository
git clone https://github.com/perashanid/stoxly.git
cd stoxly- Install dependencies
npm install- Configure environment variables
cp .env.example .envEdit .env with your configuration:
MONGODB_URI: Your MongoDB connection stringJWT_SECRET: Secret key for JWT tokensSESSION_SECRET: Secret key for sessionsGEMINI_API_KEY: Google Gemini API keyNEWS_API_KEY: NewsAPI key (optional)FMP_API_KEY: Financial Modeling Prep API key (optional)PORT: Server port (default: 3004)
- Configure frontend environment
cd frontend
cp .env .env.localEdit frontend/.env.local:
VITE_API_URL=http://localhost:3004
Run both backend and frontend in development mode:
npm run devOr run them separately:
# Backend only
npm run dev:backend
# Frontend only
npm run dev:frontendThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3004
Build the application:
npm run buildStart the production server:
npm start├── src/ # Backend source code
│ ├── controllers/ # API controllers
│ ├── services/ # Business logic
│ ├── models/ # MongoDB models
│ ├── middlewares/ # Express middlewares
│ ├── config/ # Configuration files
│ └── utils/ # Utility functions
├── frontend/ # Frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── hooks/ # Custom React hooks
│ │ └── types/ # TypeScript types
│ └── public/ # Static assets
└── dist/ # Compiled backend code
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user
GET /api/stocks- Get all stocksGET /api/stocks/:symbol- Get stock detailsGET /api/stocks/top30- Get top 30 stocksGET /api/stocks/trending- Get trending stocks
GET /api/portfolio- Get user portfolioPOST /api/portfolio/buy- Buy stocksPOST /api/portfolio/sell- Sell stocks
GET /api/transactions- Get transaction historyGET /api/transactions/export- Export transactions
GET /api/limit-orders- Get user limit ordersPOST /api/limit-orders- Create limit orderDELETE /api/limit-orders/:id- Cancel limit order
GET /api/price-alerts- Get user price alertsPOST /api/price-alerts- Create price alertDELETE /api/price-alerts/:id- Delete price alert
GET /api/wishlist- Get user wishlistPOST /api/wishlist- Add to wishlistDELETE /api/wishlist/:symbol- Remove from wishlist
GET /api/news- Get latest newsGET /api/earnings- Get earnings calendar
POST /api/ai/insights- Get AI-powered stock insights
The project includes a render-build script for deployment:
npm run render-buildEnsure all required environment variables are set in your deployment platform.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
ISC
For issues and questions, please open an issue on GitHub.