For now? I'm experimenting on an old concept.
1
fork

Configure Feed

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.

+30 -30
+1 -1
ABOUT.md
··· 11 11 - **Real-Time Communication:** WebSocket-based messaging for instant updates and interactions. 12 12 - **Content Sharing:** Support for articles, media, and text posts 13 13 - **Semi-decentralised:** Instances (servers) can communicate over websockets with allowlisted other instances to blend 14 - certain aspects of their respective timelines, the identification relies on the already in place DNS system and SSH 14 + certain aspects of their respective timelines, the identification relies on the existing DNS system and on SSH 15 15 keys. 16 16 - **Bubbles vs timelines:** While Lumina has a global timeline and one for following and mutuals, it also has 'bubbles', 17 17 semi-isolated timelines you can be a member of, that sort of operate as communities for specific subjects.
+3 -3
CONTRIBUTING.md
··· 35 35 - `client/` — Gleam application targeting JavaScript (bundled to browser). 36 36 - `mise/` — Task definitions for development flows. 37 37 - `data/` — Local runtime data directory (created by tasks). 38 - - Root files — Workspace-level configuration, license, docs, and Docker-related files. 38 + - Root files — Workspace-level configuration, licence, docs, and Docker-related files. 39 39 40 40 --- 41 41 ··· 202 202 203 203 --- 204 204 205 - ## License and contributor terms 205 + ## Licence and contributor terms 206 206 207 - By contributing, you agree that your contributions are licensed under the BSD 3-Clause License of this repository, 207 + By contributing, you agree that your contributions are licensed under the BSD 3-Clause Licence of this repository, 208 208 unless explicitly stated otherwise in writing. 209 209 210 210 See `LICENSE` at the repository root.
+3 -3
WHY.md
··· 7 7 8 8 Few days after the Rust 2024 edition release, having new experiences with gleam Lustre and a really messy repository... 9 9 Three great reasons for a clean slate. 10 - Git branch 25 is yet another restart for me writing on Lumina. With past experiences and a clear vision, `master` does a 10 + Git branch 25 is yet another restart for me writing on Lumina. With experiences and a clear vision, `master` does a 11 11 good job, so this one will do even better. 12 12 13 13 ### Choices made ··· 40 40 The `global` timeline, here being `00000000-0000-0000-0000-000000000000` as the only constant-assigned timeline ID. The 41 41 user-profiles being the same as their user id counterpart. 42 42 43 - 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 43 + 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 44 44 string to forward to the right item. 45 45 46 46 Now I say `item`, not `post` here. This because you might expect only timelines (global, userprofiles) and bubbles ( 47 47 timelines meant for a specific subject, forming a community within the larger site) in this table, but direct message 48 48 threads are actually also saved here. 49 49 50 - This means this table might become a little overcrowded, and optimisations such as caching, sharding and mirrorring to 50 + This means this table might become a little overcrowded, and optimizations such as caching, sharding and mirrorring to 51 51 Redis will be needed to keep it somewhat performant, especially since this is essentially a constant hot path. I am 52 52 aware. 53 53
+6 -6
notes/Approaches/Future concepts/Push notifications/push notification resolve links.md
··· 1 - I notice on other social media platforms that when an edit or upload had unforseen consequences, this usually results in 1 + I notice on other social media platforms that when an edit or upload has unforseen consequences, this usually results in 2 2 broken push notifications. 3 3 Notifications that lead to a 404. 4 4 5 - Obviously, when creating a push notification for something we know nothing about this is what it is. But in Lumina these 6 - notifications lead to a postview using a json string after the # in the url (url hash). 5 + When creating a push notification for something we know nothing about, this is what it is. But in Lumina these 6 + notifications lead to a postview using a JSON string after the # in the url (url hash). 7 7 8 - That json string can obviously just contain a post or notification id, but we generate a preview of a post, and that 9 - preview should be pushed but not saved once again in the database. Instead, we add to the json object. Client holds an 10 - absolute reference to the post id, but also requests a post by both id and a part of it's preview. Lumina client should 8 + That JSON string can just contain a post or notification id, but we generate a preview of a post, and that 9 + preview should be pushed but not saved once again in the database. Instead, we add to the JSON object. Client holds an 10 + absolute reference to the post id, but also requests a post by both id and a part of its preview. Lumina client should 11 11 be 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
··· 19 19 - **PostgreSQL**: The recommended database for production environments. 20 20 - **SQLite**: Supported for testing and development purposes. 21 21 22 - The choice of database is configured via the `LUMINA_DB_TYPE` environment variable. 22 + The choice of a database is configured via the `LUMINA_DB_TYPE` environment variable. 23 23 24 24 ## Item and Content Storage 25 25
+5 -5
server/src/database.rs
··· 16 16 let redis_pool: Pool<redis::Client> = { 17 17 info_elog!(ev_log, "Setting up Redis connection to {}...", redis_url); 18 18 let client = redis::Client::open(redis_url.clone()).map_err(LuminaError::Redis)?; 19 - r2d2::Pool::builder() 19 + Pool::builder() 20 20 .build(client) 21 21 .map_err(LuminaError::R2D2Pool) 22 22 }?; ··· 162 162 // The config is also shared, so that for example the logger can set up its own connection, use this sparingly. 163 163 /// The main database is a Postgres database in this variant. 164 164 PgsqlConnection( 165 - (postgres::Client, tokio_postgres::Config), 166 - Pool<redis::Client>, 165 + (Client, postgres::Config), 166 + Pool<redis::Client>, 167 167 ), 168 168 } 169 169 ··· 268 268 269 269 // Check for timeline changes and invalidate caches accordingly (PostgreSQL) 270 270 async fn check_timeline_invalidations( 271 - redis_conn: &mut redis::Connection, 272 - client: &postgres::Client, 271 + redis_conn: &mut redis::Connection, 272 + client: &Client, 273 273 ) -> Result<(), LuminaError> { 274 274 // Get the last check timestamp 275 275 let last_check: Option<String> = redis_conn.get("timeline_cache_last_check").unwrap_or(None);
+8 -8
server/src/helpers/mod.rs
··· 5 5 /// Message prefixes for different types of messages. 6 6 /// Usage: `let (info, warn, error, success, failure, log, incoming, registrationerror) = message_prefixes();` 7 7 pub fn message_prefixes() -> ( 8 - std::string::String, 9 - std::string::String, 10 - std::string::String, 11 - std::string::String, 12 - std::string::String, 13 - std::string::String, 14 - std::string::String, 15 - std::string::String, 8 + String, 9 + String, 10 + String, 11 + String, 12 + String, 13 + String, 14 + String, 15 + String, 16 16 ) { 17 17 let info = "[INFO]".color_green().style_bold(); 18 18 let warn = "[WARN]".color_yellow().style_bold();
+1 -1
server/src/timeline.rs
··· 260 260 timeline_name: &str, 261 261 user: user::User, 262 262 page: Option<usize>, 263 - ) -> Result<(uuid::Uuid, Vec<String>, usize, bool), LuminaError> { 263 + ) -> Result<(Uuid, Vec<String>, usize, bool), LuminaError> { 264 264 info_elog!( 265 265 event_logger, 266 266 "Fetching timeline '{}' for user '{}'",
+2 -2
server/src/user.rs
··· 187 187 DbConn::PgsqlConnection((client, _), redis_pool) => { 188 188 let mut redis_conn = redis_pool.get().map_err(LuminaError::R2D2Pool)?; 189 189 // fastbloom_rs expects bytes, so we use the string as bytes 190 - let email_key = format!("bloom:email"); 191 - let username_key = format!("bloom:username"); 190 + let email_key = String::from("bloom:email"); 191 + let username_key = String::from("bloom:username"); 192 192 let email_exists: bool = redis::cmd("BF.EXISTS") 193 193 .arg(&email_key) 194 194 .arg(&email)