Archify Sync server, Dockerfile and Helm chart

Rust server (axum, yrs, sqlx/PostgreSQL): live shared models over the y-websocket protocol, versions, browser sign-in with PKCE, invites, single sign-on through OIDC, metrics. Docker image on distroless, compose file, and a Helm chart with one pod, optional bundled PostgreSQL and secrets from existing Secrets.
This commit is contained in:
Oleg Lukasonok committed 2026-11-06 12:06:59 +02:00
commit 99778d7489
67 files changed
+8362

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
$schema: 'https://moonrepo.dev/schemas/project.json'
id: protocol-ts
language: typescript
dependsOn: [protocol]
+10
View File
@@ -0,0 +1,10 @@
{
"name": "@archify/sync-protocol",
"version": "0.1.0",
"description": "Types shared by the Archify Sync server and the Archify Diagram Viewer extension, generated from Rust.",
"license": "MIT",
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"files": ["src"]
}
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { OrgRole } from "./OrgRole";
export type Account = { id: string, organisation_id: string, name: string, display_name: string, role: OrgRole, };
@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* Error body of every failed request.
*/
export type ApiError = {
/**
* Stable code for clients (`unauthorized`, `not_found`, `invalid`, `conflict`, …).
*/
error: string, message: string, };
@@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type CreateInviteRequest = {
/**
* Hours until the link stops working; the server's default when absent.
*/
expires_in_hours: number | null, max_uses: number | null, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type CreateSpaceRequest = { name: string, };
+11
View File
@@ -0,0 +1,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Invite = {
/**
* Shown once; the server keeps only its hash.
*/
token: string,
/**
* The link to send: opens the server's join page.
*/
url: string, expires_at: string, };
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Space } from "./Space";
export type JoinResponse = { space: Space, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type LogoutRequest = { refresh_token: string, };
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { SpaceRole } from "./SpaceRole";
export type Member = { account_id: string, name: string, display_name: string, role: SpaceRole, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type OrgRole = "admin" | "member";
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PublishRequest = { name: string, };
@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* `GET /v1/info`: what a client needs before signing in.
*/
export type ServerInfo = { name: string, version: string, protocol: number,
/**
* False until the first admin has used the first-start code.
*/
set_up: boolean, };
@@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* `POST /v1/setup`: the first admin, with the code the server printed on its first start.
*/
export type SetupRequest = { code: string, organisation: string, name: string, display_name: string | null, password: string, };
+4
View File
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { SpaceRole } from "./SpaceRole";
export type Space = { id: string, name: string, role: SpaceRole, created_at: string, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type SpaceRole = "owner" | "editor";
@@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* `POST /v1/auth/token`: the code from the browser sign-in, or a refresh token.
*/
export type TokenRequest = { "grant_type": "authorization_code", code: string, code_verifier: string, redirect_uri: string, } | { "grant_type": "refresh_token", refresh_token: string, };
@@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Account } from "./Account";
export type TokenResponse = { access_token: string,
/**
* Seconds until the access token expires.
*/
expires_in: bigint,
/**
* Single use: every refresh returns a new one, and reusing an old one signs the session out.
*/
refresh_token: string, account: Account, };
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { VersionKind } from "./VersionKind";
export type Version = { id: bigint, major: number, minor: number, kind: VersionKind, name: string | null, created_by: string | null, created_at: string,
/**
* For a restore: the version it restored.
*/
restored_from: bigint | null, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type VersionFile = { path: string, text: string, };
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Version } from "./Version";
import type { VersionFile } from "./VersionFile";
/**
* The model files of a version as text, for comparing and showing.
*/
export type VersionFiles = { version: Version, files: Array<VersionFile>, };
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type VersionKind = "snapshot" | "publish" | "restore";
+27
View File
@@ -0,0 +1,27 @@
// Generated types from crates/protocol; regenerate with `moon run protocol:types`.
/** Version of the wire protocol; sent as `?v=` on the WebSocket. */
export const PROTOCOL_VERSION = 1;
/** Root map of a space's Yjs document: model-root-relative POSIX path → Y.Text. */
export const FILES_MAP = 'files';
export type { Account } from './generated/Account';
export type { ApiError } from './generated/ApiError';
export type { CreateInviteRequest } from './generated/CreateInviteRequest';
export type { CreateSpaceRequest } from './generated/CreateSpaceRequest';
export type { Invite } from './generated/Invite';
export type { JoinResponse } from './generated/JoinResponse';
export type { LogoutRequest } from './generated/LogoutRequest';
export type { Member } from './generated/Member';
export type { OrgRole } from './generated/OrgRole';
export type { PublishRequest } from './generated/PublishRequest';
export type { ServerInfo } from './generated/ServerInfo';
export type { SetupRequest } from './generated/SetupRequest';
export type { Space } from './generated/Space';
export type { SpaceRole } from './generated/SpaceRole';
export type { TokenRequest } from './generated/TokenRequest';
export type { TokenResponse } from './generated/TokenResponse';
export type { Version } from './generated/Version';
export type { VersionFile } from './generated/VersionFile';
export type { VersionFiles } from './generated/VersionFiles';
export type { VersionKind } from './generated/VersionKind';