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
/
├── 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.
-
Clone the repository:
git clone https://github.com/alchemyplatform/docs.git
-
Install dependencies:
asdf install # or `mise install` corepack enable pnpm i
Start the development server:
pnpm dev
This will start a local server with live reloading. Visit http://localhost:3020
to view the documentation.
In some cases we need to use custom-built components that require styling outside the standard Fern capabilities. Currently, Fern does not support building/rendering Custom JS + React locally, so first you'll need to build the custom component:
cd footer/ # using the custom footer component as an example
pnpm install # if you need to install dependencies
pnpm run build
Then, a preview needs to be generated (this requires access to Fern):
pnpm fern login
pnpm fern generate --docs --preview
This will take a few minutes as it needs to upload a lot of files to generate the preview after which it will output a preview URL.
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.
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
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
The project uses Husky and lint-staged to run linting checks before commits.
We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and contribute to the documentation.
This project is licensed under the CC-BY-4.0 License - see the LICENSE file for details.