slack status without the slack status.zzstoatzz.io/
quickslice

remove unused lexicons and dev_utils

- removed invalid lexicon app.status.record (app is not a valid TLD)
- removed unused xyz.statusphere.status lexicon
- removed unused dev_utils.rs module
- project now only uses io.zzstoatzz.status.record (the correct NSID)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+1 -143
+1 -1
justfile
··· 1 1 watch: 2 - watchexec -w src -w templates -r cargo run 2 + cargo watch -x run -w src -w templates 3 3 4 4 dev: 5 5 SERVER_PORT=3000 cargo watch -x run -w src -w templates
-89
src/dev_utils.rs
··· 1 - use crate::db::StatusFromDb; 2 - use chrono::{Duration, Utc}; 3 - use rand::prelude::*; 4 - 5 - /// Generate dummy status data for development testing 6 - #[allow(dead_code)] 7 - pub fn generate_dummy_statuses(count: usize) -> Vec<StatusFromDb> { 8 - let mut rng = thread_rng(); 9 - let mut statuses = Vec::new(); 10 - 11 - // Sample data pools 12 - let emojis = vec![ 13 - "🚀", "💭", "☕", "🎨", "📚", "🎵", "🏃", "😴", "🍕", "💻", "🌟", "🔥", "✨", "🌙", "☀️", 14 - "🌈", "⚡", "🎯", "🎮", "📝", 15 - ]; 16 - 17 - let texts = [ 18 - Some("working on something cool"), 19 - Some("deep in flow state"), 20 - Some("taking a break"), 21 - Some("debugging..."), 22 - Some("shipping it"), 23 - None, 24 - Some("coffee time"), 25 - Some("in a meeting"), 26 - Some("focused"), 27 - None, 28 - Some("learning rust"), 29 - Some("reading docs"), 30 - ]; 31 - 32 - let handles = [ 33 - "alice.test", 34 - "bob.test", 35 - "charlie.test", 36 - "dana.test", 37 - "eve.test", 38 - "frank.test", 39 - "grace.test", 40 - "henry.test", 41 - "iris.test", 42 - "jack.test", 43 - "karen.test", 44 - "leo.test", 45 - ]; 46 - 47 - let now = Utc::now(); 48 - 49 - for i in 0..count { 50 - // Generate random timestamps going back up to 48 hours 51 - let hours_ago = rng.gen_range(0..48); 52 - let minutes_ago = rng.gen_range(0..60); 53 - let started_at = now - Duration::hours(hours_ago) - Duration::minutes(minutes_ago); 54 - 55 - // Random chance of having an expiration 56 - let expires_at = if rng.gen_bool(0.3) { 57 - // 30% chance of having expiration 58 - let expire_hours = rng.gen_range(1..24); 59 - Some(started_at + Duration::hours(expire_hours)) 60 - } else { 61 - None 62 - }; 63 - 64 - let mut status = StatusFromDb::new( 65 - format!("at://did:plc:dummy{}/xyz.statusphere.status/dummy{}", i, i), 66 - format!("did:plc:dummy{}", i % handles.len()), 67 - emojis.choose(&mut rng).unwrap().to_string(), 68 - ); 69 - 70 - status.text = texts.choose(&mut rng).unwrap().map(|s| s.to_string()); 71 - status.started_at = started_at; 72 - status.expires_at = expires_at; 73 - status.indexed_at = started_at; 74 - status.handle = Some(handles[i % handles.len()].to_string()); 75 - 76 - statuses.push(status); 77 - } 78 - 79 - // Sort by started_at desc (newest first) 80 - statuses.sort_by(|a, b| b.started_at.cmp(&a.started_at)); 81 - 82 - statuses 83 - } 84 - 85 - /// Check if dev mode is requested via query parameter 86 - #[allow(dead_code)] 87 - pub fn is_dev_mode_requested(query: &str) -> bool { 88 - query.contains("dev=true") || query.contains("dev=1") 89 - }
-3
src/lexicons/app/status.rs
··· 1 - // @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. 2 - //!Definitions for the `app.status` namespace. 3 - pub mod record;
-23
src/lexicons/app/status/record.rs
··· 1 - // @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. 2 - //!Definitions for the `app.status.record` namespace. 3 - use atrium_api::types::TryFromUnknown; 4 - #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 5 - #[serde(rename_all = "camelCase")] 6 - pub struct RecordData { 7 - ///When this status was created 8 - pub created_at: atrium_api::types::string::Datetime, 9 - ///Status emoji 10 - pub emoji: String, 11 - ///Optional expiration timestamp for this status 12 - #[serde(skip_serializing_if = "core::option::Option::is_none")] 13 - pub expires: core::option::Option<atrium_api::types::string::Datetime>, 14 - ///Optional status text description 15 - #[serde(skip_serializing_if = "core::option::Option::is_none")] 16 - pub text: core::option::Option<String>, 17 - } 18 - pub type Record = atrium_api::types::Object<RecordData>; 19 - impl From<atrium_api::types::Unknown> for RecordData { 20 - fn from(value: atrium_api::types::Unknown) -> Self { 21 - Self::try_from_unknown(value).unwrap() 22 - } 23 - }
-3
src/lexicons/xyz/statusphere.rs
··· 1 - // @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. 2 - //!Definitions for the `xyz.statusphere` namespace. 3 - pub mod status;
-23
src/lexicons/xyz/statusphere/status.rs
··· 1 - // @generated - This file is generated by esquema-codegen (forked from atrium-codegen). DO NOT EDIT. 2 - //!Definitions for the `xyz.statusphere.status` namespace. 3 - use atrium_api::types::TryFromUnknown; 4 - #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 5 - #[serde(rename_all = "camelCase")] 6 - pub struct RecordData { 7 - ///When this status was created 8 - pub created_at: atrium_api::types::string::Datetime, 9 - ///Status emoji 10 - pub emoji: String, 11 - ///Optional expiration timestamp for this status 12 - #[serde(skip_serializing_if = "core::option::Option::is_none")] 13 - pub expires: core::option::Option<atrium_api::types::string::Datetime>, 14 - ///Optional status text description 15 - #[serde(skip_serializing_if = "core::option::Option::is_none")] 16 - pub text: core::option::Option<String>, 17 - } 18 - pub type Record = atrium_api::types::Object<RecordData>; 19 - impl From<atrium_api::types::Unknown> for RecordData { 20 - fn from(value: atrium_api::types::Unknown) -> Self { 21 - Self::try_from_unknown(value).unwrap() 22 - } 23 - }
-1
src/main.rs
··· 30 30 mod api; 31 31 mod config; 32 32 mod db; 33 - mod dev_utils; 34 33 mod emoji; 35 34 mod error_handler; 36 35 mod ingester;