From e04c6e69448094f535b7d1f2d9a247f5200ab4ba Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Wed, 21 Aug 2024 14:01:03 +0200
Subject: [PATCH] Restructur and start dedicated pages for terminology and user
tutorials
---
docs/01-overview.md | 36 ++++++++
docs/01_getting-started/01_overview.md | 12 ---
docs/02-getting-started/01-tutorial.md | 86 +++++++++++++++++++
.../02-tech-overview.md} | 2 +-
.../03-setup.md} | 2 +-
.../04-making-clients.md} | 2 +-
.../_category_.json | 2 +-
docs/09-terminology.md | 4 +
docusaurus.config.js | 2 +-
src/pages/index.js | 2 +-
10 files changed, 132 insertions(+), 18 deletions(-)
create mode 100644 docs/01-overview.md
delete mode 100644 docs/01_getting-started/01_overview.md
create mode 100644 docs/02-getting-started/01-tutorial.md
rename docs/{01_getting-started/02_tech-overview.md => 02-getting-started/02-tech-overview.md} (98%)
rename docs/{01_getting-started/03_setup.md => 02-getting-started/03-setup.md} (99%)
rename docs/{01_getting-started/04_making-clients.md => 02-getting-started/04-making-clients.md} (98%)
rename docs/{01_getting-started => 02-getting-started}/_category_.json (68%)
create mode 100644 docs/09-terminology.md
diff --git a/docs/01-overview.md b/docs/01-overview.md
new file mode 100644
index 00000000..bdad3e95
--- /dev/null
+++ b/docs/01-overview.md
@@ -0,0 +1,36 @@
+---
+sidebar_position: 1
+---
+
+# Overview
+
+Stardust XR _(formerly known as Stardust)_ is an XR [display server](https://itsfoss.com/display-server) designed for Linux-based systems.
+Unlike traditional display servers that focus on 2D screens, Stardust XR introduces new conventions to utilize unbounded 3D space in virtual or real environments.
+
+## Priorities
+
+- **3D Environment Focus**: While supporting 2D clients through the Wayland protocol, Stardust XR primarily aims to create and manage 3D environments.
+
+- **Standard Interfaces**: Utilizes Wayland and OpenXR for 2D and XR app integration.
+
+- **Stardust Protocol**: Implements a special protocol for:
+ - Creating virtual objects
+ - Developing 3D UIs around 2D apps (Panel Shells)
+ - Handling data as Items that can represent files, Wayland surfaces, etc.
+
+- **Personal Device Interaction**: Focuses on individual user interactions rather than collaborative 3D spaces.
+
+- **Flexible Object Interaction**: Users can choose objects that best suit their current scenario, with easy setup for default configurations.
+
+## Architecture
+
+TODO: add some diagram of the core components needed and how they interface
+
+
+## Projects & Components
+
+- [**telescope**](https://github.com/StardustXR/telescope): bundle most used components to have a demo environment set up
+- ...
+
+
+
diff --git a/docs/01_getting-started/01_overview.md b/docs/01_getting-started/01_overview.md
deleted file mode 100644
index 24a9ae95..00000000
--- a/docs/01_getting-started/01_overview.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-sidebar_position: 1
----
-
-# Overview
-
-## Description
-Stardust XR (informally known as Stardust) is an XR display server for Linux-based distros (possibly most unix-based too, but untested). Unlike display servers of the past that were run on bounded 2D screens, Stardust has to break convention in order to account for unbounded 3D space in any potential virtual or real environment.
-
-Unlike many display servers, Stardust is not trying to reinvent how applications interface with the system. Stardust uses Wayland and will use OpenXR for 2D/XR app integration. Stardust however has a special protocol for creation of virtual objects such as 3D UIs around 2D apps (called Panel Shells) and handling of data as objects (called Items, can represent files or Wayland surfaces or such). Stardust is not a collaborative 3D space, instead focusing on your own personal device and interactions with it.
-
-Put simply, Stardust is a system UI base where multiple different clients (programs that connect to Stardust directly) can create objects for the user to interact with their apps and device. The user can choose to use the objects that work best for their current scenario, and default setups can easily be created so users start out with all the essentials.
\ No newline at end of file
diff --git a/docs/02-getting-started/01-tutorial.md b/docs/02-getting-started/01-tutorial.md
new file mode 100644
index 00000000..f1d9cc2f
--- /dev/null
+++ b/docs/02-getting-started/01-tutorial.md
@@ -0,0 +1,86 @@
+---
+sidebar_position: 1
+---
+
+# Tutorial
+
+## Setup OpenXR
+
+:::note
+if you have no headset or other OpenXR device, you can skip this step and start with [installing nix](#install-nix).
+:::
+
+### SteamVR
+
+#### Archlinux
+
+TODO
+
+#### NixOS
+
+TODO
+
+#### Others
+
+TODO: collect links for setup on different distrons
+
+### [Monado](https://monado.dev/)
+
+#### Archlinux
+
+TODO
+
+#### NixOS
+
+TODO
+
+#### Others
+
+TODO: collect links for setup on different distrons
+
+## Install nix
+
+For easy development and distribution this project uses the [nix package manager](https://nix.dev/).
+This allows to ensure all dependency requirements are met.
+
+:::info
+Make sure to have [flakes enabled](https://nixos.wiki/wiki/flakes).
+:::
+
+You can install nix on all common linux systems:
+
+#### Archlinux
+
+```shell
+# install git and nix
+sudo pacman -Sy git nix
+# enable flakes
+echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
+# enable nix daemon service
+sudo systemctl enable nix-daemon.service
+# add the current user to nix-users group
+sudo usermod -aG nix-users $(id -un)
+# reboot to apply user and service changes
+sudo systemctl reboot
+```
+
+#### NixOS
+
+TODO
+
+#### Others
+
+TODO: collect links for setup on different distrons
+
+## Run Demo
+
+1. clone https://github.com/StardustXR/telescope
+2. make sure your OpenXR device works (if 2D mode is not used)
+3. run `nix run .`
+
+## Run wayland client
+
+```shell
+# run demo.mp4 video in a loop within Stardust
+WAYLAND_DISPLAY=wayland-0 DISPLAY= mpv Downloads/demo.mp4 --loop
+```
diff --git a/docs/01_getting-started/02_tech-overview.md b/docs/02-getting-started/02-tech-overview.md
similarity index 98%
rename from docs/01_getting-started/02_tech-overview.md
rename to docs/02-getting-started/02-tech-overview.md
index 937c3c1c..5b2c0676 100644
--- a/docs/01_getting-started/02_tech-overview.md
+++ b/docs/02-getting-started/02-tech-overview.md
@@ -36,4 +36,4 @@ The Stardust XR IPC uses Unix domain sockets for communication and a protocol ba
The Stardust XR protocol is object-oriented, depending on a scenegraph on the server end and scenegraph or functionally equivalent structure on the client end. This allows easier implementation of the protocol while still remaining fast, reliable, and extensible.
## Clients
-The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps.
\ No newline at end of file
+The clients tell the server what models to draw, where they would like to accept input in, etc. Stardust clients are much more suited to widgets or user interfaces to 2D/XR apps.
diff --git a/docs/01_getting-started/03_setup.md b/docs/02-getting-started/03-setup.md
similarity index 99%
rename from docs/01_getting-started/03_setup.md
rename to docs/02-getting-started/03-setup.md
index 118347ca..547244a0 100644
--- a/docs/01_getting-started/03_setup.md
+++ b/docs/02-getting-started/03-setup.md
@@ -14,4 +14,4 @@ Non-exhaustive list of clients:

- [Gravity](https://github.com/StardustXR/gravity): Command line tool to launch programs inside of stardust at a particular offset in space. This is nestable so you can run a script using gravity, and then gravity inside that script to make a whole composed setup out of thin air! It also ensures that everything launched through it will properly connect to the stardust server, such as wayland clients.
- [Protostar](https://github.com/StardustXR/protostar): Prototype app launcher library/examples. Grab app icons and drop them in space to launch apps where they're dropped.
-- [Magnetar](https://github.com/StardustXR/magnetar): Workspaces in 3D. Any object inside the rings will move with them, so you can move a bunch of stuff out of the way temporarily when you don't need it.
\ No newline at end of file
+- [Magnetar](https://github.com/StardustXR/magnetar): Workspaces in 3D. Any object inside the rings will move with them, so you can move a bunch of stuff out of the way temporarily when you don't need it.
diff --git a/docs/01_getting-started/04_making-clients.md b/docs/02-getting-started/04-making-clients.md
similarity index 98%
rename from docs/01_getting-started/04_making-clients.md
rename to docs/02-getting-started/04-making-clients.md
index 84bc3906..f688cf69 100644
--- a/docs/01_getting-started/04_making-clients.md
+++ b/docs/02-getting-started/04-making-clients.md
@@ -26,4 +26,4 @@ and include the `stardust-xr-fusion` dependency in your `cargo.toml`. Documentat
## Molecules
-`stardust-xr-molecules` is an even higher level widget library built on Fusion similar to [MRTK](https://github.com/microsoft/MixedRealityToolkit-Unity) to get your clients up and running faster. Documentation will be available at https://docs.rs/crate/stardust-xr-molecules/latest.
\ No newline at end of file
+`stardust-xr-molecules` is an even higher level widget library built on Fusion similar to [MRTK](https://github.com/microsoft/MixedRealityToolkit-Unity) to get your clients up and running faster. Documentation will be available at https://docs.rs/crate/stardust-xr-molecules/latest.
diff --git a/docs/01_getting-started/_category_.json b/docs/02-getting-started/_category_.json
similarity index 68%
rename from docs/01_getting-started/_category_.json
rename to docs/02-getting-started/_category_.json
index 84c7320c..62073edc 100644
--- a/docs/01_getting-started/_category_.json
+++ b/docs/02-getting-started/_category_.json
@@ -1,4 +1,4 @@
{
"label": "Getting Started",
- "position": 1
+ "position": 2
}
diff --git a/docs/09-terminology.md b/docs/09-terminology.md
new file mode 100644
index 00000000..eb017a78
--- /dev/null
+++ b/docs/09-terminology.md
@@ -0,0 +1,4 @@
+# Glossary
+
+- **Item**:
+- **Panel Shells**: 3D UIs around 2D apps
diff --git a/docusaurus.config.js b/docusaurus.config.js
index f0f72c3f..db5111c9 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -76,7 +76,7 @@ module.exports = {
},
{
label: 'Getting Started',
- to: '/docs/getting-started/overview',
+ to: '/docs/getting-started/tutorial',
},
],
},
diff --git a/src/pages/index.js b/src/pages/index.js
index 0481414b..7d30f672 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -19,7 +19,7 @@ function HomepageHeader() {