From ab892d7453bc4834d10214d9502c3a6d2264f5a0 Mon Sep 17 00:00:00 2001 From: core Date: Tue, 15 Aug 2023 00:16:47 -0400 Subject: [PATCH] hotfix: configurable threadpool size & new website starts --- Cargo.lock | 2 +- trifid-api/config.example.toml | 5 + trifid-api/src/config.rs | 4 + trifid-api/src/main.rs | 9 +- website/docs/.gitignore | 1 + website/docs/book.toml | 16 + website/docs/src/SUMMARY.md | 49 ++ website/docs/src/index.md | 19 + website/docs/src/tfcli/index.md | 1 + website/docs/src/tfcli/install/index.md | 1 + website/docs/src/tfcli/install/macos.md | 1 + website/docs/src/tfcli/install/windows.md | 1 + website/docs/src/tfclient/index.md | 7 + website/docs/src/tfclient/install/index.md | 5 + website/docs/src/tfclient/install/linux.md | 97 +++ website/docs/src/tfclient/install/macos.md | 1 + website/docs/src/tfclient/install/netbsd.md | 1 + website/docs/src/tfclient/install/windows.md | 1 + website/docs/src/tfclient/platform_support.md | 22 + website/docs/src/tfclient/untested_os.md | 13 + website/docs/src/tfclient/usage.md | 1 + website/docs/src/tfclient/why_not_this_os.md | 1 + website/docs/src/trifid-api/client_setup.md | 1 + website/docs/src/trifid-api/config.md | 1 + website/docs/src/trifid-api/guide/config.md | 1 + website/docs/src/trifid-api/guide/database.md | 1 + website/docs/src/trifid-api/guide/enroll.md | 1 + website/docs/src/trifid-api/guide/firstorg.md | 1 + website/docs/src/trifid-api/guide/index.md | 1 + .../docs/src/trifid-api/guide/installing.md | 1 + website/docs/src/trifid-api/guide/tfcli.md | 1 + website/docs/src/trifid-api/index.md | 1 + website/docs/src/trifid-api/install/docker.md | 1 + website/docs/src/trifid-api/install/index.md | 1 + website/docs/src/trifid-api/install/linux.md | 1 + website/docs/src/trifid-api/install/macos.md | 1 + .../docs/src/trifid-api/install/windows.md | 1 + .../docs/src/trifid-api/supported_clients.md | 1 + .../docs/src/trifid-api/troubleshooting.md | 1 + .../docs/src/trifid-api/users/client_setup.md | 1 + website/docs/src/trifid-api/users/index.md | 1 + website/docs/src/trifid-api/users/mobile.md | 1 + .../src/trifid-api/users/supported_clients.md | 1 + website/docs/theme/catppuccin-highlight.css | 607 ++++++++++++++++++ website/docs/theme/catppuccin.css | 123 ++++ website/docs/theme/index.hbs | 318 +++++++++ 46 files changed, 1322 insertions(+), 5 deletions(-) create mode 100644 website/docs/.gitignore create mode 100644 website/docs/book.toml create mode 100644 website/docs/src/SUMMARY.md create mode 100644 website/docs/src/index.md create mode 100644 website/docs/src/tfcli/index.md create mode 100644 website/docs/src/tfcli/install/index.md create mode 100644 website/docs/src/tfcli/install/macos.md create mode 100644 website/docs/src/tfcli/install/windows.md create mode 100644 website/docs/src/tfclient/index.md create mode 100644 website/docs/src/tfclient/install/index.md create mode 100644 website/docs/src/tfclient/install/linux.md create mode 100644 website/docs/src/tfclient/install/macos.md create mode 100644 website/docs/src/tfclient/install/netbsd.md create mode 100644 website/docs/src/tfclient/install/windows.md create mode 100644 website/docs/src/tfclient/platform_support.md create mode 100644 website/docs/src/tfclient/untested_os.md create mode 100644 website/docs/src/tfclient/usage.md create mode 100644 website/docs/src/tfclient/why_not_this_os.md create mode 100644 website/docs/src/trifid-api/client_setup.md create mode 100644 website/docs/src/trifid-api/config.md create mode 100644 website/docs/src/trifid-api/guide/config.md create mode 100644 website/docs/src/trifid-api/guide/database.md create mode 100644 website/docs/src/trifid-api/guide/enroll.md create mode 100644 website/docs/src/trifid-api/guide/firstorg.md create mode 100644 website/docs/src/trifid-api/guide/index.md create mode 100644 website/docs/src/trifid-api/guide/installing.md create mode 100644 website/docs/src/trifid-api/guide/tfcli.md create mode 100644 website/docs/src/trifid-api/index.md create mode 100644 website/docs/src/trifid-api/install/docker.md create mode 100644 website/docs/src/trifid-api/install/index.md create mode 100644 website/docs/src/trifid-api/install/linux.md create mode 100644 website/docs/src/trifid-api/install/macos.md create mode 100644 website/docs/src/trifid-api/install/windows.md create mode 100644 website/docs/src/trifid-api/supported_clients.md create mode 100644 website/docs/src/trifid-api/troubleshooting.md create mode 100644 website/docs/src/trifid-api/users/client_setup.md create mode 100644 website/docs/src/trifid-api/users/index.md create mode 100644 website/docs/src/trifid-api/users/mobile.md create mode 100644 website/docs/src/trifid-api/users/supported_clients.md create mode 100644 website/docs/theme/catppuccin-highlight.css create mode 100644 website/docs/theme/catppuccin.css create mode 100644 website/docs/theme/index.hbs diff --git a/Cargo.lock b/Cargo.lock index 79de187..15eed1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3940,7 +3940,7 @@ dependencies = [ [[package]] name = "trifid_api_entities" -version = "0.1.0" +version = "0.1.1" dependencies = [ "sea-orm", ] diff --git a/trifid-api/config.example.toml b/trifid-api/config.example.toml index 8073dd1..c892cde 100644 --- a/trifid-api/config.example.toml +++ b/trifid-api/config.example.toml @@ -78,6 +78,11 @@ url = "your-database-url-here" # SocketAddr. Optional. Default = 0.0.0.0:8080 (all IPs, port 8080) # bind = "0.0.0.0:8080" +# The number of worker threads to create. +# Increase this number if your server is timing out requests. +# usize. Optional. Default = 32 +# workers = 32 + #### [tokens] #### # Configure options related to the various tokens that may be issued by the trifid-api server. [tokens] diff --git a/trifid-api/src/config.rs b/trifid-api/src/config.rs index f0fddb5..082c878 100644 --- a/trifid-api/src/config.rs +++ b/trifid-api/src/config.rs @@ -76,6 +76,8 @@ pub struct TrifidConfigDatabase { pub struct TrifidConfigServer { #[serde(default = "socketaddr_8080")] pub bind: SocketAddr, + #[serde(default = "default_workers")] + pub workers: usize } #[derive(Serialize, Deserialize, Debug)] @@ -730,3 +732,5 @@ fn none() -> Option { fn is_none(o: &Option) -> bool { o.is_none() } + +fn default_workers() -> usize { 32 } \ No newline at end of file diff --git a/trifid-api/src/main.rs b/trifid-api/src/main.rs index cba8b64..5996afd 100644 --- a/trifid-api/src/main.rs +++ b/trifid-api/src/main.rs @@ -88,7 +88,7 @@ async fn main() -> Result<(), Box> { errors: vec![api_error], }), ) - .into() + .into() }), ) .wrap(RequestIdentifier::with_generator(random_id_no_id)) @@ -121,9 +121,10 @@ async fn main() -> Result<(), Box> { .service(routes::v1::hosts::get_host_overrides) .service(routes::v1::hosts::update_host_overrides) }) - .bind(CONFIG.server.bind)? - .run() - .await?; + .workers(CONFIG.server.workers) + .bind(CONFIG.server.bind)? + .run() + .await?; Ok(()) } diff --git a/website/docs/.gitignore b/website/docs/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/website/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/website/docs/book.toml b/website/docs/book.toml new file mode 100644 index 0000000..9b4a615 --- /dev/null +++ b/website/docs/book.toml @@ -0,0 +1,16 @@ +[book] +authors = ["core"] +language = "en" +multilingual = false +src = "src" +title = "Trifid Documentation" + +[preprocessor] + +[preprocessor.catppuccin] +assets_version = "0.2.1" # DO NOT EDIT: Managed by `mdbook-catppuccin install` + +[output] + +[output.html] +additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-highlight.css"] diff --git a/website/docs/src/SUMMARY.md b/website/docs/src/SUMMARY.md new file mode 100644 index 0000000..8d98497 --- /dev/null +++ b/website/docs/src/SUMMARY.md @@ -0,0 +1,49 @@ +# Summary + +[Introduction](./index.md) + +# tfclient User's Guide + +- [About tfclient](./tfclient/index.md) +- [Platform Support](./tfclient/platform_support.md) + - [Why can't tfclient support XXXX?](./tfclient/why_not_this_os.md) + - [Testing tfclient on new platforms](./tfclient/untested_os.md) +- [Installation](./tfclient/install/index.md) + - [Windows](./tfclient/install/windows.md) + - [macOS](./tfclient/install/macos.md) + - [Linux](./tfclient/install/linux.md) + - [NetBSD](./tfclient/install/netbsd.md) +- [Usage](./tfclient/usage.md) + +# trifid-api User's Guide + +- [About trifid-api (for users)](./trifid-api/users/index.md) +- [Supported Clients/Platforms](./trifid-api/users/supported_clients.md) +- [How to configure your client](./trifid-api/users/client_setup.md) + - [Why doesn't trifid support mobile devices?](./trifid-api/users/mobile.md) + +# trifid-api Administrator's Guide + +- [About trifid-api](./trifid-api/index.md) +- [Installation](./trifid-api/install/index.md) + - [Windows](./trifid-api/install/windows.md) + - [macOS](./trifid-api/install/macos.md) + - [Linux](./trifid-api/install/linux.md) + - [Docker](./trifid-api/install/docker.md) +- [Setup Guide](./trifid-api/guide/index.md) + - [Installing trifid-api](./trifid-api/guide/installing.md) + - [Setting up your database](./trifid-api/guide/database.md) + - [Installing tfcli](./trifid-api/guide/tfcli.md) + - [Configuring trifid-api](./trifid-api/guide/config.md) + - [Creating an organization](./trifid-api/guide/firstorg.md) + - [Enrolling a lighthouse](./trifid-api/guide/enroll.md) +- [Troubleshooting](./trifid-api/troubleshooting.md) +- [Config Reference](./trifid-api/config.md) + +# tfcli User's Guide + +- [About tfcli](./tfcli/index.md) +- [Installation](./tfcli/install/index.md) + - [Windows](./tfcli/install/windows.md) + - [macOS](./tfcli/install/macos.md) + - [Linux](./tfclient/install/linux.md) diff --git a/website/docs/src/index.md b/website/docs/src/index.md new file mode 100644 index 0000000..9767ade --- /dev/null +++ b/website/docs/src/index.md @@ -0,0 +1,19 @@ +# Introduction + +**trifid** is a complete open-source reimplementation of the [Defined Networking](https://defined.net) management protocol for [Nebula](https://github.com/slackhq/nebula) networks. + +It makes it easy to run a completley self-hosted mesh VPN with very little effort. + +In addition to the API server reimplementation and custom client, we include a command-line tool for interacting with the [Management API](https://docs.defined.net), fully compatible with the upstream API or any custom API server like trifid. + +We also include a Rust library for interacting with keys and certificates in the Nebula PKI. Find it on crates.rs as trifid-pki. This library is an implementation of the Nebula PKI system that is mostly feature-complete, with the exception of non-Curve25519 cryptography, which is currently unsupported. + +This set of pages contains complete documentation on how to use the various parts of the trifid project, with the exception of the library crates, `dnapi-rs` and `trifid-pki`, as those are self-documented Rust libraries with good documentation available through docs.rs. + +If you are looking for documentation on **tfclient**, the trifid implementation of dnclient, see [it's documentation index](./tfclient/index.md). + +If you are a *user* on a trifid-api instance (you are part of an organization on the instance), see [the trifid-api user guide](./trifid-api/users/index.md). + +If you are an administrator on a trifid-api instance or are looking to set one up, see [the trifid-api administrator guide](./trifid-api/index.md). + +If you are looking for documentation on **tfcli**, the management CLI, see [it's documentation index](./tfcli/index.md). diff --git a/website/docs/src/tfcli/index.md b/website/docs/src/tfcli/index.md new file mode 100644 index 0000000..642ba4b --- /dev/null +++ b/website/docs/src/tfcli/index.md @@ -0,0 +1 @@ +# About tfcli diff --git a/website/docs/src/tfcli/install/index.md b/website/docs/src/tfcli/install/index.md new file mode 100644 index 0000000..25267fe --- /dev/null +++ b/website/docs/src/tfcli/install/index.md @@ -0,0 +1 @@ +# Installation diff --git a/website/docs/src/tfcli/install/macos.md b/website/docs/src/tfcli/install/macos.md new file mode 100644 index 0000000..b8d96de --- /dev/null +++ b/website/docs/src/tfcli/install/macos.md @@ -0,0 +1 @@ +# macOS diff --git a/website/docs/src/tfcli/install/windows.md b/website/docs/src/tfcli/install/windows.md new file mode 100644 index 0000000..af6fdce --- /dev/null +++ b/website/docs/src/tfcli/install/windows.md @@ -0,0 +1 @@ +# Windows diff --git a/website/docs/src/tfclient/index.md b/website/docs/src/tfclient/index.md new file mode 100644 index 0000000..565ad75 --- /dev/null +++ b/website/docs/src/tfclient/index.md @@ -0,0 +1,7 @@ +# About tfclient + +**tfclient** is an open-source VPN client for the Defined Networking management protocol. It is built around the Nebula mesh vpn originally created by Slack, and now maintained by Defined Networking. + +tfclient is written in Rust, and can run on most platforms. For more information on platform support, see [Platform Support](./platform_support.md). + +To learn how to install or use tfclient, visit the respective pages for [Installation](./install/index.md) or [Usage](./usage.md). diff --git a/website/docs/src/tfclient/install/index.md b/website/docs/src/tfclient/install/index.md new file mode 100644 index 0000000..c3deab2 --- /dev/null +++ b/website/docs/src/tfclient/install/index.md @@ -0,0 +1,5 @@ +# Installation + +For now, tfclient needs to be compiled from source. Packaged binaries are planned but will come later as the project matures. + +Please refer to the relavent page for your system in the sidebar for instructions on how to compile and install tfclient. diff --git a/website/docs/src/tfclient/install/linux.md b/website/docs/src/tfclient/install/linux.md new file mode 100644 index 0000000..3f730ef --- /dev/null +++ b/website/docs/src/tfclient/install/linux.md @@ -0,0 +1,97 @@ +# Linux Installation + +## 1. Set up your compiler toolchain + +In order to compile tfclient, you will need a functional Rust compiler and a functional C compiler suite. You will also need a copy of the `git` command-line tools. + +If you don't have Rust installed, we highly recommend you use `rustup`: + +``` +curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +Follow the instructions on-screen. + +Before continuing, ensure you have a Rust compiler: + +``` +$ cargo -V +``` + +This command should display `cargo`'s version. If it does not, ensure Rust is installed properly. + +You will also need a functioning Go compiler, with CGo support, and `libclang` installed. + +Ensure you have: +- a functioning Rust compiler +- a functioning Go compiler, with CGo support +- libclang installed + +## 2. Acquire a copy of the tfclient source code + +First, determine the most recent release of tfclient. Visit [the refs page](https://git.e3t.cc/~core/trifid/refs), and find the most recent tfclient release. + +For example, if you see `tfclient-v0.2.3`, the latest version of tfclient is `0.2.3`. + +Next, download the tfclient source code: + +``` +$ git clone https://git.e3t.cc/~core/trifid --depth 0 -b [desired tfclient version] +$ cd tfclient +``` + +## 3. Compile tfclient + +Finally, compile the tfclient binary with: + +``` +$ cargo build --release --bin tfclient +``` + +This can take a very long time depending on your computer specs, and requires an internet connection. + +## 4. Install tfclient system-wide + +Once the build finishes, the resulting binary will be `target/release/tfclient`. Copy this to a location in the system PATH, such as `/bin` or `/usr/bin`. + +## (Optional) 5. Create a system service + +The following section assumes you have installed tfclient to `/usr/bin/tfclient`, and you wish to use the upstream DN API, `https://api.defined.net`. You will need to change these values in the + +This will vary depending on your system. See the below sections for examples. + +### SystemD + +``` +[Unit] +Description=A client for Defined Networking mesh networks +Wants=basic.target network.target +After=basic.target network.target network-online.target + +[Service] +SyslogIdentifier=tfclient +ExecStart=/usr/bin/tfclient run --server https://api.defined.net --name tfclient +Restart=always + +[Install] +WantedBy=multi-user.target +``` + +Place this file in `/usr/lib/systemd/system/tfclient.service`, and start and enable it with `systemctl enable --now tfclient`. + +### runit + +Create a new folder named `tfclient` in your service directory. For example, on Void Linux, this is `/etc/sv/`. + +Create a new **executable** file named `run` in this directory (Void Linux Example: `/etc/sv/tfclient/run`), with the following contents: + +``` +#!/bin/bash +exec 2>&1 /usr/bin/tfclient --server https://api.defined.net --name tfclient > /var/log/tfclient.log +``` + +Link the service folder to the runsvdir. For Void Linux, this is `/var/service`: + +``` +$ ln -s /etc/sv/tfclient /var/service/ +``` diff --git a/website/docs/src/tfclient/install/macos.md b/website/docs/src/tfclient/install/macos.md new file mode 100644 index 0000000..b8d96de --- /dev/null +++ b/website/docs/src/tfclient/install/macos.md @@ -0,0 +1 @@ +# macOS diff --git a/website/docs/src/tfclient/install/netbsd.md b/website/docs/src/tfclient/install/netbsd.md new file mode 100644 index 0000000..979947f --- /dev/null +++ b/website/docs/src/tfclient/install/netbsd.md @@ -0,0 +1 @@ +# NetBSD diff --git a/website/docs/src/tfclient/install/windows.md b/website/docs/src/tfclient/install/windows.md new file mode 100644 index 0000000..af6fdce --- /dev/null +++ b/website/docs/src/tfclient/install/windows.md @@ -0,0 +1 @@ +# Windows diff --git a/website/docs/src/tfclient/platform_support.md b/website/docs/src/tfclient/platform_support.md new file mode 100644 index 0000000..737e7b1 --- /dev/null +++ b/website/docs/src/tfclient/platform_support.md @@ -0,0 +1,22 @@ +# Platform Support + +tfclient is supported on most platforms. tfclient is broken up into two "support tiers": + +- 'Tier 1' platforms have full support, including linking to and managing the nebula binary. No extra work is required on these platforms - just install tfclient and run! +- 'Tier 2' platforms cannot link to the nebula-ffi CGo binary due to platform limitations. On these platforms, tfclient must be compiled in Tier 2 mode, and the user is responsible for managing the Nebula binary and ensuring it points to the tfclient-managed config file. Documentation on how to use tfclient on Tier 2 platforms can be found [here](docs/tfclient/tier-2-building.md) + +| Operating System / Architecture | tfclient support tier | +|---------------------------------|---------------------------------------| +| Windows (all architectures ) | Tier 2 | +| Darwin (OSX, macOS) | Tier 2 - [untested](./untested_os.md) | +| FreeBSD (amd64) | Tier 1 - [untested](./untested_os.md) | +| NetBSD | Tier 2 | +| Linux | Tier 1 | + +On platforms marked 'untested', the trifid maintainers were unable to test tfclient on that platform. Help is wanted to test tfclient on as many platforms as possible! + +tfclient should work on most platforms, but the authors of tfclient don't have every device and OS combo in the world. + +If you are willing to run untested software on your machine to contribute to trifid, consider testing tfclient on your device and [reporting your findings back to us](https://lists.e3t.cc/~core/trifid-devel). This is super helpful to us and helps us maintain trifid for more platforms when we have users willing to test the latest versions and report bugs to us. If you are interested, please see [this page](./untested_os.md). + +Unfortunately, [tfclient won't work everywhere](./why_not_this_os.md). See [here](./why_not_this_os.md) for details. diff --git a/website/docs/src/tfclient/untested_os.md b/website/docs/src/tfclient/untested_os.md new file mode 100644 index 0000000..df1ade3 --- /dev/null +++ b/website/docs/src/tfclient/untested_os.md @@ -0,0 +1,13 @@ +# Help us out - test tfclient on new platforms + +There are [lots](index.md#where-does-trifid-work) of operating systems in which `tfclient` *should* work, but due to a lack of devices, it cannot be tested. If you have a system running one of these devices and want to help out the project, please test tfclient for functionality on your device! + +| **Notice**: While tfclient is almost always perfectly safe, there are always risks to running untested software on production machines. Be careful out there! | +|---------------------------------------------------------------------------------------------------------------------------------------------------------------| + +If you aren't able to get tfclient to compile with nebula-ffi, consider trying it as a [Tier 2 platform](docs/tfclient/tier-2-building.md). Documentation on how to do this can be found [here](docs/tfclient/tier-2-building.md). + +Any findings, positive or negative, can be posted straight to [trifid-devel](https://lists.e3t.cc/~core/trifid-devel). + +Thanks! We really appreciate it. + diff --git a/website/docs/src/tfclient/usage.md b/website/docs/src/tfclient/usage.md new file mode 100644 index 0000000..8f04b05 --- /dev/null +++ b/website/docs/src/tfclient/usage.md @@ -0,0 +1 @@ +# Usage diff --git a/website/docs/src/tfclient/why_not_this_os.md b/website/docs/src/tfclient/why_not_this_os.md new file mode 100644 index 0000000..795b714 --- /dev/null +++ b/website/docs/src/tfclient/why_not_this_os.md @@ -0,0 +1 @@ +# Why can't tfclient support XXXX? diff --git a/website/docs/src/trifid-api/client_setup.md b/website/docs/src/trifid-api/client_setup.md new file mode 100644 index 0000000..b246980 --- /dev/null +++ b/website/docs/src/trifid-api/client_setup.md @@ -0,0 +1 @@ +# How to configure your client diff --git a/website/docs/src/trifid-api/config.md b/website/docs/src/trifid-api/config.md new file mode 100644 index 0000000..04edf22 --- /dev/null +++ b/website/docs/src/trifid-api/config.md @@ -0,0 +1 @@ +# Config Reference diff --git a/website/docs/src/trifid-api/guide/config.md b/website/docs/src/trifid-api/guide/config.md new file mode 100644 index 0000000..49c2118 --- /dev/null +++ b/website/docs/src/trifid-api/guide/config.md @@ -0,0 +1 @@ +# Configuring trifid-api diff --git a/website/docs/src/trifid-api/guide/database.md b/website/docs/src/trifid-api/guide/database.md new file mode 100644 index 0000000..deeaef7 --- /dev/null +++ b/website/docs/src/trifid-api/guide/database.md @@ -0,0 +1 @@ +# Setting up your database diff --git a/website/docs/src/trifid-api/guide/enroll.md b/website/docs/src/trifid-api/guide/enroll.md new file mode 100644 index 0000000..bd3ec1e --- /dev/null +++ b/website/docs/src/trifid-api/guide/enroll.md @@ -0,0 +1 @@ +# Enrolling a lighthouse diff --git a/website/docs/src/trifid-api/guide/firstorg.md b/website/docs/src/trifid-api/guide/firstorg.md new file mode 100644 index 0000000..adc813c --- /dev/null +++ b/website/docs/src/trifid-api/guide/firstorg.md @@ -0,0 +1 @@ +# Creating an organization diff --git a/website/docs/src/trifid-api/guide/index.md b/website/docs/src/trifid-api/guide/index.md new file mode 100644 index 0000000..8248fff --- /dev/null +++ b/website/docs/src/trifid-api/guide/index.md @@ -0,0 +1 @@ +# Setup Guide diff --git a/website/docs/src/trifid-api/guide/installing.md b/website/docs/src/trifid-api/guide/installing.md new file mode 100644 index 0000000..9dfe995 --- /dev/null +++ b/website/docs/src/trifid-api/guide/installing.md @@ -0,0 +1 @@ +# Installing trifid-api diff --git a/website/docs/src/trifid-api/guide/tfcli.md b/website/docs/src/trifid-api/guide/tfcli.md new file mode 100644 index 0000000..75ba8e5 --- /dev/null +++ b/website/docs/src/trifid-api/guide/tfcli.md @@ -0,0 +1 @@ +# Installing tfcli diff --git a/website/docs/src/trifid-api/index.md b/website/docs/src/trifid-api/index.md new file mode 100644 index 0000000..3f471ce --- /dev/null +++ b/website/docs/src/trifid-api/index.md @@ -0,0 +1 @@ +# About trifid-api diff --git a/website/docs/src/trifid-api/install/docker.md b/website/docs/src/trifid-api/install/docker.md new file mode 100644 index 0000000..c597eaa --- /dev/null +++ b/website/docs/src/trifid-api/install/docker.md @@ -0,0 +1 @@ +# Docker diff --git a/website/docs/src/trifid-api/install/index.md b/website/docs/src/trifid-api/install/index.md new file mode 100644 index 0000000..25267fe --- /dev/null +++ b/website/docs/src/trifid-api/install/index.md @@ -0,0 +1 @@ +# Installation diff --git a/website/docs/src/trifid-api/install/linux.md b/website/docs/src/trifid-api/install/linux.md new file mode 100644 index 0000000..f560039 --- /dev/null +++ b/website/docs/src/trifid-api/install/linux.md @@ -0,0 +1 @@ +# Linux diff --git a/website/docs/src/trifid-api/install/macos.md b/website/docs/src/trifid-api/install/macos.md new file mode 100644 index 0000000..b8d96de --- /dev/null +++ b/website/docs/src/trifid-api/install/macos.md @@ -0,0 +1 @@ +# macOS diff --git a/website/docs/src/trifid-api/install/windows.md b/website/docs/src/trifid-api/install/windows.md new file mode 100644 index 0000000..af6fdce --- /dev/null +++ b/website/docs/src/trifid-api/install/windows.md @@ -0,0 +1 @@ +# Windows diff --git a/website/docs/src/trifid-api/supported_clients.md b/website/docs/src/trifid-api/supported_clients.md new file mode 100644 index 0000000..b762820 --- /dev/null +++ b/website/docs/src/trifid-api/supported_clients.md @@ -0,0 +1 @@ +# Supported Clients/Platforms diff --git a/website/docs/src/trifid-api/troubleshooting.md b/website/docs/src/trifid-api/troubleshooting.md new file mode 100644 index 0000000..4f34127 --- /dev/null +++ b/website/docs/src/trifid-api/troubleshooting.md @@ -0,0 +1 @@ +# Troubleshooting diff --git a/website/docs/src/trifid-api/users/client_setup.md b/website/docs/src/trifid-api/users/client_setup.md new file mode 100644 index 0000000..b246980 --- /dev/null +++ b/website/docs/src/trifid-api/users/client_setup.md @@ -0,0 +1 @@ +# How to configure your client diff --git a/website/docs/src/trifid-api/users/index.md b/website/docs/src/trifid-api/users/index.md new file mode 100644 index 0000000..04cd363 --- /dev/null +++ b/website/docs/src/trifid-api/users/index.md @@ -0,0 +1 @@ +# About trifid-api (for users) diff --git a/website/docs/src/trifid-api/users/mobile.md b/website/docs/src/trifid-api/users/mobile.md new file mode 100644 index 0000000..72f2b41 --- /dev/null +++ b/website/docs/src/trifid-api/users/mobile.md @@ -0,0 +1 @@ +# Why doesn't trifid support mobile devices? diff --git a/website/docs/src/trifid-api/users/supported_clients.md b/website/docs/src/trifid-api/users/supported_clients.md new file mode 100644 index 0000000..b762820 --- /dev/null +++ b/website/docs/src/trifid-api/users/supported_clients.md @@ -0,0 +1 @@ +# Supported Clients/Platforms diff --git a/website/docs/theme/catppuccin-highlight.css b/website/docs/theme/catppuccin-highlight.css new file mode 100644 index 0000000..6658dc0 --- /dev/null +++ b/website/docs/theme/catppuccin-highlight.css @@ -0,0 +1,607 @@ +.mocha code .hljs-keyword { + color: #cba6f7; +} +.mocha code .hljs-built_in { + color: #f38ba8; +} +.mocha code .hljs-type { + color: #f9e2af; +} +.mocha code .hljs-literal { + color: #fab387; +} +.mocha code .hljs-number { + color: #fab387; +} +.mocha code .hljs-operator { + color: #94e2d5; +} +.mocha code .hljs-punctuation { + color: #bac2de; +} +.mocha code .hljs-property { + color: #94e2d5; +} +.mocha code .hljs-regexp { + color: #f5c2e7; +} +.mocha code .hljs-string { + color: #a6e3a1; +} +.mocha code .hljs-char.escape_ { + color: #a6e3a1; +} +.mocha code .hljs-subst { + color: #a6adc8; +} +.mocha code .hljs-symbol { + color: #f2cdcd; +} +.mocha code .hljs-variable { + color: #cba6f7; +} +.mocha code .hljs-variable.language_ { + color: #cba6f7; +} +.mocha code .hljs-variable.constant_ { + color: #fab387; +} +.mocha code .hljs-title { + color: #89b4fa; +} +.mocha code .hljs-title.class_ { + color: #f9e2af; +} +.mocha code .hljs-title.function_ { + color: #89b4fa; +} +.mocha code .hljs-params { + color: #cdd6f4; +} +.mocha code .hljs-comment { + color: #585b70; +} +.mocha code .hljs-doctag { + color: #f38ba8; +} +.mocha code .hljs-meta { + color: #fab387; +} +.mocha code .hljs-section { + color: #89b4fa; +} +.mocha code .hljs-tag { + color: #a6adc8; +} +.mocha code .hljs-name { + color: #cba6f7; +} +.mocha code .hljs-attr { + color: #89b4fa; +} +.mocha code .hljs-attribute { + color: #a6e3a1; +} +.mocha code .hljs-bullet { + color: #94e2d5; +} +.mocha code .hljs-code { + color: #a6e3a1; +} +.mocha code .hljs-emphasis { + color: #f38ba8; + font-style: italic; +} +.mocha code .hljs-strong { + color: #f38ba8; + font-weight: bold; +} +.mocha code .hljs-formula { + color: #94e2d5; +} +.mocha code .hljs-link { + color: #74c7ec; + font-style: italic; +} +.mocha code .hljs-quote { + color: #a6e3a1; + font-style: italic; +} +.mocha code .hljs-selector-tag { + color: #f9e2af; +} +.mocha code .hljs-selector-id { + color: #89b4fa; +} +.mocha code .hljs-selector-class { + color: #94e2d5; +} +.mocha code .hljs-selector-attr { + color: #cba6f7; +} +.mocha code .hljs-selector-pseudo { + color: #94e2d5; +} +.mocha code .hljs-template-tag { + color: #f2cdcd; +} +.mocha code .hljs-template-variable { + color: #f2cdcd; +} +.mocha code .hljs-diff-addition { + color: #a6e3a1; + background: rgba(166, 227, 161, 0.15); +} +.mocha code .hljs-diff-deletion { + color: #f38ba8; + background: rgba(243, 139, 168, 0.15); +} + +.macchiato code .hljs-keyword { + color: #c6a0f6; +} +.macchiato code .hljs-built_in { + color: #ed8796; +} +.macchiato code .hljs-type { + color: #eed49f; +} +.macchiato code .hljs-literal { + color: #f5a97f; +} +.macchiato code .hljs-number { + color: #f5a97f; +} +.macchiato code .hljs-operator { + color: #8bd5ca; +} +.macchiato code .hljs-punctuation { + color: #b8c0e0; +} +.macchiato code .hljs-property { + color: #8bd5ca; +} +.macchiato code .hljs-regexp { + color: #f5bde6; +} +.macchiato code .hljs-string { + color: #a6da95; +} +.macchiato code .hljs-char.escape_ { + color: #a6da95; +} +.macchiato code .hljs-subst { + color: #a5adcb; +} +.macchiato code .hljs-symbol { + color: #f0c6c6; +} +.macchiato code .hljs-variable { + color: #c6a0f6; +} +.macchiato code .hljs-variable.language_ { + color: #c6a0f6; +} +.macchiato code .hljs-variable.constant_ { + color: #f5a97f; +} +.macchiato code .hljs-title { + color: #8aadf4; +} +.macchiato code .hljs-title.class_ { + color: #eed49f; +} +.macchiato code .hljs-title.function_ { + color: #8aadf4; +} +.macchiato code .hljs-params { + color: #cad3f5; +} +.macchiato code .hljs-comment { + color: #5b6078; +} +.macchiato code .hljs-doctag { + color: #ed8796; +} +.macchiato code .hljs-meta { + color: #f5a97f; +} +.macchiato code .hljs-section { + color: #8aadf4; +} +.macchiato code .hljs-tag { + color: #a5adcb; +} +.macchiato code .hljs-name { + color: #c6a0f6; +} +.macchiato code .hljs-attr { + color: #8aadf4; +} +.macchiato code .hljs-attribute { + color: #a6da95; +} +.macchiato code .hljs-bullet { + color: #8bd5ca; +} +.macchiato code .hljs-code { + color: #a6da95; +} +.macchiato code .hljs-emphasis { + color: #ed8796; + font-style: italic; +} +.macchiato code .hljs-strong { + color: #ed8796; + font-weight: bold; +} +.macchiato code .hljs-formula { + color: #8bd5ca; +} +.macchiato code .hljs-link { + color: #7dc4e4; + font-style: italic; +} +.macchiato code .hljs-quote { + color: #a6da95; + font-style: italic; +} +.macchiato code .hljs-selector-tag { + color: #eed49f; +} +.macchiato code .hljs-selector-id { + color: #8aadf4; +} +.macchiato code .hljs-selector-class { + color: #8bd5ca; +} +.macchiato code .hljs-selector-attr { + color: #c6a0f6; +} +.macchiato code .hljs-selector-pseudo { + color: #8bd5ca; +} +.macchiato code .hljs-template-tag { + color: #f0c6c6; +} +.macchiato code .hljs-template-variable { + color: #f0c6c6; +} +.macchiato code .hljs-diff-addition { + color: #a6da95; + background: rgba(166, 218, 149, 0.15); +} +.macchiato code .hljs-diff-deletion { + color: #ed8796; + background: rgba(237, 135, 150, 0.15); +} + +.frappe code .hljs-keyword { + color: #ca9ee6; +} +.frappe code .hljs-built_in { + color: #e78284; +} +.frappe code .hljs-type { + color: #e5c890; +} +.frappe code .hljs-literal { + color: #ef9f76; +} +.frappe code .hljs-number { + color: #ef9f76; +} +.frappe code .hljs-operator { + color: #81c8be; +} +.frappe code .hljs-punctuation { + color: #b5bfe2; +} +.frappe code .hljs-property { + color: #81c8be; +} +.frappe code .hljs-regexp { + color: #f4b8e4; +} +.frappe code .hljs-string { + color: #a6d189; +} +.frappe code .hljs-char.escape_ { + color: #a6d189; +} +.frappe code .hljs-subst { + color: #a5adce; +} +.frappe code .hljs-symbol { + color: #eebebe; +} +.frappe code .hljs-variable { + color: #ca9ee6; +} +.frappe code .hljs-variable.language_ { + color: #ca9ee6; +} +.frappe code .hljs-variable.constant_ { + color: #ef9f76; +} +.frappe code .hljs-title { + color: #8caaee; +} +.frappe code .hljs-title.class_ { + color: #e5c890; +} +.frappe code .hljs-title.function_ { + color: #8caaee; +} +.frappe code .hljs-params { + color: #c6d0f5; +} +.frappe code .hljs-comment { + color: #626880; +} +.frappe code .hljs-doctag { + color: #e78284; +} +.frappe code .hljs-meta { + color: #ef9f76; +} +.frappe code .hljs-section { + color: #8caaee; +} +.frappe code .hljs-tag { + color: #a5adce; +} +.frappe code .hljs-name { + color: #ca9ee6; +} +.frappe code .hljs-attr { + color: #8caaee; +} +.frappe code .hljs-attribute { + color: #a6d189; +} +.frappe code .hljs-bullet { + color: #81c8be; +} +.frappe code .hljs-code { + color: #a6d189; +} +.frappe code .hljs-emphasis { + color: #e78284; + font-style: italic; +} +.frappe code .hljs-strong { + color: #e78284; + font-weight: bold; +} +.frappe code .hljs-formula { + color: #81c8be; +} +.frappe code .hljs-link { + color: #85c1dc; + font-style: italic; +} +.frappe code .hljs-quote { + color: #a6d189; + font-style: italic; +} +.frappe code .hljs-selector-tag { + color: #e5c890; +} +.frappe code .hljs-selector-id { + color: #8caaee; +} +.frappe code .hljs-selector-class { + color: #81c8be; +} +.frappe code .hljs-selector-attr { + color: #ca9ee6; +} +.frappe code .hljs-selector-pseudo { + color: #81c8be; +} +.frappe code .hljs-template-tag { + color: #eebebe; +} +.frappe code .hljs-template-variable { + color: #eebebe; +} +.frappe code .hljs-diff-addition { + color: #a6d189; + background: rgba(166, 209, 137, 0.15); +} +.frappe code .hljs-diff-deletion { + color: #e78284; + background: rgba(231, 130, 132, 0.15); +} + +.latte code .hljs-keyword { + color: #8839ef; +} +.latte code .hljs-built_in { + color: #d20f39; +} +.latte code .hljs-type { + color: #df8e1d; +} +.latte code .hljs-literal { + color: #fe640b; +} +.latte code .hljs-number { + color: #fe640b; +} +.latte code .hljs-operator { + color: #179299; +} +.latte code .hljs-punctuation { + color: #5c5f77; +} +.latte code .hljs-property { + color: #179299; +} +.latte code .hljs-regexp { + color: #ea76cb; +} +.latte code .hljs-string { + color: #40a02b; +} +.latte code .hljs-char.escape_ { + color: #40a02b; +} +.latte code .hljs-subst { + color: #6c6f85; +} +.latte code .hljs-symbol { + color: #dd7878; +} +.latte code .hljs-variable { + color: #8839ef; +} +.latte code .hljs-variable.language_ { + color: #8839ef; +} +.latte code .hljs-variable.constant_ { + color: #fe640b; +} +.latte code .hljs-title { + color: #1e66f5; +} +.latte code .hljs-title.class_ { + color: #df8e1d; +} +.latte code .hljs-title.function_ { + color: #1e66f5; +} +.latte code .hljs-params { + color: #4c4f69; +} +.latte code .hljs-comment { + color: #acb0be; +} +.latte code .hljs-doctag { + color: #d20f39; +} +.latte code .hljs-meta { + color: #fe640b; +} +.latte code .hljs-section { + color: #1e66f5; +} +.latte code .hljs-tag { + color: #6c6f85; +} +.latte code .hljs-name { + color: #8839ef; +} +.latte code .hljs-attr { + color: #1e66f5; +} +.latte code .hljs-attribute { + color: #40a02b; +} +.latte code .hljs-bullet { + color: #179299; +} +.latte code .hljs-code { + color: #40a02b; +} +.latte code .hljs-emphasis { + color: #d20f39; + font-style: italic; +} +.latte code .hljs-strong { + color: #d20f39; + font-weight: bold; +} +.latte code .hljs-formula { + color: #179299; +} +.latte code .hljs-link { + color: #209fb5; + font-style: italic; +} +.latte code .hljs-quote { + color: #40a02b; + font-style: italic; +} +.latte code .hljs-selector-tag { + color: #df8e1d; +} +.latte code .hljs-selector-id { + color: #1e66f5; +} +.latte code .hljs-selector-class { + color: #179299; +} +.latte code .hljs-selector-attr { + color: #8839ef; +} +.latte code .hljs-selector-pseudo { + color: #179299; +} +.latte code .hljs-template-tag { + color: #dd7878; +} +.latte code .hljs-template-variable { + color: #dd7878; +} +.latte code .hljs-diff-addition { + color: #40a02b; + background: rgba(64, 160, 43, 0.15); +} +.latte code .hljs-diff-deletion { + color: #d20f39; + background: rgba(210, 15, 57, 0.15); +} + +.mocha code { + color: #a6adc8; + background: #181825; +} +.mocha .ace_gutter { + color: #7f849c; + background: #181825; +} +.mocha .ace_gutter-active-line.ace_gutter-cell { + color: #f5c2e7; + background: #181825; +} + +.macchiato code { + color: #a5adcb; + background: #1e2030; +} +.macchiato .ace_gutter { + color: #8087a2; + background: #1e2030; +} +.macchiato .ace_gutter-active-line.ace_gutter-cell { + color: #f5bde6; + background: #1e2030; +} + +.frappe code { + color: #a5adce; + background: #292c3c; +} +.frappe .ace_gutter { + color: #838ba7; + background: #292c3c; +} +.frappe .ace_gutter-active-line.ace_gutter-cell { + color: #f4b8e4; + background: #292c3c; +} + +.latte code { + color: #6c6f85; + background: #e6e9ef; +} +.latte .ace_gutter { + color: #8c8fa1; + background: #e6e9ef; +} +.latte .ace_gutter-active-line.ace_gutter-cell { + color: #ea76cb; + background: #e6e9ef; +} diff --git a/website/docs/theme/catppuccin.css b/website/docs/theme/catppuccin.css new file mode 100644 index 0000000..ddf953c --- /dev/null +++ b/website/docs/theme/catppuccin.css @@ -0,0 +1,123 @@ +.mocha { + --bg: #1e1e2e; + --fg: #cdd6f4; + --sidebar-bg: #181825; + --sidebar-fg: #cdd6f4; + --sidebar-non-existant: #6c7086; + --sidebar-active: #89b4fa; + --sidebar-spacer: #6c7086; + --scrollbar: #6c7086; + --icons: #6c7086; + --icons-hover: #7f849c; + --links: #89b4fa; + --inline-code-color: #fab387; + --theme-popup-bg: #181825; + --theme-popup-border: #6c7086; + --theme-hover: #6c7086; + --quote-bg: #181825; + --quote-border: #11111b; + --table-border-color: #11111b; + --table-header-bg: #181825; + --table-alternate-bg: #11111b; + --searchbar-border-color: #11111b; + --searchbar-bg: #181825; + --searchbar-fg: #cdd6f4; + --searchbar-shadow-color: #11111b; + --searchresults-header-fg: #cdd6f4; + --searchresults-border-color: #11111b; + --searchresults-li-bg: #1e1e2e; + --search-mark-bg: #fab387; +} + +.macchiato { + --bg: #24273a; + --fg: #cad3f5; + --sidebar-bg: #1e2030; + --sidebar-fg: #cad3f5; + --sidebar-non-existant: #6e738d; + --sidebar-active: #8aadf4; + --sidebar-spacer: #6e738d; + --scrollbar: #6e738d; + --icons: #6e738d; + --icons-hover: #8087a2; + --links: #8aadf4; + --inline-code-color: #f5a97f; + --theme-popup-bg: #1e2030; + --theme-popup-border: #6e738d; + --theme-hover: #6e738d; + --quote-bg: #1e2030; + --quote-border: #181926; + --table-border-color: #181926; + --table-header-bg: #1e2030; + --table-alternate-bg: #181926; + --searchbar-border-color: #181926; + --searchbar-bg: #1e2030; + --searchbar-fg: #cad3f5; + --searchbar-shadow-color: #181926; + --searchresults-header-fg: #cad3f5; + --searchresults-border-color: #181926; + --searchresults-li-bg: #24273a; + --search-mark-bg: #f5a97f; +} + +.frappe { + --bg: #303446; + --fg: #c6d0f5; + --sidebar-bg: #292c3c; + --sidebar-fg: #c6d0f5; + --sidebar-non-existant: #737994; + --sidebar-active: #8caaee; + --sidebar-spacer: #737994; + --scrollbar: #737994; + --icons: #737994; + --icons-hover: #838ba7; + --links: #8caaee; + --inline-code-color: #ef9f76; + --theme-popup-bg: #292c3c; + --theme-popup-border: #737994; + --theme-hover: #737994; + --quote-bg: #292c3c; + --quote-border: #232634; + --table-border-color: #232634; + --table-header-bg: #292c3c; + --table-alternate-bg: #232634; + --searchbar-border-color: #232634; + --searchbar-bg: #292c3c; + --searchbar-fg: #c6d0f5; + --searchbar-shadow-color: #232634; + --searchresults-header-fg: #c6d0f5; + --searchresults-border-color: #232634; + --searchresults-li-bg: #303446; + --search-mark-bg: #ef9f76; +} + +.latte { + --bg: #eff1f5; + --fg: #4c4f69; + --sidebar-bg: #e6e9ef; + --sidebar-fg: #4c4f69; + --sidebar-non-existant: #9ca0b0; + --sidebar-active: #1e66f5; + --sidebar-spacer: #9ca0b0; + --scrollbar: #9ca0b0; + --icons: #9ca0b0; + --icons-hover: #8c8fa1; + --links: #1e66f5; + --inline-code-color: #fe640b; + --theme-popup-bg: #e6e9ef; + --theme-popup-border: #9ca0b0; + --theme-hover: #9ca0b0; + --quote-bg: #e6e9ef; + --quote-border: #dce0e8; + --table-border-color: #dce0e8; + --table-header-bg: #e6e9ef; + --table-alternate-bg: #dce0e8; + --searchbar-border-color: #dce0e8; + --searchbar-bg: #e6e9ef; + --searchbar-fg: #4c4f69; + --searchbar-shadow-color: #dce0e8; + --searchresults-header-fg: #4c4f69; + --searchresults-border-color: #dce0e8; + --searchresults-li-bg: #eff1f5; + --search-mark-bg: #fe640b; +} diff --git a/website/docs/theme/index.hbs b/website/docs/theme/index.hbs new file mode 100644 index 0000000..69ad430 --- /dev/null +++ b/website/docs/theme/index.hbs @@ -0,0 +1,318 @@ + + + + + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + {{#if copy_fonts}} + + {{/if}} + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+ + +
+
+ + + +
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + + +