Overview
BlackOrigin is a real-time trading SaaS built for an Australian client. Traders subscribe to the platform, connect their exchange account, and BlackOrigin executes incoming TradingView signals on Bybit on their behalf. I built it with a Laravel backend and a Next.js frontend, and owned the design of the signal-processing pipeline.
The hard problem: concurrent signals
Trading signals don't arrive politely one at a time. Duplicate webhooks, retries and bursts of alerts during volatile markets mean several jobs can try to act on the same trade at once, and an exit signal can arrive before its entry has been filled. Either case can open a duplicate position or close one that doesn't exist, and with real money that isn't acceptable.
RabbitMQ job processing with Redis locks
Every incoming signal becomes a RabbitMQ job. Before a worker touches a trade it takes a Redis lock scoped to that trade, so two workers can never act on the same position at the same time. Each signal also carries an idempotency key: if the same signal is delivered twice, the second one is recognised and safely skipped.
On top of that, ordering checks make sure an exit signal cannot fire before its matching entry has been executed. Out-of-order exits wait for their entry instead of acting on a missing position.
Multi-gateway payments
Subscriptions are paid through the method each customer prefers. I integrated:
- Stripe for cards, Apple Pay and Google Pay
- Klarna, Afterpay and Zip for buy-now-pay-later
- Volet for crypto payments
Live trade status
Trade status is pushed to each trader over WebSockets, so the dashboard shows fills and position changes as they happen, with no polling.
Delivery
The platform ships through an automated CI/CD pipeline, with the execution workers deployable separately from the user-facing app so releases don't interrupt live trading.
Tech stack
- Backend: Laravel, PHP, MySQL
- Frontend: Next.js
- Messaging & concurrency: RabbitMQ, Redis locks, idempotency keys
- Real-time: WebSockets (Laravel Reverb)
- Integrations: TradingView, Bybit API, Stripe, Klarna, Afterpay, Zip, Volet
- Delivery: CI/CD pipeline