Peek.2025-09-03.18-27.mp4
This is a CFD (Contract for Difference) trading platform designed for real-time market interactions. It features a high-performance Rust engine for critical calculations, TypeScript-based microservices for real-time data polling and WebSocket communication, and a dynamic React frontend for user interaction. The platform leverages Redis Streams for efficient event handling to ensure live and accurate data updates.
- Trading Core: A powerful Rust engine handles core CFD logic and high-speed data processing.
- Real-time Data: Get live market updates through WebSockets and a dedicated polling mechanism.
- Event Streaming: Uses Redis Streams for reliable and ordered processing of market events.
- API Services: A Node.js backend provides all necessary API endpoints and manages data.
- Email Alerts: An integrated mailing service sends automated notifications.
- User Interface: A modern React application allows users to interact with the platform.
- Backend: Node.js (e.g., Express.js)
- Frontend: React.js
- Engine: Rust
- Mailing: Node.js (e.g., Nodemailer)
- Polling Server: TypeScript, Node.js, Redis (for Redis Streams)
- Websocket: TypeScript, Node.js (e.g.,
ws
orSocket.IO
) - Database: [Specify your database, e.g., PostgreSQL, MongoDB, Redis for caching]
To get a local copy of this project running, follow these simple steps.
Make sure you have these installed on your computer:
- Node.js (LTS version recommended)
- npm or Yarn
- Rust and Cargo (
rustup install stable
) - TypeScript (you might need to install globally:
npm install -g typescript
) - Redis Server (version 5.0 or newer for Redis Streams)
- Git
-
Clone the project:
git clone https://github.com/your_username/project-202.git cd project-202
-
Start Redis Server: Ensure your Redis server is running. It's essential for the Polling Server and for real-time event communication.
-
Install dependencies and build each part of the project:
-
Backend:
cd backend npm install # or yarn install # To run: npm start # or node index.js cd ..
-
Frontend:
cd frontend npm install # or yarn install # To run: npm start # (This starts the development server) cd ..
-
Engine (Rust):
cd engine-rust cargo build --release # Build for best performance # To run: cargo run # or ./target/release/engine-rust cd ..
Note: The Rust engine might be used as a library by another service, or run as its own service.
-
Mailing:
cd mailing npm install # or yarn install # To run: npm start # or node index.js cd ..
-
Polling Server (TypeScript):
cd polling-server npm install # or yarn install # To run: npm start # or node index.js (TypeScript projects often have a start script that handles compilation) cd ..
Note: This server connects to Redis Streams to process incoming events.
-
Websocket (TypeScript):
cd websocket npm install # or yarn install # To run: npm start # or node index.js (TypeScript projects often have a start script that handles compilation) cd ..
-
Each part of the project may need specific settings (like database connections, API keys, Redis details, email credentials). Look for a .env.example
file or a README.md
inside each sub-directory for more information.
Once all services are running, the frontend application will connect to the backend and WebSocket services. The Rust engine, Polling Server, and Mailing service will work in the background, handling data, real-time events from Redis Streams, and sending emails.
- Open the frontend application in your browser at
http://localhost:[FRONTEND_PORT]
(usually 3000 or 5173). - Use the application to see real-time updates and how data is processed.
We welcome contributions to make this project even better!
If you have an idea, please fork the repository and create a pull request. You can also open an issue with the tag "enhancement". Don't forget to give the project a star! Thank you!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is distributed under the MIT License. See the LICENSE
file for full details.
Your Name - [[email protected]] Project Link: https://github.com/your_username/project-202