Skip to content

flare-foundation/developer-hub

Repository files navigation

Flare Developer Hub

The decentralized origin for Flare builders ☀️.

This site is built with Docusaurus, a modern static site generator.

🚀 Getting Started

Prerequisites

Ensure the following tools are installed:

Installation

  1. Clone the repository:

    git clone https://github.com/flare-foundation/developer-hub.git
    cd developer-hub
  2. Install dependencies:

    npm install
  3. Start the local development server:

    npm run start

    This launches the development server and automatically opens your default browser. Live reloading ensures changes appear instantly.

🧑‍💻 Code Examples

Browse commonly used snippets in developer-hub/examples/.

Supported languages:

  • Python
  • JavaScript
  • Rust
  • Go

🛠️ Development Guidelines

Documentation Formatting

Ensure consistent formatting using Prettier:

npm run format

Note: Prettier support for MDXv3 is evolving (tracking issue). If needed, bypass Prettier by using:

{/* prettier-ignore */}

Code Formatting

All code examples in examples/ follow language-specific formatters.

🏗️ Building for Production

To create a production-ready build:

npm run build

The static files are generated in the build directory. To serve the production build locally:

npm run serve

Tip: Search only works in production builds.

📄 Autogenerate Solidity Documentation

To generate Solidity documentation:

  1. Switch to Node.js v18:

    nvm use 18
  2. Run the Documentation Generator:

    cd docgen
    chmod +x generate-solidity-docs.sh
    ./generate-solidity-docs.sh

    This pulls the latest smart contracts and generates docs.

  3. Switch Back to Node.js v20:

    nvm use 20

🔄 Automations

A set of scripts that:

  • Update contract addresses (from onchain ContractRegistry)
  • Update feed risks (from automations/*_risk.json)

Run all automations:

  1. Ensure uv dependencies are synced:

    cd automations
    uv sync
  2. Execute automations:

    npm run automations

🤝 Contributing

Contributions are welcome! Before your first PR, read the CONTRIBUTING.md.