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
57 changes: 57 additions & 0 deletions .github/workflows/deploy.live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Live Deployment Pipeline

on:
push:
branches:
- main

jobs:
build:
name: Build Application
runs-on: ubuntu-latest
environment:
name: live
url: https://docs.shortmesh.com
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: "latest"

- name: Build project
run: |
mdbook build

- name: Securely Copy Artifacts to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
source: "book/*"
target: ${{ secrets.BUILD_PATH }}
strip_components: 1
rm: false

- name: Execute Remote SSH Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e

echo "============================"
echo "🚀 Deploy Project ..."
echo "============================"
if ! ${{secrets.BUILD_CMD}}; then
echo "❌ Error deploying project!"
exit 1
fi
echo "==============================="
echo "✅ Deployment complete"
echo "==============================="
57 changes: 57 additions & 0 deletions .github/workflows/deploy.preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Preview Deployment Pipeline

on:
push:
branches:
- preview

jobs:
build:
name: Build Application
runs-on: ubuntu-latest
environment:
name: preview
url: https://preview-3.relaysms.afkanerd.de
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: "latest"

- name: Build project
run: |
mdbook build

- name: Securely Copy Artifacts to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
source: "book/*"
target: ${{ secrets.BUILD_PATH }}
strip_components: 1
rm: false

- name: Execute Remote SSH Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e

echo "============================"
echo "🚀 Deploy Project ..."
echo "============================"
if ! ${{secrets.BUILD_CMD}}; then
echo "❌ Error deploying project!"
exit 1
fi
echo "==============================="
echo "✅ Deployment complete"
echo "==============================="
21 changes: 18 additions & 3 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Documentation for possible options in this file is at
# https://rust-lang.github.io/mdBook/format/config.html
[book]
authors = ["Vanessa Christopher"]
title = "ShortMesh Documentation"
authors = ["ShortMesh Team"]
language = "en"
multilingual = false

# The directory that documentation files are stored in
src = "src"
title = "ShortMesh Documentation"

[output.html]
# The source code URL of the repository
git-repository-url = "https://github.com/shortmesh/documentation"

# Remove the numbers that appear before each item in the sidebar, as they can
# get quite messy as we nest deeper
no-section-label = true

# Additional HTML, JS, CSS that's injected into each page of the book.
# More information available in docs/website_files/README.md
additional-css = ["src/assets/css/base.css"]
11 changes: 10 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Summary

- [Chapter 1](./chapter_1.md)
# Introduction

- [Overview](./introduction/overview.md)

# Setup

- [Client](./setup/client.md)
- [Interface API](./setup/interface-api.md)
- [Authy](./setup/authy.md)
- [Builds](./setup/builds.md)
7 changes: 7 additions & 0 deletions src/assets/css/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Indents each chapter title in the left sidebar so that they aren't
* at the same level as the section headers.
*/
.chapter-item {
margin-left: 1em;
}
1 change: 0 additions & 1 deletion src/chapter_1.md

This file was deleted.

Binary file added src/img/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/introduction/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Overview

ShortMesh is a messaging API service built on the Matrix protocol, providing a unified interface for sending and receiving messages across social media platforms.

## Architecture

![ShortMesh Architecture](../img/architecture.png)

## Components

### <a href="https://github.com/shortmesh/Interface-API#interface-api" target="_blank" rel="noopener noreferrer">Interface API</a>

The Interface API is the public-facing REST API that enables third-party integrations with ShortMesh. It is designed with security, authentication, and session management as first-class concerns.

This layer serves two key purposes: it shields Matrix credentials from external exposure, and it abstracts away the location of the underlying Matrix Homeserver. This address would otherwise be visible if integrations were built directly into the [client](#a-hrefhttpsgithubcomshortmeshclientshortmesh-client-targetblank-relnoopener-noreferrerclienta).

### <a href="https://github.com/shortmesh/Client#shortmesh-client" target="_blank" rel="noopener noreferrer">Client</a>

The Client is a Matrix client built in Go using the Mautrix SDK, an implementation of the Matrix protocol specification. It provides the core protocol integration layer that powers ShortMesh's messaging capabilities.

## Integrations

### <a href="https://github.com/shortmesh/Authy-API#authy-api" target="_blank" rel="noopener noreferrer">Authy API</a>

Authy is an integration built on top of ShortMesh's Interface API. Its primary purpose is delivering authentication codes to users on demand, as an alternative to traditional SMS-based OTP delivery. By leveraging Matrix bridges, these codes can instead be sent to any supported third-party platform.

Authy handles the full authentication lifecycle: cryptographic code generation, session management, and code validation.

Developers integrate Authy into their applications through an embeddable <a href="https://github.com/shortmesh/Authy-API/blob/main/pkg/web/public/widget.js" target="_blank" rel="noopener noreferrer">JavaScript widget</a> (<a href="https://authy.shortmesh.com/demo/" target="_blank" rel="noopener noreferrer">demo</a>), similar in concept to Google OAuth buttons. When a user selects their preferred platform for receiving a one-time password (OTP), the widget triggers the Interface API, which instructs the Client to deliver the code through the appropriate channel.
Loading
Loading