Magnum Opus is a full‑stack, multi‑language, cross‑ecosystem platform that brings together the best of:
- Web3 front‑end – a dark‑theme, real‑time dashboard built with HTML, CSS and vanilla JavaScript.
- Core back‑end – a .NET (C#) service layer handling API aggregation, mock blockchain interactions and user management.
- High‑performance crypto engine – a C++ library for ultra‑fast hashing, Merkle‑tree construction and order‑book matching.
- Smart contracts – Solidity contracts for ERC‑20, ERC‑721 and a minimal DeFi vault.
- Micro‑services – a lightweight Go relay that forwards signed transactions to the blockchain.
- Data layer – a relational SQL schema storing users, wallets, balances and transaction history.
- On‑chain programs – Rust Solana‑style programs demonstrating zero‑copy state handling.
- Glue layer – a Ruby service that fetches exchange rates and aggregates wallet balances.
The goal is to showcase full‑stack mastery, high performance, and developer ergonomics across the entire crypto stack.
+-------------------+ +-------------------+ +-------------------+
| Front‑end UI | <--> | API Gateway | <--> | Core .NET API |
+-------------------+ +-------------------+ +-------------------+
^ ^ ^
| | |
v v v
+-------------------+ +-------------------+ +-------------------+
| CryptoEngine.cpp| | Go Relay (go) | | Ruby Service |
+-------------------+ +-------------------+ +-------------------+
^ ^ ^
| | |
v v v
+-------------------+ +-------------------+ +-------------------+
| Solidity Contracts| | Rust On‑Chain | | SQL Database |
+-------------------+ +-------------------+ +-------------------+
| Component | Version |
|---|---|
| Node.js | >= 18 |
| npm / yarn | latest |
| .NET SDK | 8.0 |
| C++ compiler (gcc/clang) | C++20 |
| Go | 1.22 |
| Ruby | 3.3 |
| PostgreSQL | 15 |
| Solidity compiler (solc) | 0.8.24 |
| Rust toolchain (cargo) | stable |
git clone https://github.com/yourorg/magnum-opus.git
cd magnum-opuscd frontend
npm install
npm run build # produces dist/ with index.html, styles.css, app.jscd backend/CoreApi
dotnet restore
dotnet build --configuration Release
dotnet run # runs on http://localhost:5000cd engine/CryptoEngine
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
./CryptoEngine # runs a tiny demo hash & merkle proofcd services/go-relay
go mod tidy
go build -o relay
./relay --port 8081cd services/ruby-wallet
bundle install
ruby wallet_service.rb # starts on http://localhost:4567cd contracts
solc --bin --abi --optimize --overwrite SmartContract.sol -o build
# Deploy with your favourite tool (Hardhat, Foundry, Remix, etc.)cd onchain/RustProgram
cargo build-bpf # for Solana‑like BPF targetpsql -U postgres -f schema.sqlA ready‑made docker-compose.yml spins up PostgreSQL, the .NET API, Go relay and Ruby service. The front‑end can be served via nginx or simply opened from dist/.
docker compose up -dmagnum-opus/
├─ README.md
├─ frontend/ # index.html, styles.css, app.js
├─ backend/ # C# .NET Core API
│ └─ CoreApi/
├─ engine/ # CryptoEngine.cpp (C++)
├─ contracts/ # SmartContract.sol
├─ services/
│ ├─ go-relay/ # server.go
│ └─ ruby-wallet/ # WalletService.rb
├─ onchain/ # OnChainProgram.rs (Rust)
├─ db/ # schema.sql
└─ docker-compose.yml
- Front‑end – Jest + Puppeteer for UI integration tests.
- C# API – xUnit with in‑memory EF Core.
- C++ Engine – GoogleTest (
tests/folder) compiled with-DTESTflag. - Go Relay –
go test ./...includes table‑driven tests for signature verification. - Ruby Service – RSpec.
- Solidity – Hardhat tests (Mocha/Chai).
- Rust –
cargo testfor on‑chain logic.
Run all tests with the convenience script:
./scripts/run_all_tests.sh- Containerise each service (Dockerfiles are provided).
- Push images to your registry.
- Deploy to Kubernetes using the Helm chart in
helm/magnum-opus/. - Configure secrets (private keys, DB passwords) via Kubernetes Secrets or Vault.
- Use a CI/CD pipeline (GitHub Actions, GitLab CI) that:
- Lints & formats all languages.
- Runs the full test suite.
- Builds Docker images.
- Deploys to a staging environment.
- Performs smoke‑tests before promoting to production.
We welcome contributions! Contributors: see CONTRIBUTING and Contributor License Agreement.
Please follow these steps:
- Fork the repo and create a feature branch.
- Ensure all tests pass locally.
- Add or update documentation where appropriate.
- Submit a Pull Request with a clear description of the change.
- One of the core maintainers will review and merge.
Please adhere to the language‑specific style guides (ESLint for JS, clang‑format for C++, rubocop for Ruby, gofmt for Go, and rustfmt for Rust).
Magnum Opus is released under the MIT License. See the LICENSE file for details.