Audius Applications Monorepo

repository·main·Indexed 20 days ago

https://github.com/audiusproject/apps

A monorepo for Audius applications, including web/mobile clients, an embeddable player, a TypeScript SDK, and protocol-level packages for Solana and Ethereum. It features the audius-cmd CLI for protocol actions (managing users, tracks, playlists, and albums) and the @audius/common package for shared utilities. The documentation covers data fetching and normalization using TanStack Query (v5), including patterns for query hooks, infinite pagination, and mutation hooks with optimistic updates.

Tokens
208.9K
Snippets
859
Records
1.3K
Agent score
70%

What's inside audiusproject-apps

  1. Overview of @audius/migrate-tool

    main

    The @audius/migrate-tool is a web application designed to help artists migrate their tracks from an old Audius account to a new one in cases where they have lost access to the original account (e.g., forgotten passwords or lost emails).

    Workflow:

    1. Artist Authentication: The artist signs in with their new Audius account via OAuth.
    2. Request Submission: They provide the handle of the old account. The tool previews the tracks, and upon submission, a request is stored in Supabase with status = 'pending'.
    3. Admin Review: An Audius team member (authenticated via Google SSO) reviews the request. Note: Identity verification must be performed out-of-band via official support channels; the tool does not verify ownership.
    4. Execution: Upon approval, the backend uses the Audius SDK to pull audio and artwork from the old account and re-upload it to the new account using a developer app's bearer token.
  2. Overview of es-indexer

    main
    The es-indexer is a service responsible for indexing data from PostgreSQL to Elasticsearch. It ensures data consistency by using a combination of a 'catchup' mechanism (to backfill data based on the last known high blocknumber) and a 'listener' mechanism (to process real-time updates via PostgreSQL LISTEN/NOTIFY).
  3. Overview of the Audius Identity Service

    main

    The Audius Identity Service is responsible for managing identity-related operations within the Audius ecosystem. Its core responsibilities include:

    • Encrypted Auth Storage: Storing encrypted authentication ciphertexts.
    • Twitter OAuth: Handling OAuth flows via Twitter.
    • Relay Transactions: Performing relay transactions on behalf of users to facilitate seamless interactions without requiring direct user signing for every action.
  4. Overview of Audius Packages

    main

    The audiusproject/apps repository contains the core components of the Audius ecosystem, including client applications, developer tools, and protocol interfaces. Key packages include:

    • web: Web and desktop applications.
    • mobile: iOS and Android applications.
    • embed: Embed player for third-party sites (e.g., X, Discord).
    • sdk: @audius/sdk — TypeScript SDK for interacting with the Audius protocol.
    • harmony: Audius design system.
    • common: Shared state, models, and utilities for web and mobile.
    • spl: Solana program instructions for Audius.
    • eth: Ethereum governance and staking contract interactions.
    • fixed-decimal: Fixed-point decimal math utilities.
    • identity-service: Auth and identity service.
    • commands: CLI for performing actions against the dev stack.
    • compose: audius-compose service definitions.
    • eslint-config-audius: Shared ESLint configuration.
  5. Overview of Self-Serve DDEX Ingestion

    main

    The ddex-processor is an open-source Node.js application that allows you to run your own DDEX ingestion server for Audius. It automates the process of parsing DDEX XML deliveries and publishing music to the Audius platform using the Audius SDK.

    Key features include:

    • S3 polling: Automatically retrieves new deliveries from configured S3 buckets.
    • DDEX XML parsing: Supports ERN 3.8 and ERN 4.0 message formats.
    • Web UI: A browser-based interface for managing releases, users, and publishing status.
    • CLI: Command-line tools for parsing, publishing, and debugging.
    • Auto-publish: Option to publish to claimable accounts without prior artist authorization.
    • OAuth artist linking: Allows artists to authorize your application to publish on their behalf.
    • Reporting: Provides sales reports and content lifecycle management (CLM) reports.
  6. Access Audius Documentation and API Resources

    main

    Developers can access the core Audius technical resources through the following endpoints:

  7. Open Audio Protocol (OAP) Resources

    main

    Audius is part of the Open Audio Protocol (OAP). Developers can access protocol-specific resources at https://openaudio.org, including:

  8. Use @audius/spl to create and decode Solana TransactionInstructions

    main

    The @audius/spl package provides TypeScript utilities for interacting with Audius Solana Programs. It allows developers to:

    1. Create TransactionInstructions: Construct instructions required to interact with Audius programs on the Solana blockchain.
    2. Decode TransactionInstructions: Parse instructions, which is essential for building indexers or analyzing blockchain data.
    3. Test Indexers: Use the decoding capabilities to write robust tests for Solana-based indexers.

    This package is intended for use in TypeScript/JavaScript clients and indexer services.

  9. Explore Audius development entry points

    main

    Audius provides several ways to interact with its music catalog and ecosystem:

    • REST API: Use this to query, stream, and search for tracks, users, and playlists across the network.
    • Javascript SDK: Use the official Javascript SDK to build integrated Audius applications.
    • Authentication: Implement "Log in with Audius" to allow users to authenticate into your application using their existing Audius accounts.
    • Open Audio Protocol: For building directly on the transaction, DDEX, and storage layers, refer to the Open Audio Protocol documentation.
  10. Overview of Audius Ethereum Contracts

    main

    The Audius Ethereum contracts implement the core logic for the Open Audio Protocol. Their primary responsibilities include:

    • Token Management: Creating the Audius token via an ERC-20 standard.
    • Service Management: Tracking different service versions and managing service registration/staking via a ServiceProviderFactory.
    • Staking and Rewards: Enabling service providers to stake, allowing users to delegate Audius tokens to providers, and minting new tokens to reward stakers and delegators via the EthRewardsManager.
    • Governance: Enabling protocol actions like slashing and static value updates through a governance mechanism.
    • Delegation: Facilitating the delegation of tokens from users to service providers.

    Upgradeability Pattern

    All contracts utilize OpenZeppelin's Proxy pattern via the AudiusAdminUpgradeabilityProxy. This extends AdminUpgradeabilityProxy and allows the protocol logic to be upgraded through the Governance contract.