From 3545bf525fdaf328f2349a07bba7ef346a6256f6 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 22 Jul 2024 13:26:09 +0200 Subject: [PATCH] docs: :memo: Finish main page, add guides --- app/page.mdx | 22 +++++++++++++------- components/Guides.tsx | 17 ---------------- components/Resources.tsx | 43 ++++++++-------------------------------- 3 files changed, 23 insertions(+), 59 deletions(-) diff --git a/app/page.mdx b/app/page.mdx index b83d3f5..6b5ff98 100644 --- a/app/page.mdx +++ b/app/page.mdx @@ -3,15 +3,14 @@ import { Resources } from '@/components/Resources' import { HeroPattern } from '@/components/HeroPattern' export const metadata = { - title: 'Lysand Documentation', - description: - 'Introduction to the Lysand Protocol, a communication medium for federated applications, leveraging the HTTP stack.', + title: 'Lysand Documentation', + description: 'Introduction to the Lysand Protocol, a communication medium for federated applications, leveraging the HTTP stack.', } export const sections = [ - { title: 'Vocabulary', id: 'vocabulary' }, - { title: 'Guides', id: 'guides' }, - { title: 'Resources', id: 'resources' }, + { title: 'Vocabulary', id: 'vocabulary' }, + { title: 'Basic Concepts', id: 'basic-concepts' }, + { title: 'Resources', id: 'resources' }, ] @@ -42,6 +41,15 @@ The Lysand Protocol uses the following terms: - Using the same nomenclature, an ActivityPub Implementation would be `Mastodon`, and an Instance would be `mastodon.social`. - **Federation**: The process of exchanging data between two or more **Instances**. - +## Philosophy + +The Lysand Protocol is heavily inspired by the [ActivityPub](https://www.w3.org/TR/activitypub/) specification. It is designed to be simple and easy to implement, with a focus on the following concepts: +- **Simple Structures**: Entities are represented as JSON objects. No JSON-LD, no complex data structures, just plain JSON. +- **Modularity**: The protocol is divided into a **core protocol** and **extensions**. Implementations can choose to support only the core protocol or add extensions as needed. +- **Namespacing**: To avoid extension conflicts, all extensions are namespaced. +- **Signatures**: Most types of interactions **must** be signed with a private key. Unlike other protocols, signatures are **mandatory**, not optional. +- **Developer-Friendliness**: Understanding and implementing your own Lysand server should be easy. Documentation is aimed at developers first. + +{/* */} diff --git a/components/Guides.tsx b/components/Guides.tsx index 42fac2e..c4bb00f 100644 --- a/components/Guides.tsx +++ b/components/Guides.tsx @@ -7,23 +7,6 @@ const guides = [ name: "Authentication", description: "Learn how to authenticate your API requests.", }, - { - href: "/pagination", - name: "Pagination", - description: "Understand how to work with paginated responses.", - }, - { - href: "/errors", - name: "Errors", - description: - "Read about the different types of errors returned by the API.", - }, - { - href: "/webhooks", - name: "Webhooks", - description: - "Learn how to programmatically configure webhooks for your app.", - }, ]; export function Guides() { diff --git a/components/Resources.tsx b/components/Resources.tsx index b238d59..f5b1793 100644 --- a/components/Resources.tsx +++ b/components/Resources.tsx @@ -16,8 +16,6 @@ import type { import { GridPattern } from "./GridPattern"; import { Heading } from "./Heading"; import { ChatBubbleIcon } from "./icons/ChatBubbleIcon"; -import { EnvelopeIcon } from "./icons/EnvelopeIcon"; -import { UserIcon } from "./icons/UserIcon"; import { UsersIcon } from "./icons/UsersIcon"; interface Resource { @@ -33,11 +31,11 @@ interface Resource { const resources: Resource[] = [ { - href: "/contacts", - name: "Contacts", + href: "/entities", + name: "Entities", description: - "Learn about the contact model and how to create, retrieve, update, delete, and list contacts.", - icon: UserIcon, + "Learn how Entities work and how to use them to transmit federated data.", + icon: ChatBubbleIcon, pattern: { y: 16, squares: [ @@ -47,11 +45,11 @@ const resources: Resource[] = [ }, }, { - href: "/conversations", - name: "Conversations", + href: "/security", + name: "Security", description: - "Learn about the conversation model and how to create, retrieve, update, delete, and list conversations.", - icon: ChatBubbleIcon, + "Learn how to secure your Lysand implementation and protect your users' data.", + icon: UsersIcon, pattern: { y: -6, squares: [ @@ -60,31 +58,6 @@ const resources: Resource[] = [ ], }, }, - { - href: "/messages", - name: "Messages", - description: - "Learn about the message model and how to create, retrieve, update, delete, and list messages.", - icon: EnvelopeIcon, - pattern: { - y: 32, - squares: [ - [0, 2], - [1, 4], - ], - }, - }, - { - href: "/groups", - name: "Groups", - description: - "Learn about the group model and how to create, retrieve, update, delete, and list groups.", - icon: UsersIcon, - pattern: { - y: 22, - squares: [[0, 1]], - }, - }, ]; function ResourceIcon({ icon: Icon }: { icon: Resource["icon"] }) {