Skip to content

Start Here

Documentation snapshot

FieldValue
Repositorymr-himanshuyadav/brutal-learning
Branch inspectedmain
Commit1775c9507205f3c00344a5deed52c61a56acda0f
Snapshot date2026-08-31
Plugin header version4.2.2
Runtime Plugin::$version3.5.1
PHP>= 7.4
WordPress>= 5.8

The version mismatch is a confirmed implementation detail and should not be normalized in documentation: the plugin header reports 4.2.2 while includes/Plugin.php defines its runtime version as 3.5.1. See Architecture Notes.

What Brutal Learning actually is

Brutal Learning is a WordPress plugin whose current implementation combines a question bank, hierarchical custom taxonomy system, authenticated REST API, WordPress AJAX web application, practice/session engine, configurable test builder, course delivery/progress tracking, paid-access entitlements through WooCommerce, analytics/mastery state, reporting, notifications, backups and administrative tooling.

The important architectural fact is that this is not a single persistence model. WordPress posts/postmeta are used for selected content objects (bl_course, bl_plan, bl_test), while most domain state is stored in custom tables exposed by Tables, and some user state is compressed into JSON columns in the user vault.

The ten-minute mental model

The key reusable design pattern is thin transport adapters around shared business logic. REST controllers and AJAX handlers generally dispatch into Practice_Manager, Session_Manager, Course_Manager, database classes and utility managers instead of implementing separate domain rules.

Where things live

ConcernMain implementationNotes
Plugin bootstrapbrutal-learning.php, includes/Plugin.phpComposer bootstrap, singleton, hooks
Activation/schemaincludes/Activator.phpCreates custom tables/FKs/default taxonomies/cron
Core DB namingincludes/Database/Tables.phpCanonical qp_ table names
Questionsincludes/Database/Questions_DB.php, includes/Admin/Views/Question_Editor_Page.phpGroup/question/option persistence
Practiceincludes/Modules/Practice/Practice_Manager.php, includes/Ajax/Practice_Ajax.php, includes/Rest_Api/PracticeController.phpMultiple practice modes
Sessionsincludes/Modules/Session/Session_Manager.php, includes/Ajax/Session_Ajax.php, includes/Rest_Api/SessionController.phpLifecycle/finalization
Testsincludes/Admin/Meta_Boxes.php, assets/js/test-editor.jsJSON schema V2 builder
Coursesincludes/Modules/Course/Course_Manager.php, includes/Admin/Meta_Boxes.php, assets/js/course-editor.jsCPT + custom relational structure
Accessincludes/Utils/User_Access.php, includes/Utils/Vault_Manager.phpScope, entitlements, course permissions
Authenticationincludes/Rest_Api/AuthController.php, includes/Modules/Auth/*JWT + server-side auth sessions + OTP
RESTincludes/Rest_Api/Router.phpnamespace brutallearning/v1
Adminincludes/Admin/*WordPress admin pages and forms
Frontendincludes/Frontend/*, assets/js/*, assets/css/*, templates/*Shortcode-driven UI
WooCommerceincludes/Integrations/WooCommerce_Integration.phpPlans/products → user entitlements
Analytics/masteryincludes/Utils/Analytics_Manager.php, Mastery_Engine.php, Vault_Manager.phpAggregate stats, streaks, SRS/Elo-like calculations
Reportsincludes/Database/Reports_DB.php, includes/Rest_Api/ReportsController.phpState-machine workflow
Backup/restoreincludes/Admin/Backup/Backup_Manager.phpZIP + JSON + media/CPT data

Task-oriented entry points

I want to…Start here
Change plugin startupincludes/Plugin.php
Change question editingincludes/Admin/Views/Question_Editor_Page.php, assets/js/question-editor.js
Change quick editincludes/Admin/Views/Questions_List_Table.php, assets/js/quick-edit.js
Change practice selectionincludes/Modules/Practice/Practice_Manager.php
Change attempt gradingincludes/Modules/Practice/Attempt_Evaluator.php, includes/Modules/Session/Session_Manager.php
Change test configurationincludes/Admin/Meta_Boxes.php, assets/js/test-editor.js
Change course structureincludes/Admin/Meta_Boxes.php, assets/js/course-editor.js, includes/Modules/Course/Course_Manager.php
Change permissions/access scopeincludes/Utils/User_Access.php, includes/Utils/Vault_Manager.php
Change JWT/OTP loginincludes/Rest_Api/AuthController.php, includes/Modules/Auth/*
Change the mobile APIincludes/Rest_Api/Router.php + corresponding Controller
Change web AJAX behaviorincludes/Ajax/*, includes/Plugin.php, relevant JS
Change course purchase/entitlement behaviorincludes/Integrations/WooCommerce_Integration.php, includes/Utils/User_Access.php
Change dashboard dataincludes/Utils/Dashboard_Manager.php, includes/Rest_Api/DataController.php, assets/js/dashboard.js
Change backup/restoreincludes/Admin/Backup/Backup_Manager.php, assets/js/backup-restore.js
Change global settingsincludes/Admin/Views/Settings_Page.php
Change REST secretincludes/Admin/Views/Api_Settings_Page.php

First development task

For a small feature, trace the entire chain before editing:

UI element → JS event → AJAX/REST route → controller/handler → domain manager → DB/table → response → UI state.

For persistence changes also trace activation/migration, restore, deletion and any scheduled recalculation that touches the same entity.

Evidence policy

This portal intentionally does not treat class names, comments or filenames as behavioral proof. Significant implementation claims are tied to the source files that were inspected. Where the repository contains contradictory or migration-era code, the contradiction is called out instead of silently choosing one interpretation.

Implementation-verified documentation for the inspected repository revision.