···11-//// Lumina > Server > Client Communication
22-//// This module handles communication between the Lumina server and its clients
33-//// over WebSockets. It defines the message formats, handles incoming messages,
44-//// and sends appropriate responses back to the clients.
55-////
66-//// For future clients that might not be web-based, this module is designed to be
77-//// extensible and adaptable to different client types.
88-//// It might for example be expanded to also feature a REST API for clients that
99-//// cannot use WebSockets.
11+//! Lumina > Server > Client Communication
22+//!
33+//! This module handles communication between the Lumina server and its clients
44+//! over WebSockets. It defines the message formats, handles incoming messages,
55+//! and sends appropriate responses back to the clients.
66+//!
77+//! For future clients that might not be web-based, this module is designed to be
88+//! extensible and adaptable to different client types.
99+//! It might for example be expanded to also feature a REST API for clients that
1010+//! cannot use WebSockets.
10111112/*
1213 * Lumina/Peonies
+4-6
server/src/database.rs
···11-//// Lumina > Server > Database
22-//// Database management and connection pooling module.
11+//! Lumina > Server > Database
22+//!
33+//! Database management and connection pooling module.
3445/*
56 * Lumina/Peonies
···156157 .query(&mut *redis_conn)
157158 .map_err(LuminaError::Redis)?;
158159 }
159159- info_elog!(
160160- ev_log,
161161- "Bloom filters populated from PostgreSQL.",
162162- );
160160+ info_elog!(ev_log, "Bloom filters populated from PostgreSQL.",);
163161 };
164162 let conn_clone = conn_two.0;
165163 let pg_config_clone = pg_config.clone();
+3-2
server/src/errors.rs
···11-//// Lumina > Server > Errors
22-//// This module defines custom error types used throughout the server.
11+//! Lumina > Server > Errors
22+//!
33+//! This module defines custom error types used throughout the server.
3445/*
56 * Lumina/Peonies
+7-6
server/src/helpers/events.rs
···11-//// Lumina > Server > Helpers > Events
22-//// This module provides an event logging utility that logs messages to stdout
33-//// with colored prefixes and optionally logs them to a database.
44-////
55-//// This helps increase consistency in logging throughout the server codebase, centralises it, and
66-//// improves readability and distinctability with its colored output.
11+//! Lumina > Server > Helpers > Events
22+//!
33+//! This module provides an event logging utility that logs messages to stdout
44+//! with colored prefixes and optionally logs them to a database.
55+//!
66+//! This helps increase consistency in logging throughout the server codebase, centralises it, and
77+//! improves readability and distinctability with its colored output.
78/*
89 * Lumina/Peonies
910 * Copyright (C) 2018-2026 MLC 'Strawmelonjuice' Bloeiman and contributors.
+4-3
server/src/helpers/mod.rs
···11-//// Lumina > Server > Helpers
22-//// Shared helper functions and utilities for the server.
11+//! Lumina > Server > Helpers
22+//!
33+//! Shared helper functions and utilities for the server.
3445/*
56 * Lumina/Peonies
···1920 * along with this program. If not, see <https://www.gnu.org/licenses/>.
2021 */
2122/// Shared helper functions and utilities for the server.
2222-pub mod events;2323+pub mod events;
+6-7
server/src/main.rs
···11-//// Lumina > Server
22-////
33-//// The main entrypoint for the Lumina server-side, reaching out to other modules to compose
44-//// the full server functionality including database connections, webserver, websockets, CLI
55-//// commands, and more.
11+//! Lumina > Server
22+//!
33+//! The main entrypoint for the Lumina server-side, reaching out to other modules to compose
44+//! the full server functionality including database connections, webserver, websockets, CLI
55+//! commands, and more.
6677/*
88 * Lumina/Peonies
···3535use helpers::events::EventLogger;
3636use rocket::config::LogLevel;
3737use std::io::ErrorKind;
3838-use std::{net::IpAddr, path, process, sync::Arc};
3838+use std::{net::IpAddr, process, sync::Arc};
3939use tokio::sync::Mutex;
4040use uuid::Uuid;
4141mod user;
···4949 port: u16,
5050 host: IpAddr,
5151}
5252-5352use crate::errors::LuminaError;
5453use cynthia_con::{CynthiaColors, CynthiaStyles};
5554use dotenv::dotenv;
+3-2
server/src/rate_limiter.rs
···11-//// Lumina > Server > Rate Limiter
22-//// This module implements a simple rate limiter using a token bucket algorithm.
11+//! Lumina > Server > Rate Limiter
22+//!
33+//! This module implements a simple rate limiter using a token bucket algorithm.
3445/*
56 * Lumina/Peonies
+3-2
server/src/staticroutes.rs
···11-//// Lumina > Server > Static Routes
22-//// This module defines static routes for serving static files like CSS, JS, and images.
11+//! Lumina > Server > Static Routes
22+//!
33+//! This module defines static routes for serving static files like CSS, JS, and images.
3445/*
56 * Lumina/Peonies
+3-2
server/src/timeline.rs
···11-//// Lumina > Server > Posts > Timeline
22-//// Timeline management module for posts.
11+//! Lumina > Server > Posts > Timeline
22+//!
33+//! Timeline management module for posts.
3445/*
56 * Lumina/Peonies
+5-4
server/src/user.rs
···11-//// Lumina > Server > Users
22-//// User management module, including user struct and database interactions.
11+//! Lumina > Server > Users
22+//!
33+//! User management module, including user struct and database interactions.
34/*
45 * Lumina/Peonies
56 * Copyright (C) 2018-2026 MLC 'Strawmelonjuice' Bloeiman and contributors.
···2122use crate::{
2223 LuminaError,
2324 database::DbConn,
2424- helpers::{self, events::EventLogger}, info_elog,
2525+ helpers::{self, events::EventLogger},
2626+ info_elog,
2527};
2628use cynthia_con::CynthiaColors;
2729use std::str::FromStr;
···151153 db: &DbConn,
152154 ev_log: EventLogger,
153155 ) -> Result<(SessionReference, User), LuminaError> {
154154-155156 let user = self;
156157 let user_id = user.id;
157158 match db {