Skip to content

Commit a8d0f5e

Browse files
itsbobbyzzz168itsbobbyzclaude
authored
feat: Migrate documentation from Docusaurus to Mintlify (#211)
## Summary - Replace Docusaurus docs site with Mintlify-powered documentation - Sprinter Credit (V2) API reference with interactive playground and response examples - Stash Solver Credit (V1) API reference - Quickstart guides: Card Programs (with authorization webhook) and Agent Skills (health monitor, yield optimizer) - Credit Engine, Policy Engine, and Risk Management documentation - OpenAPI specs synced from upstream sprinter-api repo ## Mintlify Setup After merging, update the Mintlify dashboard: 1. **Repository**: `sprintertech/sprinter-sdk` 2. **Branch**: `main` 3. **Subdirectory**: `docs` 4. **Custom domain**: `docs.sprinter.tech` ## Test plan - [ ] Verify Mintlify build succeeds on this branch - [ ] Check all navigation links work - [ ] Confirm API playground loads for credit endpoints - [ ] Review content accuracy with dev team 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: itsbobbyz <robert@chainsafe.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7c38182 commit a8d0f5e

File tree

206 files changed

+17273
-33643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+17273
-33643
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,49 +29,3 @@ jobs:
2929
run: "yarn run test:unit"
3030
- name: "Integrations Tests"
3131
run: "yarn run test:integrations"
32-
- name: Set branch name for Cloudflare Pages
33-
id: cf-branch
34-
run: |
35-
if [[ "${{ github.ref_name }}" == "master" ]]; then
36-
echo "CF_BRANCH_NAME=preview" >> $GITHUB_ENV
37-
else
38-
echo "CF_BRANCH_NAME=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV
39-
fi
40-
- name: Publish Docs to Cloudflare Pages
41-
id: docs-publish
42-
uses: cloudflare/wrangler-action@v3
43-
with:
44-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
45-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
46-
accountId: 167153f505df751a355a8192b0656720
47-
command: pages deploy ./docs/build --project-name=sprinter-docs --branch=${{ env.CF_BRANCH_NAME }}
48-
- name: Publish POC to Cloudflare Pages
49-
id: poc-publish
50-
uses: cloudflare/wrangler-action@v3
51-
with:
52-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
53-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
54-
accountId: 167153f505df751a355a8192b0656720
55-
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc --branch=${{ env.CF_BRANCH_NAME }}
56-
- name: Generate Deployment Summary
57-
run: |
58-
echo "# 🚀 Deployment Summary" >> $GITHUB_STEP_SUMMARY
59-
echo "" >> $GITHUB_STEP_SUMMARY
60-
echo "| **Project** | **Preview URL** |" >> $GITHUB_STEP_SUMMARY
61-
echo "| ----------------------- | ---------------- |" >> $GITHUB_STEP_SUMMARY
62-
echo "| **Docs** | [View Docs -> ${{ steps.docs-publish.outputs.deployment-url }}](${{ steps.docs-publish.outputs.deployment-url }}) |" >> $GITHUB_STEP_SUMMARY
63-
echo "| **POC** | [View POC -> ${{ steps.poc-publish.outputs.deployment-url }}](${{ steps.poc-publish.outputs.deployment-url }}) |" >> $GITHUB_STEP_SUMMARY
64-
- name: Notify About Deployment
65-
if: ${{ github.actor != 'dependabot[bot]' && github.ref_name != 'master' }}
66-
uses: actions/github-script@v7
67-
with:
68-
script: |
69-
const docsUrl = `**Docs:** [View Deployment -> ${{ steps.docs-publish.outputs.deployment-url }}](${{ steps.docs-publish.outputs.deployment-url }})`;
70-
const pocUrl = `**POC:** [View Deployment -> ${{ steps.poc-publish.outputs.deployment-url }}](${{ steps.poc-publish.outputs.deployment-url }})`;
71-
const message = `🚀 **Deployment Completed**\n\n${docsUrl}\n${pocUrl}`;
72-
await github.rest.issues.createComment({
73-
issue_number: context.issue.number,
74-
owner: context.repo.owner,
75-
repo: context.repo.repo,
76-
body: message,
77-
});

docs/.gitignore

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/.mintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Mintlify automatically ignores these files and directories:
2+
# .git, .github, .claude, .agents, .idea, node_modules,
3+
# README.md, LICENSE.md, CHANGELOG.md, CONTRIBUTING.md
4+
5+
# Draft content
6+
drafts/
7+
*.draft.mdx

docs/AGENTS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Documentation project instructions
2+
3+
## About this project
4+
5+
- Sprinter API documentation site built on [Mintlify](https://mintlify.com)
6+
- Pages are MDX files with YAML frontmatter
7+
- Configuration lives in `docs.json`
8+
- Run `mint dev` to preview locally
9+
- Run `mint broken-links` to check links
10+
11+
## Repos documented
12+
13+
| Repo | Type | Spec |
14+
| ------------------------------- | ---------------------------- | ---------------------------------------------------- |
15+
| `sprintertech/miso-api` | REST API (Go/Gin) | OpenAPI 3.0 at `api-reference/miso/openapi.json` |
16+
| `sprintertech/sprinter-api` | REST API (Go/Gin) | OpenAPI 3.0 at `api-reference/sprinter/openapi.json` |
17+
| `sprintertech/sprinter-signing` | MPC signing (Go/Gorilla Mux) | Manual MDX pages in `api-reference/signing/` |
18+
| `sprintertech/stash-repayment` | Background worker (Go) | Architecture page in `architecture/` |
19+
20+
## Terminology
21+
22+
- "credit" — collateralized borrowing via CreditHub contracts
23+
- "solver" — entity that fills cross-chain intents
24+
- "earn vault" — yield-bearing wrapper (Morpho, Yo Protocol)
25+
- CAIP-2 format for chain IDs: `eip155:8453` (Base), `eip155:1` (Ethereum)
26+
- "MPC signing" — threshold signature scheme across multiple nodes
27+
28+
## Style preferences
29+
30+
- **LLM/agent-optimized**: prioritize code snippets, types, and structured tables over prose
31+
- Curl examples for every endpoint
32+
- Go type definitions from source code
33+
- JSON request/response examples
34+
- Minimal explanatory text — let code speak
35+
- Use tables for parameters, enums, and config
36+
- Use active voice and second person ("you")
37+
38+
## Content boundaries
39+
40+
- Do not document internal deployment/ops procedures
41+
- Do not document environment variables or secrets
42+
- Focus on external-facing API contracts only

docs/CHANGELOG.md

Lines changed: 0 additions & 155 deletions
This file was deleted.

docs/CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
> **Customize this file**: Tailor this template to your project by noting specific contribution types you're looking for, adding a Code of Conduct, or adjusting the writing guidelines to match your style.
2+
3+
# Contribute to the documentation
4+
5+
Thank you for your interest in contributing to our documentation! This guide will help you get started.
6+
7+
## How to contribute
8+
9+
### Option 1: Edit directly on GitHub
10+
11+
1. Navigate to the page you want to edit
12+
2. Click the "Edit this file" button (the pencil icon)
13+
3. Make your changes and submit a pull request
14+
15+
### Option 2: Local development
16+
17+
1. Fork and clone this repository
18+
2. Install the Mintlify CLI: `npm i -g mint`
19+
3. Create a branch for your changes
20+
4. Make changes
21+
5. Navigate to the docs directory and run `mint dev`
22+
6. Preview your changes at `http://localhost:3000`
23+
7. Commit your changes and submit a pull request
24+
25+
For more details on local development, see our [development guide](development.mdx).
26+
27+
## Writing guidelines
28+
29+
- **Use active voice**: "Run the command" not "The command should be run"
30+
- **Address the reader directly**: Use "you" instead of "the user"
31+
- **Keep sentences concise**: Aim for one idea per sentence
32+
- **Lead with the goal**: Start instructions with what the user wants to accomplish
33+
- **Use consistent terminology**: Don't alternate between synonyms for the same concept
34+
- **Include examples**: Show, don't just tell

docs/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Mintlify
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/README.md

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,26 @@
1-
# Website
1+
# Sprinter & Miso API Documentation
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
> **Initial draft**This is the first pass at API documentation for the Sprinter and Miso ecosystem. Content is auto-generated from OpenAPI specs and source code. Expect refinements, additional examples, and expanded coverage in future updates.
44
5-
### Installation
5+
## What's Documented
66

7-
```
8-
$ yarn
9-
```
10-
11-
### Local Development
12-
13-
```
14-
$ yarn start
15-
```
7+
| Service | Source Repo | Type |
8+
| ------------------- | ------------------------------- | ----------------------------------------------- |
9+
| **Miso API** | `sprintertech/miso-api` | REST API — user registration, cards, referrals |
10+
| **Sprinter API** | `sprintertech/sprinter-api` | REST API — credit, liquidity, solver operations |
11+
| **Signing API** | `sprintertech/sprinter-signing` | MPC threshold signing service |
12+
| **Stash Repayment** | `sprintertech/stash-repayment` | Architecture overview (background worker) |
1613

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
14+
## Development
1815

19-
### Build
16+
Requires Node 22 LTS (Node 25+ is not supported by Mintlify).
2017

18+
```bash
19+
npx mintlify dev
2120
```
22-
$ yarn build
23-
```
24-
25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2621

27-
### Deployment
22+
Preview at `http://localhost:3000`.
2823

29-
Using SSH:
30-
31-
```
32-
$ USE_SSH=true yarn deploy
33-
```
34-
35-
Not using SSH:
36-
37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
24+
## Publishing
4025

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
26+
Install the Mintlify GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to auto-deploy on push to the default branch.

0 commit comments

Comments
 (0)