Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.61 KB

File metadata and controls

61 lines (41 loc) · 2.61 KB

CLAUDE.md

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

Overview

This is the Handpoint developer documentation website, built with Docusaurus 2. It documents multiple payment SDKs: Android, iOS, JavaScript, Express, Windows, and REST API.

Commands

yarn install          # Install dependencies
yarn start            # Start local dev server at localhost:3000
yarn build            # Build the static site
yarn clear            # Remove build artifacts

Creating a new SDK version (required before releasing to production)

npm run docusaurus docs:version:android "Android SDK 7.x.x"
npm run docusaurus docs:version:ios "iOS SDK x.x.x"
npm run docusaurus docs:version:javascript "JavaScript SDK x.x.x"
npm run docusaurus docs:version:restapi "REST API x.x.x"
npm run docusaurus docs:version:windows "Windows SDK x.x.x"
npm run docusaurus docs:version:express "Express SDK x.x.x"

After running these commands, restart Docusaurus to see the new version.

Architecture

Multi-instance Docusaurus setup

The site uses Docusaurus multi-instance docs plugins — each SDK is a separate plugin instance with its own versioned docs, sidebar config, and search index. The main plugin handles docs/ (FAQs, intro), while six additional plugin instances handle android/, ios/, javascript/, restapi/, windows/, express/.

Each SDK plugin has:

  • A live docs folder (e.g., android/)
  • Versioned docs folder (e.g., android_versioned_docs/)
  • Versioned sidebars (e.g., android_versioned_sidebars/)
  • A versions manifest (e.g., android_versions.json)

Sidebars for most SDKs use sidebarsIos.js (autogenerated). Android uses sidebarsAndroid.js.

includeCurrentVersion flag

In docusaurus.config.js, some plugins have includeCurrentVersion: false, // dev comments. The setenv.sh script toggles this flag:

  • Staging (setenv.sh test): sets to true — shows work-in-progress docs
  • Production (setenv.sh prod): sets to false — hides unreleased docs

Do not manually toggle this flag — it is managed by the deployment script.

Branching and Deployment

Follows Gitflow:

  • Feature branches → PR to dev → auto-deploys to developer.handpoint.io
  • dev → PR to main → auto-deploys to developer.handpoint.com

Before merging a new SDK version to main, always run the version-tagging command above first.

CI/CD is defined in .github/workflows/deploy.yml. The setenv.sh script is run as part of the deployment to switch URLs and includeCurrentVersion flags between environments.