feat: database-first refactor, unified architecture and visual developer manual

Summary of changes:
- Consolidated Studio+CMS and Experience+LMS into unified services.
- Moved core business logic (enrollment, grading, auth) to PostgreSQL functions.
- Implemented advanced auditing via DB triggers and session context.
- Added gamification (XP/Levels/Leaderboards) and logic encapsulation.
- Updated installation/diagnostic scripts for the new architecture.
- Created a comprehensive Visual Developer Manual in README.md with hardware scaling.
This commit is contained in:
2026-01-11 02:34:23 -03:00
parent a19da8de76
commit b1eb23926e
42 changed files with 2661 additions and 588 deletions
+30
View File
@@ -185,6 +185,36 @@ pub struct LessonAnalytics {
pub average_score: f32, // 0.0-1.0
pub submission_count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize, sqlx::FromRow)]
pub struct CohortData {
pub period: String,
pub count: i64,
pub completion_rate: f32,
}
#[derive(Debug, Clone, Serialize, Deserialize, sqlx::FromRow)]
pub struct RetentionData {
pub lesson_id: Uuid,
pub lesson_title: String,
pub student_count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AdvancedAnalytics {
pub cohorts: Vec<CohortData>,
pub retention: Vec<RetentionData>,
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
pub struct Webhook {
pub id: Uuid,
pub organization_id: Uuid,
pub url: String,
pub events: Vec<String>,
pub secret: Option<String>,
pub is_active: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
#[cfg(test)]
mod tests {