Skip to content

ouko/ACTUS-COMPETITION-bond-platform

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ACTUS Bond Platform

A production-ready Web3 DeFi application for issuing and managing ACTUS-compliant financial instruments on Radix DLT. This platform enables financial institutions to create, manage, and track blockchain-based financial instruments with ACTUS-standard cash flow calculations.

ACTUS Bond Platform React NestJS Radix DLT

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • Radix Wallet (for blockchain interactions)

One-Command Setup & Deployment

# Clone the repository
git clone <repository-url>
cd bond-platform

# Run automated setup (Windows)
.\setup.ps1

# Or for Mac/Linux
chmod +x setup.sh
./setup.sh

# Start all services
docker-compose up -d --build

# Access the application
open http://localhost:3000

Development Mode (Alternative)

# Start ACTUS Engine
cd actus-engine && npm start

# Start Backend API (new terminal)
cd backend && npm run start:dev

# Start Frontend (new terminal)  
cd frontend && npm run dev

# Access at: http://localhost:5173

๐Ÿ“‹ What's Included

๐Ÿ—๏ธ Complete Platform Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ACTUS Bond Platform                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Frontend (React)    Backend (NestJS)    ACTUS Engine       โ”‚
โ”‚  - Bond Issuance     - REST API          - Cash Flows       โ”‚
โ”‚  - Portfolio Mgmt    - Radix Integration - ACTUS Standards  โ”‚
โ”‚  - Analytics         - Database Layer    - Calculations     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                    Radix DLT Network                        โ”‚
โ”‚                  (Stokenet/Mainnet)                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Key Features

  • ๐Ÿฆ Multi-Role Dashboards - Issuer, Investor, Compliance, Regulator
  • ๐Ÿ“Š ACTUS Compliance - Full implementation of ACTUS financial standards
  • ๐Ÿ”— Radix DLT Integration - Blockchain-ready smart contracts
  • ๐Ÿ’ฐ Cash Flow Simulation - Interactive charts and payment schedules
  • ๐Ÿ“ˆ Portfolio Analytics - Real-time tracking and reporting
  • ๐ŸŽฏ Production Ready - Containerized, scalable, secure

๐Ÿ—๏ธ Project Structure

bond-platform/
โ”œโ”€โ”€ ๐Ÿ“ frontend/                 # React TypeScript Frontend
โ”‚   โ”œโ”€โ”€ src/components/          # UI Components
โ”‚   โ”œโ”€โ”€ src/types/               # TypeScript definitions
โ”‚   โ”œโ”€โ”€ src/utils/               # Utilities & Radix integration
โ”‚   โ””โ”€โ”€ vite.config.ts           # Build configuration
โ”œโ”€โ”€ ๐Ÿ“ backend/                  # NestJS Backend API
โ”‚   โ”œโ”€โ”€ src/controllers/         # REST API endpoints
โ”‚   โ”œโ”€โ”€ src/services/            # Business logic
โ”‚   โ”œโ”€โ”€ src/models/              # Data models
โ”‚   โ””โ”€โ”€ main.ts                  # Application entry point
โ”œโ”€โ”€ ๐Ÿ“ scrypto-contracts/        # Radix Smart Contracts
โ”‚   โ”œโ”€โ”€ src/lib.rs               # Bond instrument blueprints
โ”‚   โ””โ”€โ”€ Cargo.toml               # Rust dependencies
โ”œโ”€โ”€ ๐Ÿ“ actus-engine/             # ACTUS Calculation Service
โ”‚   โ””โ”€โ”€ server.js                # Financial calculations API
โ”œโ”€โ”€ ๐Ÿ“ deployment/               # Production deployment
โ”œโ”€โ”€ ๐Ÿ“ scripts/                  # Automation scripts
โ””โ”€โ”€ ๐Ÿ“„ docker-compose.yml        # Container orchestration

๐ŸŽฏ Core Functionality

1. Bond Instrument Creation

  • ACTUS Contract Types: PAM, ANN, NAM, LAM, SWAP
  • Flexible Terms: Notional, interest rates, maturity, payment cycles
  • Real-time Validation: ACTUS-standard compliance checking

2. Cash Flow Simulation

  • Interactive Charts: Line charts, bar charts, payment timelines
  • Amortization Tables: Period-by-period breakdown
  • Export Capabilities: CSV, JSON data export

3. Portfolio Management

  • Dashboard Analytics: Total value, active instruments, performance
  • Instrument Tracking: Status, maturity, cash flows
  • Risk Metrics: Duration, convexity, yield calculations

4. Radix DLT Integration

  • Smart Contracts: Scrypto blueprints for bond instruments
  • Wallet Integration: Radix Wallet connectivity
  • Transaction Management: Deployment and execution on Radix network

๐Ÿ”ง Technical Stack

Frontend

  • React 18 with TypeScript
  • Vite for fast development builds
  • Tailwind CSS for styling
  • Recharts for data visualization
  • Radix UI components

Backend

  • NestJS framework with TypeScript
  • REST API with validation
  • Modular architecture with services and controllers
  • Error handling and logging

Blockchain

  • Radix DLT for blockchain layer
  • Scrypto smart contracts
  • Component-based architecture
  • Transaction manifest support

Infrastructure

  • Docker containerization
  • PostgreSQL for data persistence
  • Nginx for static file serving
  • Health checks and monitoring

๐Ÿ“Š ACTUS Standards Implementation

Supported Financial Instruments

Type Code Description Use Case
Principal at Maturity PAM Zero-coupon bond Corporate bonds
Annuity ANN Fixed payments with amortization Mortgages, loans
Negative Amortization NAM Growing principal Student loans
Linear Amortization LAM Fixed principal reduction Auto loans
Interest Rate Swap SWAP Fixed-for-floating exchange Hedging

Cash Flow Types

  • IP - Interest Payment
  • PR - Principal Repayment
  • FP - Fee Payment
  • DV - Dividend Payment

๐Ÿš€ Deployment

Local Development

# Using Docker (Recommended)
docker-compose up -d --build

# Using Development Servers
./start-dev.ps1  # Windows
./start-dev.sh   # Mac/Linux

Production Deployment

# Build and deploy
docker-compose -f docker-compose.prod.yml up -d

# Environment variables
cp .env.example .env
# Configure database, Radix network, API keys

Cloud Platforms

  • DigitalOcean App Platform (Recommended)
  • AWS ECS with Fargate
  • Kubernetes with Helm charts
  • Azure Container Instances

๐Ÿ”Œ API Endpoints

Bond Management

POST /bonds
GET /bonds
GET /bonds/:id
PUT /bonds/:id/deploy

ACTUS Calculations

POST /actus/cashflows
GET /actus/contract-types
POST /actus/contracts/generate

Radix Integration

POST /radix/deploy
POST /radix/execute
GET /radix/component/:address

๐Ÿ’พ Data Models

Bond Instrument

interface BondInstrument {
  id: string;
  terms: BondTerms;
  cashFlows: CashFlow[];
  componentAddress?: string;
  status: 'draft' | 'deployed' | 'active' | 'matured';
  createdAt: string;
}

Bond Terms

interface BondTerms {
  contractType: string;
  contractID: string;
  currency: string;
  notionalPrincipal: number;
  nominalInterestRate: number;
  maturityDate: string;
  statusDate: string;
  cycleAnchorDateOfInterestPayment: string;
  cycleOfInterestPayment: string;
}

๐Ÿ”’ Security Features

  • Input Validation with class-validator
  • CORS Configuration for cross-origin requests
  • Environment-based configuration
  • Error handling and logging
  • Rate limiting ready

๐Ÿ“ˆ Performance

  • Frontend: Optimized React with code splitting
  • Backend: NestJS with efficient dependency injection
  • Database: PostgreSQL with connection pooling
  • Caching: Redis-ready architecture
  • Load Balancing: Horizontal scaling support

๐Ÿงช Testing

# Frontend tests
cd frontend && npm test

# Backend tests
cd backend && npm test

# E2E tests
npm run test:e2e

# Build verification
npm run build:verify

๐Ÿ”ฎ Roadmap

Phase 1: Core Platform โœ…

  • Bond instrument creation
  • ACTUS cash flow calculations
  • Portfolio management
  • Basic Radix integration

Phase 2: Advanced Features ๐Ÿšง

  • Secondary market trading
  • Risk analytics dashboard
  • Regulatory reporting
  • Multi-currency support

Phase 3: Enterprise Ready ๐Ÿ”ฎ

  • OAuth2 authentication
  • Audit logging
  • Advanced risk modeling
  • Insurance integration

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Update documentation
  • Use conventional commits

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • ACTUS Foundation for financial standards
  • Radix DLT for blockchain infrastructure
  • NestJS for backend framework
  • React for frontend framework

๐Ÿ“ž Support

๐Ÿš€ Getting Help

Common Issues

# Port already in use
docker-compose down
docker-compose up -d

# Build failures
docker system prune -a
docker-compose build --no-cache

# Database connection issues
docker-compose restart postgres

Debugging

# Check service logs
docker-compose logs frontend
docker-compose logs backend
docker-compose logs actus-engine

# Service health checks
curl http://localhost:3001/health
curl http://localhost:8083/actuator/health

# Database status
docker-compose exec postgres psql -U postgres -d actus_bond_platform

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 70.4%
  • Rust 10.5%
  • PowerShell 7.5%
  • JavaScript 6.2%
  • Shell 2.3%
  • HTML 1.3%
  • Other 1.8%