A professional full-stack web application for cryptocurrency trading, mining operations management, and investment brokerage with Tesla-inspired design.
- Real-time Trading Dashboard - Live market data with WebSocket updates
- Mining Operations Monitor - Track mining rigs, hashrate, and earnings in real-time
- Smart Wallet Management - Secure deposit, withdraw, and asset management
- Portfolio Tracking - Real-time position tracking and P&L calculations
- Advanced Order Management - Market, limit, stop-loss orders with execution
- Analytics & Reports - Customizable performance and tax reports
- User Authentication - Secure login with JWT and MFA support
- Tesla-Inspired UI - Minimalist, dark mode aesthetic
- Responsive Design - Works seamlessly on desktop, tablet, mobile
- Real-time Updates - WebSocket-based live data streaming
- Professional Charts - Interactive candlestick and technical analysis
- JWT authentication with refresh tokens
- Password hashing with bcrypt
- CORS protection
- Input validation and sanitization
- Rate limiting on API endpoints
- Environment-based configuration
- Runtime: Node.js (ES Modules)
- Framework: Express.js
- Database: PostgreSQL
- Cache: Redis
- Real-time: Socket.io
- Authentication: JWT + bcryptjs
- Framework: React 18 + TypeScript
- Build: Vite
- Styling: Tailwind CSS + Dark Mode
- State Management: Redux Toolkit
- Charts: Recharts / Chart.js
- Real-time: Socket.io Client
.
├── server.js # Main server entry point
├── middleware/
│ ├── auth.js # JWT authentication middleware
│ └── errorHandler.js # Global error handling
├── routes/
│ ├── auth.js # Authentication endpoints
│ ├── trading.js # Trading endpoints
│ ├── mining.js # Mining operations endpoints
│ ├── wallet.js # Wallet management
│ ├── portfolio.js # Portfolio endpoints
│ └── analytics.js # Analytics endpoints
├── controllers/
│ ├── authController.js
│ ├── tradingController.js
│ ├── miningController.js
│ ├── walletController.js
│ ├── portfolioController.js
│ └── analyticsController.js
├── models/
│ ├── User.js
│ ├── Order.js
│ ├── MiningRig.js
│ ├── Wallet.js
│ └── Transaction.js
├── services/
│ ├── marketService.js
│ ├── miningService.js
│ ├── walletService.js
│ └── notificationService.js
├── config/
│ ├── database.js
│ └── redis.js
├── utils/
│ ├── validators.js
│ ├── helpers.js
│ └── logger.js
└── client/
├── src/
│ ├── components/
│ │ ├── Dashboard/
│ │ ├── Trading/
│ │ ├── Mining/
│ │ ├── Wallet/
│ │ ├── Portfolio/
│ │ └── Charts/
│ ├── pages/
│ │ ├── Home.tsx
│ │ ├── Trading.tsx
│ │ ├── Mining.tsx
│ │ ├── Portfolio.tsx
│ │ └── Settings.tsx
│ ├── store/
│ │ ├── slices/
│ │ └── hooks/
│ ├── hooks/
│ │ ├── useWebSocket.ts
│ │ ├── useAuth.ts
│ │ └── useMarketData.ts
│ ├── services/
│ │ ├── api.ts
│ │ ├── websocket.ts
│ │ └── auth.ts
│ ├── styles/
│ │ ├── globals.css
│ │ └── tailwind.css
│ └── App.tsx
└── public/
- Node.js 16+
- PostgreSQL 12+
- Redis 6+
- npm or yarn
- Clone the repository:
git clone https://github.com/timalen99-commits/solid-octo-goggles
cd solid-octo-goggles- Install dependencies:
npm install
cd client && npm install && cd ..- Create .env file:
cp .env.example .env-
Configure environment variables in
.env -
Setup database:
psql -U postgres -f scripts/init.sql- Start development servers:
npm run dev- Backend: http://localhost:5000
- Frontend: http://localhost:3000
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/refresh- Refresh JWT tokenPOST /api/auth/logout- Logout userGET /api/auth/verify- Verify token
GET /api/trading/markets- Get live market dataPOST /api/trading/orders- Create new orderGET /api/trading/orders- Get user ordersDELETE /api/trading/orders/:id- Cancel orderGET /api/trading/history- Trading history
GET /api/mining/rigs- Get mining rigsPOST /api/mining/rigs- Add mining rigGET /api/mining/earnings- Mining earningsPUT /api/mining/rigs/:id- Update rig settingsDELETE /api/mining/rigs/:id- Remove rig
GET /api/wallet/balance- Get wallet balancePOST /api/wallet/deposit- Deposit fundsPOST /api/wallet/withdraw- Withdraw fundsGET /api/wallet/transactions- Transaction historyGET /api/wallet/addresses- Get deposit addresses
GET /api/portfolio/summary- Portfolio summaryGET /api/portfolio/holdings- Current holdingsGET /api/portfolio/performance- Performance metricsGET /api/portfolio/allocation- Asset allocation
GET /api/analytics/reports- Generate reportsGET /api/analytics/statistics- Performance statisticsGET /api/analytics/tax-report- Tax report generation
Subscribe:
subscribe_market- Market data updatessubscribe_portfolio- Portfolio changessubscribe_mining- Mining status updates
Listen:
market_update- Price and volume updatesportfolio_update- Position and balance changesmining_update- Rig status and earnings updatesorder_filled- Order execution notifications
npm testnpm run lintnpm run build
npm startThe database includes tables for:
- Users (authentication & profiles)
- Orders (trading history)
- Mining Rigs (rig configurations & status)
- Wallets (user balances & addresses)
- Transactions (deposits, withdrawals, trades)
- Portfolio Snapshots (historical data)
- Create a feature branch:
git checkout -b feature/amazing-feature- Commit your changes:
git commit -m 'Add amazing feature'- Push to branch:
git push origin feature/amazing-feature- Open a Pull Request
MIT License - see LICENSE file for details
For issues and questions, please create an issue in the GitHub repository.
Built with ❤️ by timalen99-commits
Professional trading & mining platform inspired by Tesla's minimalist design philosophy