You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Spacebar Docs
2
2
3
-
[](https://github.com/spacebarchat/docs/actions/workflows/build.yml)[](https://github.com/prettier/prettier)
3
+
[](https://github.com/spacebarchat/docs/actions/workflows/build.yml)
Copy file name to clipboardExpand all lines: docs/contributing/index.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,32 @@
4
4
5
5
## Style and a note on etiquette
6
6
7
-
- We use [prettier](https://www.npmjs.com/package/prettier) for code formatting. We have a `.prettierrc` file in {{ project.name.lower() }}-server's root
7
+
-We use [prettier](https://www.npmjs.com/package/prettier) for code formatting. We have a `.prettierrc` file in {{ project.name.lower() }}-server's root
8
8
and use a git precommit hook to autorun it.
9
-
- Try to stay consistent with the rest of the project
10
-
- Try to keep each commit to a single feature or idea, with descriptions of what it is and why it is done. No "Large refactor" commits that touch every file,
9
+
-Try to stay consistent with the rest of the project
10
+
-Try to keep each commit to a single feature or idea, with descriptions of what it is and why it is done. No "Large refactor" commits that touch every file,
11
11
unless absolutely required due to the nature of change.
12
-
- Leave comments in your code about why something is done when appropriate, not just what it is doing.
13
-
- If you're working on a feature, please announce that you're working on it (in the relevant GH issue or our Discord, preferably both),
12
+
-Leave comments in your code about why something is done when appropriate, not just what it is doing.
13
+
-If you're working on a feature, please announce that you're working on it (in the relevant GH issue or our Discord, preferably both),
14
14
so that we can work more effectively and minimise conflicting change attempts.
15
15
Additionally, please do not try to snipe features that others are working on.
16
16
17
17
## Structure
18
18
19
-
{{ project.name }} is written in Typescript and is comprised of 4 main parts:
19
+
{{ project.name }} is written in TypeScript and is comprised of 4 main parts:
20
20
21
-
- REST HTTP API server
22
-
- Websocket Gateway server for realtime communication with clients
23
-
- HTTP CDN server for storing user file content.
24
-
-`utils` module to separate our database models, schemas, and other things from the above 3 components.
21
+
-REST HTTP API server
22
+
-Websocket Gateway server for realtime communication with clients
23
+
-HTTP CDN server for storing user file content.
24
+
-`utils` module to separate our database models, schemas, and other things from the above 3 components.
25
25
26
26
## Implementing endpoints, opcodes, etc
27
27
28
28
Generally, the approach is to just see what the Discord.com client sends and receives from Discord.com (through your browsers devtools, for example)
29
29
and guessing about any functionality server-side, if it's undocumented.
30
30
31
31
For a lot of things it's pretty simple to guess, `GET /api/users/@me` returns private details about your user for example.
32
-
This route is also detailed in [Discords own documentation](https://discord.com/developers/), [here specifically](https://discord.com/developers/docs/resources/user#get-current-user).
32
+
This route is also detailed in [Discords own documentation](https://discord.com/developers/docs/intro), [here specifically](https://discord.com/developers/docs/resources/user#get-current-user).
33
33
34
34
Discord generally does not document anything that is not related to application/bot development, though.
35
35
As an example, `GET /api/updates?platform={}` which returns the `url`, `pub_date`, `name` and any `notes` about the latest client release for a platform.
@@ -40,5 +40,5 @@ Easy fix though, just edit the `DeveloperOptionsStore` localStorage key so that
40
40
41
41
!!! warning
42
42
43
-
Make sure you rerun `npm run build` every time you edit source code. Additionally, make sure you run `npm run generate:schema` whenever you change a
44
-
schema. If you want to do both, there's a shortcut: `npm run setup`.
43
+
Make sure you rerun `npm run build` every time you edit source code, or just use `npm run watch` to make TypeScript automatically recompile on code changes.
44
+
Wenn making changes to schemas or HTTP routes, run `npm run generate:schemas` and `npm run generate:openapi` to update the schemas used for validating incoming requests and generating the API documentation.
The below are the rules for instance owners who look to be featured in our [community instances](https://github.com/spacebarchat/spacebarchat/tree/master/instances) list.
4
+
If you do not meet these criteria, your instance will simply not be featured on our website.
5
+
6
+
Your instance:
7
+
8
+
1. Rules must be in line with our [Code of Conduct](conduct.md).
9
+
2. Must not contain any Discord Inc. branding, such as including "cord" in the name or the Discord logo in promotional material.
10
+
3. Must not host the Discord Inc. client in any capacity.
11
+
4. Must be moderated for _at least_ publically accessible guilds. This includes guilds accessible from Discovery or a 'guild directory' channel in an auto join guild.
12
+
5. Must have at least regular uptime, meaning it is available at a consistent time of day.
13
+
6. Must have a valid and monitored [`general_correspondenceEmail` config](/setup/server/configuration) set.
14
+
7. Must not have default [rights](/setup/server/security/rights) that include operator or other administrative rights.
15
+
8. Use an [image proxy](/setup/server/configuration/imageProxy), e.g. Imagor, as no image proxy allows attackers to learn user IP addresses.
16
+
9. Have a valid SSL/TLS certificate for all endpoints.
17
+
18
+
We recommend (not required) that you:
19
+
20
+
- Enable [Email verification](/setup/server/email), for anti-spam purposes.
21
+
- Enable [Captcha](/setup/server/security/captcha), for anti-spam purposes.
22
+
- Run your instance under [SystemD](/setup/server/systemd) or a similar system in your distro, for automatic restarting.
23
+
- Provide some mechanism for users to report content. This may be as simple as more openly advertising your correspondence email (i.e. outside `GET /api/policies/instance` or `/api/ping`).
24
+
- Provide some mechanism for instance status, such as [Grafana](https://grafana.com/).
25
+
- Host a [`/.well-known/spacebar`](/setup/server/wellknown) file on the domain you wish users associate with your instance, e.g. `spacebar.chat`.
26
+
If doing so, use this domain as the `url` field in your community instances PR.
0 commit comments