Select the types of activity you want to include in your feed.
chore: resolve typos and inconsistencies in documentation and codebase
Corrected wording in markdown files, standardized capitalization for technical terms, and replaced redundant type prefixes in code for cleaner implementation.
···1111- **Real-Time Communication:** WebSocket-based messaging for instant updates and interactions.
1212- **Content Sharing:** Support for articles, media, and text posts
1313- **Semi-decentralised:** Instances (servers) can communicate over websockets with allowlisted other instances to blend
1414- certain aspects of their respective timelines, the identification relies on the already in place DNS system and SSH
1414+ certain aspects of their respective timelines, the identification relies on the existing DNS system and on SSH
1515 keys.
1616- **Bubbles vs timelines:** While Lumina has a global timeline and one for following and mutuals, it also has 'bubbles',
1717 semi-isolated timelines you can be a member of, that sort of operate as communities for specific subjects.
+3-3
CONTRIBUTING.md
···3535- `client/` — Gleam application targeting JavaScript (bundled to browser).
3636- `mise/` — Task definitions for development flows.
3737- `data/` — Local runtime data directory (created by tasks).
3838-- Root files — Workspace-level configuration, license, docs, and Docker-related files.
3838+- Root files — Workspace-level configuration, licence, docs, and Docker-related files.
39394040---
4141···202202203203---
204204205205-## License and contributor terms
205205+## Licence and contributor terms
206206207207-By contributing, you agree that your contributions are licensed under the BSD 3-Clause License of this repository,
207207+By contributing, you agree that your contributions are licensed under the BSD 3-Clause Licence of this repository,
208208unless explicitly stated otherwise in writing.
209209210210See `LICENSE` at the repository root.
+3-3
WHY.md
···7788Few days after the Rust 2024 edition release, having new experiences with gleam Lustre and a really messy repository...
99Three great reasons for a clean slate.
1010-Git branch 25 is yet another restart for me writing on Lumina. With past experiences and a clear vision, `master` does a
1010+Git branch 25 is yet another restart for me writing on Lumina. With experiences and a clear vision, `master` does a
1111good job, so this one will do even better.
12121313### Choices made
···4040The `global` timeline, here being `00000000-0000-0000-0000-000000000000` as the only constant-assigned timeline ID. The
4141user-profiles being the same as their user id counterpart.
42424343-This is too vague to actually be able to pull a post, which is why the item forward table exists, combining a uuid and a
4343+This is too vague to actually be able to pull a post, which is why the item forward table exists, combining a UUID and a
4444string to forward to the right item.
45454646Now I say `item`, not `post` here. This because you might expect only timelines (global, userprofiles) and bubbles (
4747timelines meant for a specific subject, forming a community within the larger site) in this table, but direct message
4848threads are actually also saved here.
49495050-This means this table might become a little overcrowded, and optimisations such as caching, sharding and mirrorring to
5050+This means this table might become a little overcrowded, and optimizations such as caching, sharding and mirrorring to
5151Redis will be needed to keep it somewhat performant, especially since this is essentially a constant hot path. I am
5252aware.
5353
···11-I notice on other social media platforms that when an edit or upload had unforseen consequences, this usually results in
11+I notice on other social media platforms that when an edit or upload has unforseen consequences, this usually results in
22broken push notifications.
33Notifications that lead to a 404.
4455-Obviously, when creating a push notification for something we know nothing about this is what it is. But in Lumina these
66-notifications lead to a postview using a json string after the # in the url (url hash).
55+When creating a push notification for something we know nothing about, this is what it is. But in Lumina these
66+notifications lead to a postview using a JSON string after the # in the url (url hash).
7788-That json string can obviously just contain a post or notification id, but we generate a preview of a post, and that
99-preview should be pushed but not saved once again in the database. Instead, we add to the json object. Client holds an
1010-absolute reference to the post id, but also requests a post by both id and a part of it's preview. Lumina client should
88+That JSON string can just contain a post or notification id, but we generate a preview of a post, and that
99+preview should be pushed but not saved once again in the database. Instead, we add to the JSON object. Client holds an
1010+absolute reference to the post id, but also requests a post by both id and a part of its preview. Lumina client should
1111be smart enough to figure out what post this is even when the ID leads to a 404.
+1-1
notes/Philosophies/'Timeline carries most' and the database.md
···1919- **PostgreSQL**: The recommended database for production environments.
2020- **SQLite**: Supported for testing and development purposes.
21212222-The choice of database is configured via the `LUMINA_DB_TYPE` environment variable.
2222+The choice of a database is configured via the `LUMINA_DB_TYPE` environment variable.
23232424## Item and Content Storage
2525
+5-5
server/src/database.rs
···1616 let redis_pool: Pool<redis::Client> = {
1717 info_elog!(ev_log, "Setting up Redis connection to {}...", redis_url);
1818 let client = redis::Client::open(redis_url.clone()).map_err(LuminaError::Redis)?;
1919- r2d2::Pool::builder()
1919+ Pool::builder()
2020 .build(client)
2121 .map_err(LuminaError::R2D2Pool)
2222 }?;
···162162 // The config is also shared, so that for example the logger can set up its own connection, use this sparingly.
163163 /// The main database is a Postgres database in this variant.
164164 PgsqlConnection(
165165- (postgres::Client, tokio_postgres::Config),
166166- Pool<redis::Client>,
165165+ (Client, postgres::Config),
166166+ Pool<redis::Client>,
167167 ),
168168}
169169···268268269269// Check for timeline changes and invalidate caches accordingly (PostgreSQL)
270270async fn check_timeline_invalidations(
271271- redis_conn: &mut redis::Connection,
272272- client: &postgres::Client,
271271+ redis_conn: &mut redis::Connection,
272272+ client: &Client,
273273) -> Result<(), LuminaError> {
274274 // Get the last check timestamp
275275 let last_check: Option<String> = redis_conn.get("timeline_cache_last_check").unwrap_or(None);
···187187 DbConn::PgsqlConnection((client, _), redis_pool) => {
188188 let mut redis_conn = redis_pool.get().map_err(LuminaError::R2D2Pool)?;
189189 // fastbloom_rs expects bytes, so we use the string as bytes
190190- let email_key = format!("bloom:email");
191191- let username_key = format!("bloom:username");
190190+ let email_key = String::from("bloom:email");
191191+ let username_key = String::from("bloom:username");
192192 let email_exists: bool = redis::cmd("BF.EXISTS")
193193 .arg(&email_key)
194194 .arg(&email)