Skip to content

Commit 4028607

Browse files
author
Developer
committed
docs: create mdBook documentation for S5 docs integration
Created complete mdBook documentation structure for integration into https://docs.sfive.net/ as Section 8: SDKs & Libraries. Documentation includes: - 13 files in s5-docs-sdk-js/ folder ready for Redsolver - 9 comprehensive SDK pages (installation, quick-start, path-api, media, advanced-cid, performance, utilities, encryption, api-reference) - book.toml configuration for mdBook - SUMMARY.md table of contents - Integration instructions in README.md Package naming: - Uses official @s5-dev/s5js throughout all examples - Includes beta testing note explaining current @julesl23/s5js@beta package - Future-proof for upstream merge Style matches S5 docs conventions: - Concise technical tone - TypeScript code examples - Tables for structured data - Progressive complexity (basic to advanced) Deliverable 2 (Documentation Site Update): Ready for submission
1 parent 8e80705 commit 4028607

File tree

15 files changed

+3391
-0
lines changed

15 files changed

+3391
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ docker-compose.override.yml
6868

6969
demos/media/baseline-performance.json
7070
demos/media/metadata-report.html
71+
tmp/

s5-docs-sdk-js/README.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Enhanced s5.js Documentation for S5 Docs Integration
2+
3+
This folder contains mdBook-formatted documentation for the Enhanced s5.js JavaScript/TypeScript SDK, ready to be integrated into the S5 documentation site at https://docs.sfive.net/.
4+
5+
## What's Included
6+
7+
- **Complete mdBook structure** with table of contents
8+
- **9 documentation pages** covering installation, tutorials, API guides, and reference
9+
- **Matching style** aligned with existing S5 documentation conventions
10+
- **Ready to integrate** as Section 8: "SDKs & Libraries"
11+
12+
## Integration Instructions
13+
14+
### Option 1: Direct Integration (Recommended)
15+
16+
1. Copy the `src/` folder contents into your S5 docs `src/` directory:
17+
```bash
18+
cp -r s5-docs-sdk-js/src/* /path/to/s5-docs/src/
19+
```
20+
21+
2. Update your main `SUMMARY.md` to add Section 8:
22+
```markdown
23+
# ... existing sections ...
24+
25+
# SDKs & Libraries
26+
27+
- [JavaScript/TypeScript (Enhanced s5.js)](./sdk/javascript/index.md)
28+
- [Installation & Setup](./sdk/javascript/installation.md)
29+
- [Quick Start](./sdk/javascript/quick-start.md)
30+
- [Path-based API Guide](./sdk/javascript/path-api.md)
31+
- [Media Processing](./sdk/javascript/media.md)
32+
- [Advanced CID API](./sdk/javascript/advanced-cid.md)
33+
- [Performance & Scaling](./sdk/javascript/performance.md)
34+
- [Directory Utilities](./sdk/javascript/utilities.md)
35+
- [Encryption](./sdk/javascript/encryption.md)
36+
- [API Reference](./sdk/javascript/api-reference.md)
37+
```
38+
39+
3. Rebuild the S5 documentation:
40+
```bash
41+
mdbook build
42+
```
43+
44+
### Option 2: Test Standalone First
45+
46+
To preview the SDK documentation independently:
47+
48+
1. Install mdBook if not already installed:
49+
```bash
50+
cargo install mdbook
51+
```
52+
53+
2. Build and serve locally:
54+
```bash
55+
cd s5-docs-sdk-js
56+
mdbook serve --open
57+
```
58+
59+
3. View at `http://localhost:3000`
60+
61+
## File Structure
62+
63+
```
64+
s5-docs-sdk-js/
65+
├── book.toml # mdBook configuration
66+
├── src/
67+
│ ├── SUMMARY.md # Table of contents
68+
│ ├── introduction.md # SDKs section intro
69+
│ └── sdk/
70+
│ └── javascript/
71+
│ ├── index.md # Overview
72+
│ ├── installation.md # Installation & Setup
73+
│ ├── quick-start.md # Quick Start Tutorial
74+
│ ├── path-api.md # Path-based API Guide
75+
│ ├── media.md # Media Processing
76+
│ ├── advanced-cid.md # Advanced CID API
77+
│ ├── performance.md # Performance & Scaling
78+
│ ├── utilities.md # Directory Utilities
79+
│ ├── encryption.md # Encryption
80+
│ └── api-reference.md # Complete API Reference
81+
└── README.md # This file
82+
```
83+
84+
## Style Conventions
85+
86+
The documentation follows S5 docs conventions:
87+
88+
- **Concise, technical tone** matching existing S5 documentation
89+
- **TypeScript code examples** with syntax highlighting
90+
- **Tables** for structured API information
91+
- **Blockquotes** for important notes and warnings
92+
- **Progressive complexity** from basic to advanced
93+
- **External links** to npm package and GitHub repository
94+
95+
## Content Source
96+
97+
Documentation is derived from:
98+
- `docs/API.md` (API specifications)
99+
- `demos/getting-started-tutorial.js` (working examples)
100+
- `docs/BENCHMARKS.md` (performance data)
101+
- Real-world usage patterns and best practices
102+
103+
## Package Information
104+
105+
- **npm**: [@s5-dev/s5js](https://www.npmjs.com/package/@s5-dev/s5js)
106+
- **GitHub**: [julesl23/s5.js](https://github.com/julesl23/s5.js)
107+
- **Version**: 0.9.0-beta.1
108+
- **License**: MIT OR Apache-2.0
109+
110+
## Questions?
111+
112+
For questions about the SDK or documentation:
113+
- GitHub Issues: https://github.com/julesl23/s5.js/issues
114+
- S5 Protocol Discord: https://discord.gg/s5protocol
115+
- Email: [contact info]
116+
117+
## Maintenance
118+
119+
This documentation should be kept in sync with Enhanced s5.js releases. For updates:
120+
1. Update the relevant markdown files in `src/sdk/javascript/`
121+
2. Rebuild the documentation with `mdbook build`
122+
3. Test changes locally before integration
123+
124+
---
125+
126+
**Ready to integrate!** Simply copy the contents and rebuild the S5 documentation site.

s5-docs-sdk-js/book.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[book]
2+
title = "S5 Documentation - JavaScript/TypeScript SDK"
3+
authors = ["s5-dev", "Jules Lai (julesl23)"]
4+
description = "Documentation for Enhanced s5.js - JavaScript/TypeScript SDK for S5 decentralized storage"
5+
language = "en"
6+
multilingual = false
7+
src = "src"
8+
9+
[build]
10+
build-dir = "book"
11+
create-missing = true
12+
13+
[preprocessor.links]
14+
15+
[output.html]
16+
mathjax-support = false
17+
copy-fonts = true
18+
no-section-label = false
19+
git-repository-url = "https://github.com/julesl23/s5.js"
20+
git-repository-icon = "fa-github"
21+
edit-url-template = "https://github.com/julesl23/s5.js/edit/main/docs/{path}"
22+
site-url = "/sdk/javascript/"
23+
cname = "docs.sfive.net"
24+
25+
[output.html.search]
26+
enable = true
27+
limit-results = 30
28+
teaser-word-count = 30
29+
use-boolean-and = true
30+
boost-title = 2
31+
boost-hierarchy = 1
32+
boost-paragraph = 1
33+
expand = true
34+
heading-split-level = 3
35+
36+
[output.html.playground]
37+
copyable = true
38+
copy-js = true
39+
line-numbers = false
40+
editable = false

s5-docs-sdk-js/src/SUMMARY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Summary
2+
3+
[Introduction](./introduction.md)
4+
5+
# SDKs & Libraries
6+
7+
- [JavaScript/TypeScript (Enhanced s5.js)](./sdk/javascript/index.md)
8+
- [Installation & Setup](./sdk/javascript/installation.md)
9+
- [Quick Start](./sdk/javascript/quick-start.md)
10+
- [Path-based API Guide](./sdk/javascript/path-api.md)
11+
- [Media Processing](./sdk/javascript/media.md)
12+
- [Advanced CID API](./sdk/javascript/advanced-cid.md)
13+
- [Performance & Scaling](./sdk/javascript/performance.md)
14+
- [Directory Utilities](./sdk/javascript/utilities.md)
15+
- [Encryption](./sdk/javascript/encryption.md)
16+
- [API Reference](./sdk/javascript/api-reference.md)

s5-docs-sdk-js/src/introduction.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SDKs & Libraries
2+
3+
This section provides documentation for official and community-supported SDKs that implement the S5 protocol specifications.
4+
5+
## Available SDKs
6+
7+
### JavaScript/TypeScript (Enhanced s5.js)
8+
9+
A comprehensive TypeScript SDK for building S5 applications in browsers and Node.js environments. Features path-based file operations, media processing, and efficient handling of large directories.
10+
11+
- **Platform**: Browser, Node.js 20+
12+
- **Language**: TypeScript/JavaScript
13+
- **Package**: [@s5-dev/s5js](https://www.npmjs.com/package/@s5-dev/s5js)
14+
- **Repository**: [github.com/julesl23/s5.js](https://github.com/julesl23/s5.js)
15+
- **Bundle Size**: 61 KB (brotli compressed)
16+
17+
[Get started →](./sdk/javascript/index.md)
18+
19+
## Future SDKs
20+
21+
The S5 community is working on SDKs for additional platforms:
22+
23+
- **Rust** - Native implementation (coming soon)
24+
- **Go** - Planned
25+
- **Python** - Planned
26+
- **Dart/Flutter** - Planned
27+
28+
Want to contribute an SDK? See the [S5 Protocol Specification](../specification/index.md) for implementation guidelines.

0 commit comments

Comments
 (0)