Optim Finance
  • INTRODUCTION
    • Introduction
    • Roadmap
  • OADA
    • Overview
    • OADA 🟣 and sOADA 🟢
    • Flow of Funds
    • User Guides
      • Passive yield with sOADA
      • Epoch Stake Auction
    • AMOs
      • Splash DEX AMO
      • Stake Auction AMO
      • Staking AMO
    • UNHCR Donation Module
      • Automated Yield Donation Protocol
      • NFT Impact Certificate
      • Integration with the OADA Ecosystem
      • Humanitarian Partnership
      • Future Extensions
    • Governance
    • Resources
  • OTOKEN Framework
    • Introduction
      • Key Benefits
      • Who is it for?
      • Inspirations & Applications
    • Framework
      • Key Concepts
      • Use Cases
      • OTOKENs
    • Core Concepts
      • OTOKEN and sOTOKEN
      • Algorithmic Market Operations (AMOs)
      • Balancing Stability, Yield, and Adaptability
    • System Architecture
      • OTOKEN Policy
      • Staking AMO
      • Collateral Management AMO
    • Extensions & Other Modules
      • DEX AMO (Liquidity & Peg Stability)
      • Stake Auction AMO
      • Borrowing & Lending AMOs
      • Other AMOs & Opportunities
    • Multiple OTOKEN Deployments
      • Ecosystem Synergy
      • Not Just Synthetic Assets
    • Vision
      • Key Pillars of the OToken Framework
      • Future Directions & Opportunities
      • An Invitation to Innovate
    • Bug Bounty Program
  • LIQUIDITY BONDS
    • Overview
    • Bond App FAQ
    • Use Cases
      • ISPO Bonds
      • SPO Bonds
    • Bond Architecture
      • Validators
      • High Level Workflow
      • Scripts Technical
      • Transaction Flow
      • Pooled Loans
    • Guides for SPOs
      • Bond Creation
      • Bond Sales
      • SPO Bond Issue Summary
      • Bond Verification
    • Liquidity Bonds Audit
  • OUSD
    • OUSD Reserves
      • Reserve Criteria
        • Stability and Reputation
        • Compliance
        • Smart Contract Security
    • Ongoing Reserves Management
      • Reserve Asset Valuation Calculation
      • Dynamic Reserve Asset Adjustment Metrics
        • Dynamic Reserves Adjustment
    • Yield, Staking, and Flow of Funds
      • Yield Modules
        • OUSD DEX AMO
        • Future Modules (v2)
      • Staking AMO
      • sOUSD Redemption Mechanism
    • Peg Protection
      • Market Depth and Liquidity
    • Governance and Risk Framework
      • Risk Capital Requirements
      • First-Loss Capital Structure
      • Asset Allocation Framework
        • Static Governance Parameters
        • Dynamic Allocation System
    • Financial Engineering Audit
  • Leviathan
    • System Architecture
      • Background
      • Concurrency Limitations
      • Complexity in Transaction and Contract Management
    • Core Concepts
      • Deterministic Transaction
        • Guaranteed Transaction
      • Instant Finality
        • Liveness and Safety
        • Probabilistic Finality vs Instant Finality
      • Account Abstraction
        • Concept of Account Abstraction
        • Technical Implementation
        • Security and Operational Implications
      • Intent Based Transactions
        • The Infrastructure and Process of IBTs
        • Declarative Constraints in IBTs
      • Layer 2
        • Types of Layer 2 Solutions
      • Sequencers
        • Core Functions of Sequencers
        • Role in Layer 2 Rollups
        • Challenges
    • System Components
      • Understanding the System Components
      • Optim-Account (Intents to enable tx chain)
        • User Interaction and Intent Submission
        • Intent Structuring and Authentication
        • Smart Contract Functionalities and Operational Parameters
        • The Necessity of an Account-Based Framework
        • Account Abstraction and Its Role in Leviathan
      • Leviathan Sequencer System (tx chain building)
        • The Role of the Leviathan Sequencer System in Conjunction with The Optim Account
        • Sequencing and Ordering of Transactions
        • The Role of Time in the System
        • The Pragmatic Leviathan: Dealing with Potential Changes
      • The Role of OADA in the Leviathan System
        • Operational Simplification of Staking Mechanisms via OADA Integration
        • Facilitating Time Dilation and Composability
    • Processes
      • Entering Leviathan
      • Transaction Execution
      • Leaving Leviathan
    • High Level Overview
      • System Design
        • Account Abstraction Functionality
        • Guaranteed Transactions
        • Instant Finality
        • Unbreakable Transaction Chaining
        • Layer 2 Execution Environment
        • Future Sequencer Network
      • System Context
        • Limitations of current transactions chaining paradigm
        • Limitations of current inter dApp composability issues
        • Explanation of basic design and non-custodial asset inputs
        • Intent Based Transactions
        • Account Base vs eUTxO model app architecture
      • Theoretical Applications
  • GOVERNANCE
    • Governance Overview
      • Proposal Temp Check
      • Governance Proposal
        • On/Off Chain Mechanics
      • ODAO
    • Tokenomics
      • Categories
      • Vesting
    • Optim DAO Wallets
    • Protocol Profits
  • GUIDES
    • Transaction Chaining
      • Background
      • Overview
      • Pool Transaction Chaining
    • OPTIMiz Conversion
  • ODAO Stack
    • Introduction
    • Design Principles
    • Why Optim DAO Stack?
      • Current Limitations
      • ODAO Solutions
    • Key Features
      • Snapshot Voting
      • Treasury Management
      • Proposal Execution
    • System Architecture
      • Modular Framework
      • On-Chain Logic
      • Off-Chain Operations
      • User Interfaces
    • Core Modules
      • Snapshot Voting Module
      • Treasury Management Module
      • Proposal Execution Module
    • Future Roadmap
      • Potential Future Enhancements
      • Long Term Vision
  • OADA UI
    • Setup
      • Installation
      • Development Workflow
      • Troubleshooting
      • Development Tips
      • Open Source Contributions
      • FAQ
    • Key Functionalities
      • Wallet Integration
      • Dashboard
      • Transaction Management
        • UTxO Management
        • Transaction Creation and Conversion
        • Transaction Monitoring
      • Real-time Updates
        • Portfolio Value Tracking
        • Transaction Status Monitoring
    • OADA Smart Contract API
      • Minting OADA
      • Staking OADA
      • Unstaking sOADA
      • Epoch Stake Auction
        • Bid Calculation Functions
        • Auction Actions
        • Bid Form Component
        • Auction Dashboard
    • Tutorials
      • Environment Setup and Installation
      • Understanding the Project Structure
      • Basic Configuration and Customization
      • Working with Components
      • State Management and Data Flow
      • Wallet Integration and State Management
      • Smart Contract Integration
      • Advanced UI Customization
      • Testing and Quality Assurance
Powered by GitBook
On this page
  • Code Style and Linting
  • Testing
  • Building for Different Environments
  • Available Scripts
  • Project Structure
  1. OADA UI
  2. Setup

Development Workflow

Code Style and Linting

  • The project uses ESLint for code linting

  • Prettier is configured for code formatting

  • Run linting:

    npm run lint
    # or
    yarn lint

    To automatically fix linting issues:

    npm run lint:fix
    # or
    yarn lint:fix

Testing

  • Unit tests: npm test or yarn test

  • Coverage report: npm run test:coverage or yarn test:coverage

  • E2E tests: npm run test:e2e or yarn test:e2e

  • Visual regression tests: npm run test:visual or yarn test:visual

    Test file naming convention:

    • Unit tests: ComponentName.test.tsx

    • Integration tests: ComponentName.integration.test.tsx

    • E2E tests: feature-name.e2e.test.ts

Building for Different Environments

# Development build
npm run build:dev
# or
yarn build:dev

# Production build
npm run build:prod
# or
yarn build:prod

# Staging build
npm run build:staging
# or
yarn build:staging

Each environment build will:

  • Use appropriate environment variables

  • Apply environment-specific optimizations

  • Generate source maps (except production)

  • Create a build directory with optimized assets

Available Scripts

  • npm start or yarn start: Runs the app in development mode

  • npm build or yarn build: Builds the app for production

  • npm test or yarn test: Launches the test runner

  • npm run analyze: Analyzes the bundle size

  • npm run lint: Runs ESLint

  • npm run format: Formats code using Prettier

  • npm run type-check: Runs TypeScript type checking

  • npm run test:coverage: Generates test coverage report

  • npm run test:e2e: Runs end-to-end tests

  • npm run test:visual: Runs visual regression tests

  • npm run storybook: Launches Storybook for component development

  • npm run build-storybook: Builds static Storybook files

  • npm run prepare: Installs git hooks

  • npm run validate: Runs all validation scripts (lint, type-check, test)

Project Structure

oada-ui/
├── src/                    # Source files
│   ├── components/        # Reusable UI components
│   │   ├── common/       # Shared components
│   │   ├── forms/        # Form-related components
│   │   └── layout/       # Layout components
│   ├── pages/            # Page components
│   │   ├── auth/        # Authentication pages
│   │   ├── dashboard/   # Dashboard pages
│   │   └── settings/    # Settings pages
│   ├── hooks/            # Custom React hooks
│   │   ├── api/         # API-related hooks
│   │   ├── auth/        # Authentication hooks
│   │   └── ui/          # UI-related hooks
│   ├── services/         # API and external services
│   │   ├── api/         # API clients
│   │   ├── auth/        # Authentication services
│   │   └── storage/     # Storage services
│   ├── store/            # Redux store configuration
│   │   ├── actions/     # Redux actions
│   │   ├── reducers/    # Redux reducers
│   │   └── selectors/   # Redux selectors
│   ├── styles/           # Global styles and theme
│   │   ├── base/        # Base styles
│   │   ├── components/  # Component styles
│   │   └── theme/       # Theme configuration
│   ├── types/            # TypeScript type definitions
│   │   ├── api/         # API types
│   │   ├── components/  # Component types
│   │   └── store/       # Store types
│   └── utils/            # Utility functions
│       ├── api/         # API utilities
│       ├── auth/        # Authentication utilities
│       └── validation/  # Validation utilities
├── public/               # Static files
│   ├── assets/          # Static assets
│   ├── locales/         # Translation files
│   └── index.html       # HTML template
├── tests/               # Test files
│   ├── e2e/            # End-to-end tests
│   ├── integration/    # Integration tests
│   └── unit/           # Unit tests
├── stories/             # Storybook stories
├── scripts/             # Build and utility scripts
├── config/              # Configuration files
├── package.json         # Project dependencies and scripts
├── tsconfig.json        # TypeScript configuration
├── tailwind.config.js   # Tailwind CSS configuration
└── craco.config.js      # CRACO configuration
PreviousInstallationNextTroubleshooting

Last updated 1 month ago