1
0
mirror of https://github.com/spacebarchat/docs.git synced 2024-11-09 11:52:31 +01:00

Merge pull request #82 from spacebarchat/client-update

update docs for client
This commit is contained in:
Madeline 2023-08-31 00:59:46 +10:00 committed by GitHub
commit 46f7654f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 165 additions and 105 deletions

View File

@ -1,105 +1 @@
# Clients ## [Official Client](official)
!!! 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.

View File

@ -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)

View File

@ -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!

View File

@ -0,0 +1,71 @@
# React Client
!!! 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 }}).
## 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.
!!! 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
### 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.