From 3a5acf824c1af8b2e2eb66257411186fc8a280b3 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Tue, 29 Aug 2023 11:22:55 -0400 Subject: [PATCH 1/2] update docs for client --- docs/setup/clients/index.md | 106 +------------------------- docs/setup/clients/official/index.md | 6 ++ docs/setup/clients/official/legacy.md | 87 +++++++++++++++++++++ docs/setup/clients/official/react.md | 64 ++++++++++++++++ 4 files changed, 158 insertions(+), 105 deletions(-) create mode 100644 docs/setup/clients/official/index.md create mode 100644 docs/setup/clients/official/legacy.md create mode 100644 docs/setup/clients/official/react.md diff --git a/docs/setup/clients/index.md b/docs/setup/clients/index.md index 0d3058d..b8f9a19 100644 --- a/docs/setup/clients/index.md +++ b/docs/setup/clients/index.md @@ -1,105 +1 @@ -# Clients - -!!! note "The {{ project.name }} client is, at the time of writing this (March 17th, 2023), under heavy development and not ready to be used in production just yet." - -!!! warning "Windows support is currently broken." - -The official {{ project.name }} client is currently being developed at [this repository]({{ repositories.base_url }}/{{ repositories.client }}). - -## Official host - -The new, React-only client is being hosted at [https://dev.app.{{ project.domain }}](https://dev.app.{{ project.domain }}). -An older, React Native version of the client can be found at -[https://app.{{ project.domain }}](https://app.{{ project.domain }}). -You can use it to connect to our official instance by default, or you can use it to connect to your -own instance by editing your local storage to include the `routeSettings` key with the below example -content: - -```json -{ - "api": "https://api.old.server.{{ project.domain }}/api/v9", - "cdn": "https://cdn.old.server.{{ project.domain }}", - "gateway": "wss://gateway.old.server.{{ project.domain }}", - "invite": "https://old.server.{{ project.domain }}/invite", - "template": "https://old.server.{{ project.domain }}/template", - "gift": "https://old.server.{{ project.domain }}/gift", - "scheduledEvent": "https://old.server.{{ project.domain }}/events" -} -``` - -Replace the above endpoints with your own. If your domain name is `https://whatever.notasite`, then you'll most likely want to enter -`https://whatever.notasite/api/v9` for the API endpoint, etc. - -If you're using the React Native client, you can also edit these settings by visiting [https://app.{{ project.domain }}/settings](https://app.{{ project.domain }}/settings). - -## Setup/Building - -These Instructions refer to the old, React Native client, and therefore do not apply to the new, React-only client. - -### Dependencies - -- [Git](https://git-scm.com/) -- [NodeJS](https://nodejs.org). Version 18+ -- [yarn](https://yarnpkg.com/) - -In your terminal: - -```bash -# Download {{ project.name }} Client -git clone {{ repositories.base_url }}/{{ repositories.client }}.git -b legacy-v2 - -# Enter the cloned directory, switch branches to the one, which is actually being developed -cd client - -# Install dependencies -yarn install -``` - -To start the client with Metro for development, run - -```bash -yarn start -``` - -!!! note "Platform-specific development commands:" - - For development for Android, run - - ```bash - yarn android - ``` - - For development for iOS, run - - ```bash - yarn ios - ``` - - For development for Windows, run - - ```bash - yarn windows - ``` - -To build static files for the web (i.e. when hosting it yourself), run - -```bash -yarn build:web -``` - -Files will be built to `web-build` - -## Contributing - -To contribute: - -- [Fork the repository]({{ repositories.base_url }}/{{ repositories.client }}/fork) -- Run the building instructions. -- Commit & Push. -- Pull Request & Done! - -### What can I contribute? - -- "Core" features like settings, editing messages, dms, markdown rendering, etc. What do you think are basic features that you would want? Some of the GitHub Issues apply to this. -- Implementing other things like voice/video is fine too, though -- [This]({{ repositories.base_url }}/{{ repositories.client }}/issues/21) is a good starting point and lists the core features that are still missing from the client. +## [Official Client](official) diff --git a/docs/setup/clients/official/index.md b/docs/setup/clients/official/index.md new file mode 100644 index 0000000..67a7f05 --- /dev/null +++ b/docs/setup/clients/official/index.md @@ -0,0 +1,6 @@ +# {{ project.name }} Client + +The {{ project.name }} client has 2 versions: + +- The new, React version which is currently under active development. Docs: [React Client](react.md) +- The old, legacy React Native version which is no longer under active development. Docs: [Legacy Client](legacy.md) diff --git a/docs/setup/clients/official/legacy.md b/docs/setup/clients/official/legacy.md new file mode 100644 index 0000000..543189a --- /dev/null +++ b/docs/setup/clients/official/legacy.md @@ -0,0 +1,87 @@ +# Legacy Client + +!!! danger "This version is no longer under active development! Please see [React Client](dev.md) for the current in-development version." + +!!! warning "Windows support is currently broken." + +## Official host + +The client will connect to our official instance by default, or you can use it to connect to your +own instance by editing your local storage to include the `routeSettings` key with the below example +content: + +```json +{ + "api": "https://api.old.server.{{ project.domain }}/api/v9", + "cdn": "https://cdn.old.server.{{ project.domain }}", + "gateway": "wss://gateway.old.server.{{ project.domain }}", + "invite": "https://old.server.{{ project.domain }}/invite", + "template": "https://old.server.{{ project.domain }}/template", + "gift": "https://old.server.{{ project.domain }}/gift", + "scheduledEvent": "https://old.server.{{ project.domain }}/events" +} +``` + +Replace the above endpoints with your own. If your domain name is `https://example.com`, then you'll most likely want to enter +`https://example.com/api/v9` for the API endpoint, etc. + +You can also edit these settings by visiting `https://client.example.com/settings` + +## Setup/Building + +### Dependencies + +- [Git](https://git-scm.com/) +- [NodeJS](https://nodejs.org). Version 18+ +- [yarn](https://yarnpkg.com/) + +In your terminal: + +```bash +# Download {{ project.name }} Client +git clone {{ repositories.base_url }}/{{ repositories.client }}.git -b legacy-v2 + +# Enter the cloned directory, switch branches to the one, which is actually being developed +cd client + +# Install dependencies +yarn install +``` + +To start the client with Metro for development, run + +```bash +yarn start +``` + +!!! note "Platform-specific development commands:" + + For development for Android, run + + ```bash + yarn android + ``` + + For development for iOS, run + + ```bash + yarn ios + ``` + + For development for Windows, run + + ```bash + yarn windows + ``` + +To build static files for the web (i.e. when hosting it yourself), run + +```bash +yarn build:web +``` + +Files will be built to `web-build`. These files need to be served by a Web Server such as Nginx or Apache, the `index.html` file cannot just be opened in a browser. + +## Contributing + +This version is no longer being developed, you are free to clone the repository and make your own changes though! diff --git a/docs/setup/clients/official/react.md b/docs/setup/clients/official/react.md new file mode 100644 index 0000000..af3e94d --- /dev/null +++ b/docs/setup/clients/official/react.md @@ -0,0 +1,64 @@ +# React Client + +!!! note "The {{ project.name }} client is under heavy development and not ready to be used in production yet." + +The official {{ project.name }} client is currently being developed at [this repository]({{ repositories.base_url }}/{{ repositories.client }}). + +## Official host + +The client is currently hosted at [https://app.{{ project.domain }}](https://app.{{ project.domain }}). +You can use it to connect to our official instance by default, or you can use it to connect to your +own instance by editing the `Instance` field on the login page (This requires having [wellknown](/setup/server/wellknown/) setup). + +Replace the above endpoints with your own. If your domain name is `https://whatever.notasite`, then you'll most likely want to enter +`https://whatever.notasite/api/v9` for the API endpoint, etc. + +## Setup/Building + +### Dependencies + +- [Git](https://git-scm.com/) +- [NodeJS](https://nodejs.org): Version 18+ +- [pnpm](https://pnpm.io/) + +In your terminal: + +```bash +# Download {{ project.name }} Client +git clone {{ repositories.base_url }}/{{ repositories.client }}.git + +# Enter the cloned directory +cd client + +# Install dependencies +pnpm install +``` + +To start the client for development, run + +```bash +pnpm start +``` + +To build static files for the web (i.e. when hosting it yourself), run + +```bash +pnpm build +``` + +Files will be built to `build`. These files need to be served by a Web Server such as Nginx or Apache, the `index.html` file cannot just be opened in a browser. + +## Contributing + +To contribute: + +- [Fork the repository]({{ repositories.base_url }}/{{ repositories.client }}/fork) +- Run the building instructions. +- Commit & Push. +- Pull Request & Done! + +### What can I contribute? + +- "Core" features like settings, editing messages, dms, markdown rendering, etc. What do you think are basic features that you would want? Some of the GitHub Issues apply to this. +- Implementing other things like voice/video is fine too, though +- [This]({{ repositories.base_url }}/{{ repositories.client }}/issues/21) is a good starting point and lists the core features that are still missing from the client. From 5813e9afab26ce1693437d60e46446bb6898e704 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 31 Aug 2023 00:59:26 +1000 Subject: [PATCH 2/2] warnings --- docs/setup/clients/official/react.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/setup/clients/official/react.md b/docs/setup/clients/official/react.md index af3e94d..f793b31 100644 --- a/docs/setup/clients/official/react.md +++ b/docs/setup/clients/official/react.md @@ -1,6 +1,6 @@ # React Client -!!! note "The {{ project.name }} client is under heavy development and not ready to be used in production yet." +!!! warning "The {{ project.name }} client is under heavy development and not ready to be used in production yet." The official {{ project.name }} client is currently being developed at [this repository]({{ repositories.base_url }}/{{ repositories.client }}). @@ -8,10 +8,17 @@ The official {{ project.name }} client is currently being developed at [this rep The client is currently hosted at [https://app.{{ project.domain }}](https://app.{{ project.domain }}). You can use it to connect to our official instance by default, or you can use it to connect to your -own instance by editing the `Instance` field on the login page (This requires having [wellknown](/setup/server/wellknown/) setup). +own instance by editing the `Instance` field on the login page. -Replace the above endpoints with your own. If your domain name is `https://whatever.notasite`, then you'll most likely want to enter -`https://whatever.notasite/api/v9` for the API endpoint, etc. +!!! note + + If you've set up [wellknown](/setup/server/wellknown/), you can enter that address here. + I.e. `https://spacebar.chat`. If you haven't, you'll need to enter the API endpoint address + +!!! warning + + If you're using the app at [https://app.{{ project.domain }}](https://app.{{ project.domain }}), + you'll need to make sure your instance allows CORS from that address. ## Setup/Building