A web-based cryptocurrency exchange platform for buying and selling digital assets with support for multiple payment methods and networks.
cherdak/
├── rest_api/ # Backend Express.js server
├── client/ # Frontend React application
└── web/ # Static web assets
- Real-time cryptocurrency price tracking via Binance API
- Buy and sell cryptocurrency operations
- Multiple payment methods support
- Network selection (deposit/withdrawal)
- Telegram bot integration for notifications
- Responsive web interface
- Node.js with Express.js
- Binance Connector for price data
- Telegraf for Telegram bot integration
- CORS enabled for cross-origin requests
- dotenv for environment configuration
- React 18 with Hooks
- React Bootstrap for UI components
- Material-UI (@mui/material) for enhanced components
- Axios for HTTP requests
- Bootstrap 5 for styling
- Node.js (v14 or higher)
- npm or yarn
cd rest_api
npm installCreate a .env file in the rest_api/ directory with the following variables:
PORT=3000
ASSET={"BTC": {...}, "ETH": {...}}
PAY_TYPES=[...]
NETWORK_IN=[...]
NETWORK_OUT=[...]Start the server:
node index.jscd client
npm installCreate a .env file in the client/ directory if needed.
Start the development server:
npm startBuild for production:
npm run buildGET /- Serve the React applicationGET /api/price/full- Get full price informationGET /api/asset- Get available assetsGET /api/paytypes- Get supported payment typesGET /api/network/full- Get network information (in/out)POST /api/set/request- Submit exchange request
- Scene 0: Initial landing page
- Scene 1: Asset and operation type selection
- Scene 2: Transaction details (Buy/Sell)
- Scene 3: Payment confirmation (Cash/Non-cash)
The application uses session storage to maintain state across scenes:
typeRequest- Buy or Sell operationassetFull- Available cryptocurrency assetspayTypeFull- Payment methodsnetworkFull- Network configurationsis_cash- Cash payment flag
The backend includes Telegram bot functionality for:
- Tracking new visitor IPs
- Creating exchange requests
- Sending notifications
ISC
FreedomCash Server Team