BMAD-METHOD/.patch/816/PLAN.md

8.6 KiB

PR #816 Implementation Plan

Project: Aura Investment Product Engine - Project Brief and PRD

Status: COMPLETED - Files Applied and Verified

Summary

PR #816 adds comprehensive project documentation for the Aura Investment Product Engine, establishing the foundation for a production-grade backend system to manage multiple cryptocurrency investment products with institutional-grade security.

What Was Added

Two New Documentation Files

  1. aura-project-docs/project-brief.md (158 lines)

    • High-level project overview
    • Executive summary of Investment Product Engine
    • Problem statement and solution approach
    • Target users (traders, RMs, operations, compliance)
    • Key business and technical requirements
    • Success metrics and KPIs
    • Out-of-scope items for MVP
    • Next steps for development
  2. aura-project-docs/investment-product-engine-prd.md (1,655 lines)

    • Complete Product Requirements Document
    • 75+ Functional Requirements (FR1-FR75)
    • 20+ Non-Functional Requirements (NFR1-NFR20)
    • UI/UX Design Goals and paradigms
    • Technical assumptions and architecture
    • 12 Epics with detailed user stories
    • Integration specifications for:
      • Hex Safe custody platform
      • HollaEx trading platform
      • Multiple exchanges (Binance, OKX, etc.)
      • Price oracles (Chainlink, Pyth, CoinGecko)
      • CRM systems (HubSpot)
    • Security, compliance, and audit requirements

Key Business Features Defined

Product Management

Multi-product platform with lifecycle management:

  • Multi-product support with strict risk segregation
  • Flexible product lifecycle states (Draft, Active, Suspended, Closed, Liquidating)
  • Configurable terms (3, 6, 9, 12 months)
  • Fixed APY per term with early exit penalties

Subscription Flow

Client deposit and subscription processing:

  • Deposit detection on multiple blockchain networks
  • Deposit address generation from staging vaults
  • Daily cutoff-time processing
  • Automatic fund sweeping to investment vaults
  • Share allocation calculations

NAV Calculation

Daily valuation and aggregation:

  • Daily NAV computed at configured cutoff time
  • Aggregation of vault balances across multiple venues
  • Exchange sub-account balance queries
  • Multi-source price oracle integration with median calculation
  • Historical NAV tracking with performance metrics
  • Stale data handling and fallback mechanisms

Shareholding Management

Real-time ownership tracking:

  • Real-time shareholding calculations
  • Client ownership percentage tracking
  • Daily reconciliation validation
  • Share deduction on redemptions

Redemption Flow

Client withdrawal workflow:

  • Full and partial redemption support
  • Early exit penalty calculations
  • Relationship Manager approval workflow
  • Trader settlement workflow
  • 36-hour SLA enforcement
  • Automated payout to client wallets

Multi-Venue Fund Management

Capital deployment across venues:

  • Hex Safe vault integration
  • Exchange sub-account management
  • Fund transfers across venues (via investment vault as travel rule hub)
  • Whitelist-based transfer security
  • Unified trader dashboard

Yield and Fee Management

Return and fee calculations:

  • Yield accrual tracking per subscription
  • Term maturity payouts
  • Management fees (% of AUM)
  • Performance fees (% above benchmark)
  • Redemption fees
  • Early exit penalties
  • Separate fee revenue tracking

Security and Compliance

Institutional-grade protections:

  • Role-Based Access Control (RBAC)
  • Multi-signature approvals for critical operations
  • KYC/AML integration (Sumsub)
  • Transaction limits per client tier
  • Immutable audit logging
  • Compliance reporting

Reporting and Dashboards

Operational visibility:

  • Operations Dashboard (product overview, system health)
  • Trader Dashboard (fund management, balance aggregation)
  • RM Dashboard (client management, redemption approvals)
  • Daily reconciliation reports
  • Monthly performance reports
  • Audit trail exports

Notifications and Alerting

Real-time communications:

  • Client push notifications (Aura app)
  • RM email alerts
  • Trader action notifications
  • Operations team system alerts
  • Webhook notifications for external systems

Technical Architecture

Backend Services

  • API Service: REST API with NestJS, authentication, authorization
  • NAV Calculator: Scheduled service for daily cutoff processing
  • Blockchain Monitor: Real-time deposit detection on multiple networks
  • Notification Service: Orchestrates all outbound communications
  • Fund Movement Service: Multi-step transfer orchestration
  • Reporting Service: Report generation and exports

Data Layer

  • PostgreSQL database with ACID compliance
  • Redis for caching and real-time data
  • RabbitMQ for asynchronous task queuing
  • Immutable audit log storage

Frontend

  • React 18+ dashboard application
  • Material-UI or Ant Design components
  • Real-time WebSocket updates
  • Support for Operations, Traders, and RMs

Integrations

  • Hex Safe SDK (wallet operations)
  • HollaEx API (platform integration)
  • CCXT library (multi-exchange support)
  • Price oracle APIs (Chainlink, Pyth, CoinGecko)
  • CRM APIs (HubSpot for RM workflows)
  • Blockchain RPC providers (Infura, Alchemy, QuickNode)

DevOps & Infrastructure

  • Docker containerization
  • Kubernetes orchestration
  • GitHub Actions CI/CD
  • Terraform infrastructure-as-code
  • Monitoring (Datadog or Prometheus)
  • Logging (ELK stack or CloudWatch)

Non-Functional Requirements Defined

  • 99.9% uptime SLA
  • NAV calculation in under 5 minutes for 1000+ clients
  • API response times under 500ms (read), under 2s (write)
  • Horizontal scaling to 10,000+ clients
  • 100 concurrent subscriptions + 50 concurrent redemptions support
  • Deposit detection within 2 minutes of blockchain confirmation
  • Disaster recovery RTO under 4 hours, RPO under 5 minutes
  • Daily automated backups with 90-day retention

Testing Strategy

  • Unit tests targeting 80%+ code coverage for business logic
  • Integration tests for service interactions
  • End-to-end tests for critical user flows
  • Load testing for 1000+ concurrent users
  • Security testing and vulnerability scanning
  • KYC/AML integration testing

Deployment Strategy

Monorepo Structure

  • /services/api - Main REST API
  • /services/nav-calculator - NAV calculation service
  • /services/blockchain-monitor - Deposit monitoring
  • /services/notification - Notification orchestration
  • /packages/shared - Shared types and utilities
  • /packages/integrations - External service clients
  • /dashboards/web - Web dashboard frontend

CI/CD Pipeline

  • Automated linting and formatting
  • Unit test execution
  • Build verification
  • Docker image creation
  • Deployment to staging/production

Next Steps for Development

  1. Architecture Phase: Create detailed technical architecture document
  2. API Specification: Define all REST API endpoints with request/response formats
  3. Database Schema: Design complete schema with migrations
  4. Service Setup: Bootstrap all microservices
  5. Integration Implementation: Build each integration (Hex Safe, exchanges, etc.)
  6. Feature Development: Implement features following Epic/User Story breakdown
  7. Testing Phase: Comprehensive testing across all levels
  8. Deployment: Infrastructure setup and production deployment

Branch Information

  • Branch Name: 816-feat-aura-investment-product-engine
  • Base: main
  • Status: Ready for review and testing
  • Files Changed: 2 added (0 modified, 0 deleted)
  • Total Changes: 1,812 additions

Validation Status

Patch applied successfully without conflicts Markdown files created with proper structure Content integrity verified Files placed in correct directory (aura-project-docs/) Reference documentation created Ready for commit and PR merge

Notes

  • Both files are new additions with no conflicts with existing code
  • PRD is comprehensive but is a starting point; will evolve with detailed design phases
  • Epic breakdown provides clear roadmap for development sprints
  • Integration specifications allow parallel work on backend and frontend
  • Security and compliance requirements meet institutional standards

Issues Found and Resolution

No critical issues found during patch application or file review.

Pre-Existing Repository Issues (not related to PR #816):

  • Some existing linting warnings in unrelated files
  • Line ending inconsistencies in some tool files
  • These are pre-existing and not caused by this PR

Recommendation:

  • Files are production-ready for merge
  • Consider adding to documentation build pipeline
  • Schedule architecture review meeting before development begins