- Rust 97%
- CSS 2.3%
- Shell 0.7%
| css | Port to bootstrap | |
| img | Commit missing img directory | |
| LICENSES | Add license | |
| migrations | Switch to uuids | |
| screenshots | Add screenshots | |
| src | Update dependencies | |
| templates | Improve layout | |
| .woodpecker.yml | ci: Update for new woodpecker version | |
| Cargo.lock | Update dependencies | |
| Cargo.toml | Update dependencies | |
| diesel.toml | Initial commit of working comment system | |
| genpasswdhash.sh | Add script for generating the password hashes | |
| README.md | Add build status to README | |
| Rocket.toml | Initial commit of working comment system | |
reactions-rs
Really simple comment system for blogs, minimal enough to be hosted on a Raspberry Pi.
Use cases
For now, this is suited for small blogs which need an extremely cheap (in terms of resource usage) comment system, for example when the rest of the blog is generated by a static site generator and the comments need to be on a very limited self-hosted server. A basic captcha-like system is in place, but it won't withstand targeted attacks.
Setup instructions
cargo install diesel_cli
export DATABASE_URL=comments.sqlite
diesel migration run
You must add a base_url value to /etc/reactions/config.toml, so the comment system can create urls to reference itself.
base_url = "https://comment.ghsq.ga"
You should add your own, community-related security questions to /etc/reactions/config.toml.
[security_questions]
"Question?" = "Answer"
Afterwards, start the server.
cargo run --release
If you want, you can add reserved names to /etc/reactions/config.toml.
[reserved_names]
"User Name" = "encoded argon2 hash"
You can create the password hashes using the argon2 command line tool.
Architecture
Each comment has a secret and a public id. The public id is used for features such as replies, where the id of a comment needs to be known to the client to specify which comment their comment replies to. The secret id is used for deleting posts. After a comment was created, the user can see the secret id, but it is impossible to get the secret id later without access to the database.
Usage
You can use an iframe to embed the comments.
<iframe width="970" height="500" frameborder=0 style="max-width: 100%;" src="https://hostname.tld/comments?article_id={{ post.title }}"></iframe>
To check for new comments, you can visit https://hostname.tld/recent.