Skip to content

gvpaleev/cherdak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cherdak - Cryptocurrency Exchange Platform

A web-based cryptocurrency exchange platform for buying and selling digital assets with support for multiple payment methods and networks.

Project Structure

cherdak/
├── rest_api/       # Backend Express.js server
├── client/         # Frontend React application
└── web/           # Static web assets

Features

  • 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

Technology Stack

Backend (rest_api/)

  • 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

Frontend (client/)

  • React 18 with Hooks
  • React Bootstrap for UI components
  • Material-UI (@mui/material) for enhanced components
  • Axios for HTTP requests
  • Bootstrap 5 for styling

Installation

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Backend Setup

cd rest_api
npm install

Create 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.js

Frontend Setup

cd client
npm install

Create a .env file in the client/ directory if needed.

Start the development server:

npm start

Build for production:

npm run build

API Endpoints

  • GET / - Serve the React application
  • GET /api/price/full - Get full price information
  • GET /api/asset - Get available assets
  • GET /api/paytypes - Get supported payment types
  • GET /api/network/full - Get network information (in/out)
  • POST /api/set/request - Submit exchange request

Application Flow

  1. Scene 0: Initial landing page
  2. Scene 1: Asset and operation type selection
  3. Scene 2: Transaction details (Buy/Sell)
  4. Scene 3: Payment confirmation (Cash/Non-cash)

Development

The application uses session storage to maintain state across scenes:

  • typeRequest - Buy or Sell operation
  • assetFull - Available cryptocurrency assets
  • payTypeFull - Payment methods
  • networkFull - Network configurations
  • is_cash - Cash payment flag

Telegram Bot Integration

The backend includes Telegram bot functionality for:

  • Tracking new visitor IPs
  • Creating exchange requests
  • Sending notifications

License

ISC

Author

FreedomCash Server Team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors