🩵 Hatsu
Bring your blog to Fediverse. [WIP]
Development
Hatsu is in the early stages of development, PR welcome.
Setup
# clone project
git clone https://github.com/importantimport/hatsu.git
# change directory
cd hatsu
# copy env example
cp .env.example .env
# create database
touch hatsu.sqlite3
Cargo
# run
cargo run
# build (debug)
cargo build
# build (release)
cargo build --release
# install
cargo install
Docker (possibly broken)
# docker build
docker build .
# docker compose up
docker-compose up -d
ORM (optional)
# install sea-orm-cli
cargo install sea-orm-cli
# migrate
sea-orm-cli migrate up
# generate entity
sea-orm-cli generate entity -o src/entities
The current goal is to refine the database and implement the basic functionality of the Fediverse server.
The ultimate goal of this project is to provide a self-hosted and easy-to-use alternative to Bridgy Fed.
It will crawl the feed (JSON Feed / Atom / RSS) to get the data instead of going through Webmention / Microformats, but the response from Fediverse will still be converted to a Webmention back to the source.
Chinese comments?
I'm learning Rust through this project, so I need some Chinese comments to help me understand it. However, I usually add English comments as well, so if you haven't seen them, feel free to open a PR!
Environments
Environment | Default (.env.example) | Remarks |
---|---|---|
DATABASE_URL |
sqlite://hatsu.sqlite3 |
|
HATSU_DOMAIN |
hatsu.local |
|
HATSU_TEST_ACCOUNT |
example.com |
Useful links
- https://github.com/LemmyNet/activitypub-federation-rust/tree/main/examples/
- https://github.com/LemmyNet/lemmy/tree/main/crates/apub/
- https://github.com/SeaQL/sea-orm/tree/master/examples/axum_example/
- https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/
License
Licensed under AGPLv3.