restructure readme, add spellcheck, fix typos (#476)

This commit is contained in:
aumetra 2024-01-21 11:54:29 +01:00 committed by GitHub
parent 4ea10e930f
commit 0541ddf7e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 85 additions and 40 deletions

19
.github/workflows/typo-check.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Check for typos
on:
merge_group:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
check-typos:
name: "Spell-check repository source"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run spell-check
uses: crate-ci/typos@master

39
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,39 @@
# Contributing
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.
We would like to discuss any bigger changes before they are actually implemented.
## Tech stack
Our tech stack mainly consists of the following:
- Rust
- PostgreSQL
- Vue
- TypeScript
- SCSS
## Finding issues to fix
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!
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!
## Project structure
- `contrib/`: Files for configuring Kitsune (Systemd, Caddy, etc.)
- `crates/`: Sub-crates Kitsune consists of
- `docs/`: Documentation in form of an [mdBook](https://rust-lang.github.io/mdBook/)
- `kitsune/`: Main Kitsune server binary
- `kitsune-cli/`: Kitsune CLI binary
- `kitsune-fe/`: Kitsune frontend project
- `kitsune-job-runner/`: Kitsune dedicated job runner
- `lib/`: Libraries made for Kitsune but with no dependencies on Kitsune-specific code. Easily usable by other projects
- `public/`: Public web assets
- `web/`: Resources specific to the [website](https://joinkitsune.org)
- `xtask/`: Task-runner polyfill
## Note on required libraries
We use [Nix](https://nixos.org) for handling our development dependencies.
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 of Nix since Flakes aren't stable yet!).

View File

@ -11,7 +11,7 @@
</div>
Kitsune is an open-souce social media server utilising the ActivityPub protocol.
Kitsune is an open-source social media server utilising the ActivityPub protocol.
Utilising the capabilities of ActivityPub, you can interact with people on Mastodon, Misskey, Akkoma, etc.
Due to its decentralised nature, you can self-host Kitsune on your own hardware and still interact with everyone!
@ -29,34 +29,14 @@ Both chat options are bridged. Feel free to join whichever you're more comfortab
This software is far from production-ready. Breaking changes might happen.
So, as long as this disclaimer is here, make sure to double check all the changes before you update your installation.
## Project structure
- `contrib/`: Files for configuring Kitsune (Systemd, Caddy, etc.)
- `crates/`: Sub-crates Kitsune consists of
- `docs/`: Documentation in form of an [mdBook](https://rust-lang.github.io/mdBook/)
- `kitsune/`: Main Kitsune server binary
- `kitsune-cli/`: Kitsune CLI binary
- `kitsune-fe/`: Kitsune frontend project
- `kitsune-job-runner/`: Kitsune dedicated job runner
- `lib/`: Libraries made for Kitsune but with no dependencies on Kitsune-specific code. Easily usable by other projects
- `public/`: Public web assets
- `web/`: Resources specific to the [website](https://joinkitsune.org)
- `xtask/`: Task-runner polyfill
## Contributing
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.
We would like to discuss any bigger changes before they are actually implemented.
See [CONTRIBUTING.md](./CONTRIBUTING.md)
### Security
## Security
If you found a suspected security vulnerability, please refer to our [security policy](./SECURITY.md) for more details.
### Note on required libraries
We use [Nix](https://nixos.org) for handling our development dependencies.
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).
## License
Kitsune is licensed under the [MIT license](http://opensource.org/licenses/MIT).

7
_typos.toml Normal file
View File

@ -0,0 +1,7 @@
[files]
extend-exclude = [
"crates/kitsune-http-signatures/tests/data.rs",
"crates/kitsune-language/examples/basic.rs",
"crates/kitsune-language/src/map.rs",
"lib/post-process/tests/input/*",
]

View File

@ -4,7 +4,7 @@ Captcha abstraction for Kitsune
## About
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.
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.
## Supported captcha providers

View File

@ -18,7 +18,7 @@ pub enum ChallengeStatus {
/// Input successfully sent and verified
Verified,
/// Request was successfull but token verification failed
/// Request was successful but token verification failed
Failed(Vec<CaptchaVerification>),
}

View File

@ -159,7 +159,7 @@ CREATE TABLE posts_favourites (
-- UNIQUE constraints
UNIQUE (account_id, post_id),
-- Foreign key contraints
-- Foreign key constraints
FOREIGN KEY (account_id) REFERENCES accounts(id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE ON UPDATE CASCADE
);

View File

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

View File

@ -151,7 +151,7 @@ impl IntoMastodon for DbAccount {
/// Maps to the relationship between the two accounts
///
/// - Left: Requestor of the relationship
/// - Left: Requester of the relationship
/// - Right: Target of the relationship
impl IntoMastodon for (&DbAccount, &DbAccount) {
type Output = Relationship;
@ -161,9 +161,9 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
}
async fn into_mastodon(self, state: MapperState<'_>) -> Result<Self::Output> {
let (requestor, target) = self;
let (requester, target) = self;
let ((following, requested), followed_by) = state
let ((following, follow_requested), followed_by) = state
.db_pool
.with_connection(|db_conn| {
async move {
@ -171,7 +171,7 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
.filter(
accounts_follows::account_id
.eq(target.id)
.and(accounts_follows::follower_id.eq(requestor.id)),
.and(accounts_follows::follower_id.eq(requester.id)),
)
.get_result::<Follow>(db_conn)
.map(OptionalExtension::optional)
@ -184,7 +184,7 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
let followed_by_fut = accounts_follows::table
.filter(
accounts_follows::account_id
.eq(requestor.id)
.eq(requester.id)
.and(accounts_follows::follower_id.eq(target.id)),
)
.count()
@ -207,7 +207,7 @@ impl IntoMastodon for (&DbAccount, &DbAccount) {
blocked_by: false,
muting: false,
muting_notifications: false,
requested,
requested: follow_requested,
domain_blocking: false,
endorsed: false,
note: String::default(),

View File

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

View File

@ -1,9 +1,9 @@
# Storage
As a microblogging platform, Kitsune also offers users the ability to attach images, videos, and audio to their posts.
As a microblogging platform, Kitsune also offers users the ability to attach images, videos, and audio to their posts.
We offer multiple different storage backends to store the attachments to.
> **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.
> **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.
> The default set by the example configuration is 5MiB.
## File System
@ -67,5 +67,5 @@ For example, Cloudflare R2 has a "no egress fee policy" which, due to this imple
### Migrating from file-system storage to S3
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.
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.
Kitsune should then serve the files without any problems.

View File

@ -45,7 +45,7 @@ export type Scalars = {
* # References
*
* * [Wikipedia: Universally Unique Identifier](http://en.wikipedia.org/wiki/Universally_unique_identifier)
* * [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
* * [RFC4122: A Universally Unique Identifier (UUID) URN Namespace](http://tools.ietf.org/html/rfc4122)
*/
UUID: { input: any; output: any };
Upload: { input: any; output: any };

View File

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

View File

@ -29,7 +29,7 @@ in
options = {
services.kitsune = {
enable = mkEnableOption ''
Kitsune: an open-souce social media server utilising the ActivityPub protocol.
Kitsune: an open-source social media server utilising the ActivityPub protocol.
'';
packages = {