Skip to content

Commit 0541ddf

Browse files
authored
restructure readme, add spellcheck, fix typos (#476)
1 parent 4ea10e9 commit 0541ddf

File tree

14 files changed

+85
-40
lines changed

14 files changed

+85
-40
lines changed

.github/workflows/typo-check.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check for typos
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
check-typos:
13+
name: "Spell-check repository source"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run spell-check
19+
uses: crate-ci/typos@master

CONTRIBUTING.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing
2+
3+
Contributions are very welcome. However, if you intend to change anything more than updating a dependency or fixing a small bug, please open an issue first.
4+
We would like to discuss any bigger changes before they are actually implemented.
5+
6+
## Tech stack
7+
8+
Our tech stack mainly consists of the following:
9+
10+
- Rust
11+
- PostgreSQL
12+
- Vue
13+
- TypeScript
14+
- SCSS
15+
16+
## Finding issues to fix
17+
18+
If you are looking for issues to fix, you can look over the [issue tracker](https://github.com/kitsune-soc/kitsune/issues) and comment under the issue that interests you!
19+
We will get back to you, assign you the issue if you're up for it, and answer questions about the codebase in the issue or on Matrix!
20+
21+
## Project structure
22+
23+
- `contrib/`: Files for configuring Kitsune (Systemd, Caddy, etc.)
24+
- `crates/`: Sub-crates Kitsune consists of
25+
- `docs/`: Documentation in form of an [mdBook](https://rust-lang.github.io/mdBook/)
26+
- `kitsune/`: Main Kitsune server binary
27+
- `kitsune-cli/`: Kitsune CLI binary
28+
- `kitsune-fe/`: Kitsune frontend project
29+
- `kitsune-job-runner/`: Kitsune dedicated job runner
30+
- `lib/`: Libraries made for Kitsune but with no dependencies on Kitsune-specific code. Easily usable by other projects
31+
- `public/`: Public web assets
32+
- `web/`: Resources specific to the [website](https://joinkitsune.org)
33+
- `xtask/`: Task-runner polyfill
34+
35+
## Note on required libraries
36+
37+
We use [Nix](https://nixos.org) for handling our development dependencies.
38+
When in doubt, install Nix and run `nix develop` to get yourself a shell with all required dependencies and services
39+
(you might need to enable some unstable features of Nix since Flakes aren't stable yet!).

README.md

+3-23
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
</div>
1313

14-
Kitsune is an open-souce social media server utilising the ActivityPub protocol.
14+
Kitsune is an open-source social media server utilising the ActivityPub protocol.
1515
Utilising the capabilities of ActivityPub, you can interact with people on Mastodon, Misskey, Akkoma, etc.
1616
Due to its decentralised nature, you can self-host Kitsune on your own hardware and still interact with everyone!
1717

@@ -29,34 +29,14 @@ Both chat options are bridged. Feel free to join whichever you're more comfortab
2929
This software is far from production-ready. Breaking changes might happen.
3030
So, as long as this disclaimer is here, make sure to double check all the changes before you update your installation.
3131

32-
## Project structure
33-
34-
- `contrib/`: Files for configuring Kitsune (Systemd, Caddy, etc.)
35-
- `crates/`: Sub-crates Kitsune consists of
36-
- `docs/`: Documentation in form of an [mdBook](https://rust-lang.github.io/mdBook/)
37-
- `kitsune/`: Main Kitsune server binary
38-
- `kitsune-cli/`: Kitsune CLI binary
39-
- `kitsune-fe/`: Kitsune frontend project
40-
- `kitsune-job-runner/`: Kitsune dedicated job runner
41-
- `lib/`: Libraries made for Kitsune but with no dependencies on Kitsune-specific code. Easily usable by other projects
42-
- `public/`: Public web assets
43-
- `web/`: Resources specific to the [website](https://joinkitsune.org)
44-
- `xtask/`: Task-runner polyfill
45-
4632
## Contributing
4733

48-
Contributions are very welcome. However, if you intend to change anything more than updating a dependency or fixing a small bug, please open an issue first.
49-
We would like to discuss any bigger changes before they are actually implemented.
34+
See [CONTRIBUTING.md](./CONTRIBUTING.md)
5035

51-
### Security
36+
## Security
5237

5338
If you found a suspected security vulnerability, please refer to our [security policy](./SECURITY.md) for more details.
5439

55-
### Note on required libraries
56-
57-
We use [Nix](https://nixos.org) for handling our development dependencies.
58-
When in doubt, install Nix and run `nix develop` to get yourself a shell with all required dependencies and services (you might need to enable some unstable features).
59-
6040
## License
6141

6242
Kitsune is licensed under the [MIT license](http://opensource.org/licenses/MIT).

_typos.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[files]
2+
extend-exclude = [
3+
"crates/kitsune-http-signatures/tests/data.rs",
4+
"crates/kitsune-language/examples/basic.rs",
5+
"crates/kitsune-language/src/map.rs",
6+
"lib/post-process/tests/input/*",
7+
]

crates/kitsune-captcha/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Captcha abstraction for Kitsune
44

55
## About
66

7-
Abstractions built over different backends for veryfing captchas, intended to be used with Kitsune where it is used to enable the use of different captcha providers.
7+
Abstractions built over different backends for verifying captchas, intended to be used with Kitsune where it is used to enable the use of different captcha providers.
88

99
## Supported captcha providers
1010

crates/kitsune-captcha/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum ChallengeStatus {
1818
/// Input successfully sent and verified
1919
Verified,
2020

21-
/// Request was successfull but token verification failed
21+
/// Request was successful but token verification failed
2222
Failed(Vec<CaptchaVerification>),
2323
}
2424

crates/kitsune-db/migrations/2023-05-19-192931_initial_tables/up.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ CREATE TABLE posts_favourites (
159159
-- UNIQUE constraints
160160
UNIQUE (account_id, post_id),
161161

162-
-- Foreign key contraints
162+
-- Foreign key constraints
163163
FOREIGN KEY (account_id) REFERENCES accounts(id) ON DELETE CASCADE ON UPDATE CASCADE,
164164
FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE ON UPDATE CASCADE
165165
);

crates/kitsune-db/src/pool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where
2424

2525
/// Small wrapper around [`Pool<AsyncPgConnection>`]
2626
///
27-
/// The intent of this API is to encourage and make short-livel ownership of connections easier.
27+
/// The intent of this API is to encourage and make short-lived ownership of connections easier.
2828
/// With the traditional RAII guard based approach, it is rather hard (and/or ugly) to define clear scopes for connections
2929
/// (especially when they are used *a lot* throughout the code).
3030
///

crates/kitsune-mastodon/src/sealed.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl IntoMastodon for DbAccount {
151151

152152
/// Maps to the relationship between the two accounts
153153
///
154-
/// - Left: Requestor of the relationship
154+
/// - Left: Requester of the relationship
155155
/// - Right: Target of the relationship
156156
impl IntoMastodon for (&DbAccount, &DbAccount) {
157157
type Output = Relationship;
@@ -161,17 +161,17 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
161161
}
162162

163163
async fn into_mastodon(self, state: MapperState<'_>) -> Result<Self::Output> {
164-
let (requestor, target) = self;
164+
let (requester, target) = self;
165165

166-
let ((following, requested), followed_by) = state
166+
let ((following, follow_requested), followed_by) = state
167167
.db_pool
168168
.with_connection(|db_conn| {
169169
async move {
170170
let following_requested_fut = accounts_follows::table
171171
.filter(
172172
accounts_follows::account_id
173173
.eq(target.id)
174-
.and(accounts_follows::follower_id.eq(requestor.id)),
174+
.and(accounts_follows::follower_id.eq(requester.id)),
175175
)
176176
.get_result::<Follow>(db_conn)
177177
.map(OptionalExtension::optional)
@@ -184,7 +184,7 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
184184
let followed_by_fut = accounts_follows::table
185185
.filter(
186186
accounts_follows::account_id
187-
.eq(requestor.id)
187+
.eq(requester.id)
188188
.and(accounts_follows::follower_id.eq(target.id)),
189189
)
190190
.count()
@@ -207,7 +207,7 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
207207
blocked_by: false,
208208
muting: false,
209209
muting_notifications: false,
210-
requested,
210+
requested: follow_requested,
211211
domain_blocking: false,
212212
endorsed: false,
213213
note: String::default(),

crates/kitsune-messaging/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ where
161161

162162
/// Message emitter
163163
///
164-
/// This is cheaply clonable. Interally it is a string for the channel name and an `Arc` referencing the backend.
164+
/// This is cheaply clonable. Internally it is a string for the channel name and an `Arc` referencing the backend.
165165
#[derive(Clone)]
166166
pub struct MessageEmitter<M> {
167167
backend: Arc<AnyMessagingBackend>,

docs/src/configuring/storage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Storage
22

3-
As a microblogging platform, Kitsune also offers users the ability to attach images, videos, and audio to their posts.
3+
As a microblogging platform, Kitsune also offers users the ability to attach images, videos, and audio to their posts.
44
We offer multiple different storage backends to store the attachments to.
55

6-
> **Note**: You might want to increase the upload limit by tweaking the `max-upload-size` parameter in your configuration; the number is the upload limit in bytes.
6+
> **Note**: You might want to increase the upload limit by tweaking the `max-upload-size` parameter in your configuration; the number is the upload limit in bytes.
77
> The default set by the example configuration is 5MiB.
88
99
## File System
@@ -67,5 +67,5 @@ For example, Cloudflare R2 has a "no egress fee policy" which, due to this imple
6767
6868
### Migrating from file-system storage to S3
6969

70-
The migration is pretty simple. Upload all the files from your upload directory into the S3 bucket (while preserving the same file hirearchy) and change the configuration.
70+
The migration is pretty simple. Upload all the files from your upload directory into the S3 bucket (while preserving the same file hierarchy) and change the configuration.
7171
Kitsune should then serve the files without any problems.

kitsune-fe/src/graphql/types/graphql.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type Scalars = {
4545
* # References
4646
*
4747
* * [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier)
48-
* * [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
48+
* * [RFC4122: A Universally Unique Identifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
4949
*/
5050
UUID: { input: any; output: any };
5151
Upload: { input: any; output: any };

lib/speedy-uuid/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ mod async_graphql_impl {
135135
/// # References
136136
///
137137
/// * [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier)
138-
/// * [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
138+
/// * [RFC4122: A Universally Unique Identifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
139139
#[Scalar(name = "UUID", specified_by_url = "http://tools.ietf.org/html/rfc4122")]
140140
impl ScalarType for Uuid {
141141
fn parse(value: Value) -> InputValueResult<Self> {

module.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in
2929
options = {
3030
services.kitsune = {
3131
enable = mkEnableOption ''
32-
Kitsune: an open-souce social media server utilising the ActivityPub protocol.
32+
Kitsune: an open-source social media server utilising the ActivityPub protocol.
3333
'';
3434

3535
packages = {

0 commit comments

Comments
 (0)