Skip to content
Open
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
63 changes: 63 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Docs

on:
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs.yml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install root dependencies
run: pnpm install

- name: Install docs dependencies
run: pnpm --dir docs install

- name: Build docs
run: pnpm --dir docs docs:build

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
25 changes: 25 additions & 0 deletions docs-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# docs-site

This directory tracks the documentation site setup for GitHub Pages deployment.

## Source of truth

- Documentation content lives in `/docs`.
- VitePress configuration lives in `/docs/.vitepress/config.mjs`.
- CI/CD deployment is handled by `/.github/workflows/docs.yml`.

## Local commands

From repository root:

```bash
pnpm --dir docs install
pnpm --dir docs docs:dev
pnpm --dir docs docs:build
```

The production build output is generated at:

```text
docs/.vitepress/dist
```
9 changes: 9 additions & 0 deletions docs-site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "sorosave-docs-site",
"private": true,
"scripts": {
"dev": "pnpm --dir ../docs docs:dev",
"build": "pnpm --dir ../docs docs:build",
"preview": "pnpm --dir ../docs docs:preview"
}
}
6 changes: 5 additions & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ export default {
title: 'SoroSave SDK',
description: 'TypeScript SDK for SoroSave - Decentralized Group Savings Protocol on Soroban',
base: '/sdk/',
ignoreDeadLinks: true,
themeConfig: {
search: {
provider: 'local',
},
nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/getting-started' },
Expand Down Expand Up @@ -41,4 +45,4 @@ export default {
copyright: 'Copyright © 2026 SoroSave Protocol'
}
}
}
}
18 changes: 9 additions & 9 deletions docs/en/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Manages savings groups.

### Methods

#### create(options: CreateGroupOptions): Promise<Group>
#### `create(options: CreateGroupOptions): Promise<Group>`

Creates a new savings group.

Expand Down Expand Up @@ -77,7 +77,7 @@ const group = await sdk.groups.create({
});
```

#### join(groupId: string): Promise<void>
#### `join(groupId: string): Promise<void>`

Joins an existing group.

Expand All @@ -90,7 +90,7 @@ Joins an existing group.
await sdk.groups.join("group-123");
```

#### contribute(groupId: string, amount: number): Promise<Transaction>
#### `contribute(groupId: string, amount: number): Promise<Transaction>`

Makes a contribution to a group.

Expand All @@ -107,7 +107,7 @@ const tx = await sdk.groups.contribute("group-123", 100);
console.log('Transaction:', tx.hash);
```

#### get(groupId: string): Promise<Group>
#### `get(groupId: string): Promise<Group>`

Gets detailed information about a group.

Expand All @@ -123,7 +123,7 @@ const group = await sdk.groups.get("group-123");
console.log(group.name, group.totalSaved);
```

#### list(options?: ListOptions): Promise<Group[]>
#### `list(options?: ListOptions): Promise<Group[]>`

Lists available groups.

Expand All @@ -146,7 +146,7 @@ const groups = await sdk.groups.list({
});
```

#### leave(groupId: string): Promise<void>
#### `leave(groupId: string): Promise<void>`

Leaves a group.

Expand All @@ -165,7 +165,7 @@ Manages user account operations.

### Methods

#### getAccount(): Promise<Account>
#### `getAccount(): Promise<Account>`

Gets the current user's account information.

Expand All @@ -178,7 +178,7 @@ const account = await sdk.user.getAccount();
console.log(account.address, account.balance);
```

#### getGroups(): Promise<Group[]>
#### `getGroups(): Promise<Group[]>`

Gets all groups the user is a member of.

Expand All @@ -191,7 +191,7 @@ const myGroups = await sdk.user.getGroups();
myGroups.forEach(g => console.log(g.name));
```

#### getContributions(options?: ContributionOptions): Promise<Contribution[]>
#### `getContributions(options?: ContributionOptions): Promise<Contribution[]>`

Gets the user's contribution history.

Expand Down