Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/check-tutorial-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check tutorial code sync
on:
workflow_dispatch:
pull_request:
paths:
- 'docs/tutorials/**'
- 'scripts/tutorial-sync/**'

jobs:
check-sync:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: dashpay/platform-tutorials
path: platform-tutorials

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.10'

- run: pip install pyyaml

- run: python3 scripts/tutorial-sync/sync_tutorial_code.py --check --source platform-tutorials
74 changes: 74 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

This is the Dash Platform documentation repository - a Sphinx-based documentation site that covers Dash Platform features, APIs, SDKs, and developer guides. The documentation is written in Markdown with MyST parser extensions and built with Sphinx.

## Build Commands

```bash
# Set up development environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt

# Build documentation
make html

# Clean build
make clean

# Sync sidebar after building (recommended after adding new pages)
python scripts/sync_sidebar.py

# Sync tutorial code from platform-tutorials repo
python3 scripts/tutorial-sync/sync_tutorial_code.py --source /path/to/platform-tutorials

# Check for tutorial code drift (CI mode)
python3 scripts/tutorial-sync/sync_tutorial_code.py --check --source /path/to/platform-tutorials

# View built documentation
# Open _build/html/index.html in browser
```

## Architecture

- **conf.py**: Main Sphinx configuration with extensions, theme settings, and intersphinx mappings
- **docs/**: Main documentation content organized by sections:
- `intro/`: Background and platform overview
- `tutorials/`: Step-by-step guides
- `explanations/`: Feature descriptions and concepts
- `reference/`: API documentation and technical specs
- `protocol-ref/`: Platform protocol reference
- `sdk-js/`, `sdk-rs/`: SDK documentation
- **_templates/**: Custom Jinja2 templates for sidebar and layout
- **_static/**: CSS, JavaScript, and image assets
- **scripts/**: Utility scripts including sidebar synchronization

## Documentation Structure

The site uses a hierarchical structure with:

- Main index.md linking to Platform docs
- docs/index.md as Platform documentation entry point
- Sections organized with toctree directives in MyST format
- Cross-references using intersphinx to Core and User documentation

## Key Development Notes

- Uses MyST parser for enhanced Markdown features with reStructuredText compatibility
- Custom sidebar template requires syncing via `scripts/sync_sidebar.py` after structural changes
- Intersphinx links to related Dash documentation (user and core docs)
- GitHub integration for edit links and source references
- Google Analytics tracking configured
- Uses pydata-sphinx-theme with custom CSS overrides

## File Patterns

- Documentation files: `docs/**/*.md`
- Configuration: `conf.py`, `requirements.txt`
- Templates: `_templates/*.html`
- Assets: `_static/**/*`
- Build output: `_build/html/` (excluded from git)
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Docs](https://readthedocs.org/). Feel free to [open an
issue](https://github.com/dashpay/docs-platform/issues/new/choose) or submit PRs modifying the
English source text in this repository.

Tutorial code blocks in `docs/tutorials/` are synced from the
[platform-tutorials](https://github.com/dashpay/platform-tutorials) repo. Run
`python3 scripts/tutorial-sync/sync_tutorial_code.py --check --source /path/to/platform-tutorials`
to check for drift, or without `--check` to update the docs in-place.

## License

[MIT](/LICENSE) © Dash Core Group, Inc.
4 changes: 2 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'.DS_Store',
'README.md',
'.devcontainer',
'local',
'.local',
'scripts',
'img/dev/gifs/README.md',
'docs/other',
Expand Down Expand Up @@ -123,7 +123,7 @@
# "github_url": "https://github.com", # or your GitHub Enterprise site
"github_user": "dashpay",
"github_repo": "docs-platform",
"github_version": "2.0.0",
"github_version": "3.1.0",
"doc_path": "",
}

Expand Down
12 changes: 8 additions & 4 deletions docs/tutorials/create-and-fund-a-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ const network = 'testnet';

try {
const mnemonic = await wallet.generateMnemonic();
const pathInfo = network === 'testnet'
? await wallet.derivationPathBip44Testnet(0, 0, 0)
: await wallet.derivationPathBip44Mainnet(0, 0, 0);
const pathInfo =
network === 'testnet'
? await wallet.derivationPathBip44Testnet(0, 0, 0)
: await wallet.derivationPathBip44Mainnet(0, 0, 0);

// Derive the first BIP44 key to get a platform address
const keyInfo = await wallet.deriveKeyFromSeedWithPath({
Expand All @@ -40,7 +41,10 @@ try {
// ⚠️ Never log mnemonics in real applications
console.log('Mnemonic:', mnemonic);
console.log('Platform address:', address);
console.log('Fund address using:', `https://bridge.thepasta.org/?address=${address}`);
console.log(
'Fund address using:',
`https://bridge.thepasta.org/?address=${address}`,
);
} catch (e) {
console.error('Something went wrong:', e.message);
}
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ sphinx==8.1.3
sphinx-copybutton==0.5.2
sphinx-hoverxref==1.4.2
sphinx_design==0.6.1
pyyaml==6.0
sphinxcontrib-googleanalytics==0.4
Loading