Skip to content

alchemyplatform/docs

Repository files navigation

Alchemy Documentation

This repository contains the documentation for Alchemy's APIs and services. The documentation is built using Fern, a modern documentation platform.

The latest documentation lives on https://alchemy.docs.buildwithfern.com/home

Project Structure

/
├── src/
│   ├── openapi/     # REST API definitions (OpenAPI)
│   └── openrpc/     # JSON-RPC API definitions (OpenRPC)
└── fern/
    ├── <tab>/       # Written documentation for that tab (MDX)
    ├── api-specs/   # Dereferenced API Specs generated from definitions (gitignored)
    └── docs.yml     # Navigation and structure config

Warning

Account Kit documentation is maintained separately in the aa-sdk repository. See its README for contribution guidelines.

Consuming Specs

The API specifications generated in this repository are automatically published to the dev-docs.alchemy.com domain. These published specs provide machine-readable definitions for all of Alchemy's APIs, including both REST (OpenAPI) and JSON-RPC (OpenRPC) endpoints.

You can find the complete list of all available API specs at: https://dev-docs.alchemy.com/metadata.json

Each individual API spec can be found via a simple URL pattern:

  • REST API specs (OpenAPI): https://dev-docs.alchemy.com/alchemy/rest/{api-name}.json
  • JSON-RPC specs (OpenRPC): https://dev-docs.alchemy.com/alchemy/json-rpc/{api-name}.json
  • Chain-specific specs (OpenRPC): https://dev-docs.alchemy.com/chains/{chain-name}.json

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/alchemyplatform/docs.git
  2. Install dependencies:

    asdf install # or `mise install`
    corepack enable
    pnpm i

Development

Local Development

Start the development server:

pnpm dev

This will start a local server with live reloading. Visit http://localhost:3020 to view the documentation.

Building API Specs

Production OpenAPI and OpenRPC specs are generated using scripts from their definition files in the src directory.

pnpm run generate

This will generate all specs as dereferenced json files in the fern/api-specs directory.

Validation

You can validate both OpenAPI and OpenRPC using these commands:

# Validate REST API specs
pnpm run validate:rest

# Validate RPC specs
pnpm run validate:rpc

# Or you can run them together with
pnpm run validate

Linting

The project uses several linting tools to ensure code quality and consistency:

  • ESLint: For JavaScript and TypeScript code linting
  • Prettier: For code formatting
  • Remark: For Markdown/MDX linting
  • TypeScript: For type checking

You can find the appropriate commands for running each in package.json

Enforcement

The project uses Husky and lint-staged to run linting checks before commits.

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and contribute to the documentation.

Resources

License

This project is licensed under the CC-BY-4.0 License - see the LICENSE file for details.

About

Source for Alchemy's main documentation site for API references, guides, and more

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 48

Languages