The application uses window.localStorage as a document store. Below are the key keys and their schemas.
Array of user profiles.
interface StoredUser {
email: string; // Primary Key
name: string;
role: string;
passwordHash: string; // Base64 encoded (Simulation)
lastLogin: number; // Timestamp
avatar?: string;
hasCompletedOnboarding: boolean;
}Currently active user session.
type Session = StoredUser; // Copy of user objectContent flagged for review.
interface FlaggedItem {
id: string; // UUID
user: string; // User Email
content: string; // The flagged text
reason: 'Hate Speech' | 'Spam' | ...;
severity: 'Low' | 'Medium' | 'High';
timestamp: number;
status: 'Pending' | 'Approved' | 'Rejected';
}Immutable log of moderation actions.
interface AuditLogEntry {
id: string;
itemId: string; // Reference to FlaggedItem.id
adminId: string; // Actor
action: 'Approved' | 'Rejected' | 'PII_MASKED';
timestamp: number;
}Since this is a client-side store, schema changes require defensive coding (e.g., optional chaining ?.) in the service layer. No automatic migration runner is currently implemented.