- Rust 94.3%
- Nix 4.2%
- Shell 1.1%
- PLpgSQL 0.4%
|
Olivia Lee
e0d27f9af9
It's common for editors to automatically append a trailing newline to text files. It's generally not possible to have a password with a newline in it and getting a invalid password error because of the trailing newline is very confusing, so it is standard for tools to trim trailing newlines when lodaing passwords from files. |
||
|---|---|---|
| .git_hooks | Add git hooks to repo | |
| docs/config-examples | add config option to control log format | |
| migrations | Make DB use the same names as everything else | |
| scripts | Add reset db script | |
| src | trim trailing newlines from password files | |
| test_server | Set bot display name and avatar in config | |
| .gitignore | Add account tracking | |
| build.rs | Avatar suppor | |
| Cargo.lock | add config option to control log format | |
| Cargo.toml | add config option to control log format | |
| default.nix | Redo nix flake, package, module, and shell | |
| docker-compose.yaml | Look up user id in db | |
| flake.lock | flake.lock: Update | |
| flake.nix | flake.lock: Update | |
| module.nix | allow setting log levels in the config | |
| README.md | Fix type in README | |
| rust-toolchain | Test server config | |
| shell.nix | flake.lock: Update | |
| sqlx-data.json | assign an explicit column name with 'SELECT true' | |
| test-accounts | Beginning of bot | |
| TODO.md | Formatting and usability improvements | |
Plural Kitty
A WIP tool that allows plural users to switch aliases without breaking e2ee or generating a lot of extra events.
Plural Kitty works by sitting in front of Synapses message send endpoint. When a plural user sends a message, the proxy will check if they have the correct name and avatar in that room, and if they do not, the proxy will set it before the message send is forwarded to synapse.
Plural Kitty also has a bot that users DM to set up and change members.
Status
Plural Kitty is still very much a work in progress and should be considered alpha software. You can see a list of current major TODO items here. If you have any ideas to improve Plural Kitty or any questions or issues, please ask about them in #plural-kitty-dev:the-apothecary.club.
Deployment Setup
NixOS (recommend)
- Add the Plural Kitty flake
plural-kitty.url = "git+https://codeberg.org/Apothecary/plural-kitty.git"; - Import the NixOS module
modules = [ plural-kitty.nixosModules.default .. ]; - Configure Plural Kitty (see example)
- Configure your HTTP server to forwarded the message send endpoint to Plural Kitty (example for Nginx)
Generic Linux
- Install Plural Kitty and run it as a service (see the Packaging Guide below for help)
- Configure Plural Kitty (see example)
- Configure your HTTP server to forwarded the message send endpoint to Plural Kitty (example for Nginx)
Packaging Guide
To build Plural Kitty from source you will need:
- rustc v1.70 or later and cargo
- openssl development libraries
- sqlite development libraries
Download the source code then build it by running cargo build -r. The
resulting binary will be located at ./target/release/plural-kitty. Install
the binary at an appropriate location. You should also create a service for
Plural Kitty. An example Systemd service
is provided.
Devel Setup
Requirements:
- Nix
Or:
- Rust 1.70 or newer
- podman
- podman-compose
- pkg-config
- Openssl
- Sqlite
- Nginx
- Postgresql 12 or newer
- sqlx-cli
Set up:
- Run
nix-shellin this directory to install all of the needed programs. - Run
./scripts/start-dev-env.shto start start postgres, synapse, and nginx. - Run
./scripts/setup.shto create the development users - Run
cargo run ./test_server/config.yamlto run the proxy. - You will be prompted for the pk account password, it is
kitty. - Connect to the test home server at
http://localhost:8000with the client of your choice - You can log in as
@test:test.localwith the passwordtest.
Ports 8000, 8008, 4000, and 5432 will be used by default,
make sure they're available on your system.
Also considered using out git hooks by running ln -s ./.git_hooks ./.git/hooks.
These hooks will ensure everything stays up to date during development.