The Stellar Wallet Playbook is a documentation site that guides builders through creating wallets and related products on Stellar. It is built with Docusaurus and incorporates remote, pre-built data (lists, directories, assets) fetched at build time from Cloudflare R2, with a local fallback for offline development.
- Install dependencies
yarn- Start the dev server (skips remote data fetching by default)
yarn startSite runs at http://localhost:3000. Edits to content and components hot-reload automatically.
- Node.js >= 18
- Yarn (recommended)
yarn start: Start Docusaurus in dev mode withSKIP_REMOTE_DATA=true(fast; uses local fallback data).yarn start:with-data: Start dev server and fetch remote data (may be slower; requires env vars set).yarn build: Build the static site. Fetches remote data via a custom plugin unlessSKIP_REMOTE_DATA=trueis set.yarn build:with-data: Explicitly fetch remote data first, then build.yarn serve: Serve the production build locally.yarn fetch-data: Manually fetch remote data intosrc/data-remote/.yarn clear,yarn swizzle,yarn write-translations,yarn write-heading-ids: Docusaurus utilities.
This project can fetch structured data and image mappings at build time.
- Custom plugin:
plugins/fetch-remote-data-plugin.js - Fetch script:
scripts/fetch-remote-data-authenticated.js - Remote target: Cloudflare R2 (S3-compatible)
- Output location:
src/data-remote/(aliased as@site/src/data-remote)
Behavior:
- When building or starting with remote data, the plugin runs and calls the fetch script.
- If remote fetch fails or is skipped, the site falls back to local JSON under
src/data/when available, mirroring tosrc/data-remote/.
Control via environment:
SKIP_REMOTE_DATA=trueskips remote fetch (default foryarn start).
Create a .env file at the repo root if you plan to build with remote data:
# Account / credentials (either set the R2_* variables, or the CLOUDFLARE_* equivalents)
R2_ACCOUNT_ID=...
R2_ACCESS_KEY_ID=...
R2_SECRET_ACCESS_KEY=...
R2_BUCKET_NAME=wallets-playbook
# or
CLOUDFLARE_ACCOUNT_ID=...
CLOUDFLARE_ACCESS_KEY_ID=...
CLOUDFLARE_SECRET_ACCESS_KEY=...
CLOUDFLARE_BUCKET_NAME=wallets-playbookNotes:
- These are required for remote data fetches (
yarn start:with-data,yarn build, oryarn build:with-data). - If unset, the build will attempt to fall back to local
src/data/*.json.
Build with local fallback only (fast, offline):
SKIP_REMOTE_DATA=true yarn buildBuild including remote data (requires env vars):
yarn build
# or
yarn build:with-dataThe output is generated in build/ and can be hosted on any static hosting provider.
This repo is set up for static hosting. A netlify.toml contains a redirect from a legacy domain to https://stellarplaybook.com. You can deploy the build/ directory to your host of choice.
Typical options:
- Netlify / Vercel: configure to run
yarn buildand servebuild/. - Any static host: upload the contents of
build/.
docs/ # Main documentation content (MD/MDX)
<category>/*.mdx # Topic sections (e.g., wallets/, on-off-ramps/)
src/
components/ # React components for docs UI
css/ # Custom CSS (Tailwind + Docusaurus styles)
data/ # Local fallback JSON data
data-remote/ # Remote-fetched JSON + image mapper (generated)
pages/ # Any extra Docusaurus pages
utils/ # Utilities (e.g., image mapping)
plugins/
fetch-remote-data-plugin.js # Docusaurus plugin to pull data at build time
scripts/
fetch-remote-data-authenticated.js # Cloudflare R2 fetcher
static/ # Static assets served as-is under /
build/ # Production build output (generated)
docusaurus.config.js # Docusaurus configuration
sidebars.js # Sidebar configuration
- Docs live in
docs/. Each folder is a category with_category_.jsonand MD/MDX files. - Images live under
static/img/and are referenced via/img/...paths in content. - Data-driven pages/components may read from
@site/src/data-remote/*.json(generated) or the localsrc/data/*.jsonfallback.
Algolia DocSearch is configured in docusaurus.config.js. If you fork this repo, update the algolia config with your own appId, apiKey, and indexName.
- Custom styles:
src/css/custom.css - Tailwind CSS 4 is available; see
tailwind.config.jsandpostcss.config.js.
- Remote fetch fails at build:
- Ensure
.envis present and variables are correct. - Try a local build with
SKIP_REMOTE_DATA=true yarn build.
- Ensure
- Images not appearing:
- For remote data, image URLs are mapped via
src/data-remote/image-mapper.jsonand serve from a public R2 domain. - For local fallback, images should resolve under
/img(placed instatic/img).
- For remote data, image URLs are mapped via
- Dev server is slow when starting with data:
- Use
yarn start(which setsSKIP_REMOTE_DATA=true) for faster iteration.
- Use
- Fork and branch from
main. - Create focused edits in
docs/or components undersrc/. - Run
yarn startto preview changes. - Open a pull request with a clear description and screenshots if UI-related.
Unless otherwise noted in individual files, documentation content is provided under an open documentation-friendly license by the project owners. Verify licensing terms before redistribution.