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