Stellwerk is meant to become a proof of concept social media site where instead of algorithms, users decide what appears on their feeds.
In the wake of Twitter's fall from grace, some new social media platforms have gained traction. But frustratingly, these platforms adopt many "twitterisms", mechanics that in our opinion obstruct community building. Instead, we want to borrow some community-building and community-finding ideas from elsewhere, for example from Tumblr with a strong tagging and reblog-style comment system.
We oppose algorithmic feeds and instead want to give more tools to users to customise their feeds while keeping them deterministic and predictable. Ensuring independence from commercial interests is also important to us, and we would love to get federation working.
Some scaffolding for the backend is there, but no real functionality is implemented yet.
The project is organised on the codeblr Discord server. Feel free to join if you want to contribute or are just curious about the project.
This project is in an extremely early stage and none of the architecture is completely set in stone.
For the time being, the most basic planned architecture is:
architecture-beta
group backend[Backend]
group frontend[Frontend]
service db(database)[Database] in backend
service api(server)[REST API] in backend
service web(server)[Web server] in frontend
db:L -- R:api
web:L -- R:api
The REST API could be public.
The frontend does not exist yet and technologies for the frontend are not decided yet.
The REST API server stellwerk-api is written in Rust (nigthly for fun) with Axum.
The database connection between api and the db is achieved with stellwerk-db.
The database is PostgreSQL and the whole thing can be coordinated using Docker.
The project uses Twitter snowflakes.
See the Discord developer docs for an explanation.
The Id<Marker> type is a type checked StellwerkSnowflake.
Its only purpose is to ensure that, for example, a user id is not accidentally used where a post id is asked for.
- Install Docker.
- Create a directory
docker/Secretswith filesPOSTGRES_USER.txt,POSTGRES_PASSWORD.txt,POSTGRES_DB.txt. The user and password files should contain the name and password your postgres user should have. The contents of the db file will be the name of the database, for examplestellwerk. - Create the env file
docker/stellwerk-api/.env. - Run
docker compose --file docker/docker-compose.dev.yml up --build. Changes to thestellwerk-frontendare applied automatically. To apply changes tostellwerk-api, you can rundocker compose --file docker/docker-compose.dev.yml up --build stellwerk-api.
- Install PostgreSQL and create a PostgreSQL database
- Install rust (nightly).
- Create the env file
stellwerk-api/.env - cd into
stellwerk-api - Run
cargo run - cd into
stellwerk-frontend - Run
npm run dev
SERVER_ADDRESS=127.0.0.1
SERVER_PORT=8080
DATABASE_URL=postgres://postgresuser:postgrespw@127.0.0.1/postgresdb
WORKER_ID=0
PROCESS_ID=0