5 Brain Abilities — Child Assessment Platform
Paid Online Brain-Ability Assessment for Parents
5 Brain Abilities is an online assessment service from Math Monkey (Malaysia) that helps parents understand their child's five core brain abilities — Attention, Cognitive Visual, Memory, Logical Reasoning, and Processing Speed — and choose learning activities that fit. Parents sign up, verify by OTP, pay a one-time fee, add a child profile, and take the child through the assessment; a separate admin login manages the platform.
Architecture & System Design
A Laravel application with two guarded areas: a parent account area and an admin panel. Registration and password recovery are gated by emailed one-time codes, the assessment unlocks only after payment is confirmed, and each attempt is stored against a child profile so one parent can assess more than one child.
- OTP-verified signup and OTP-based password reset instead of emailed reset links
- Assessment access unlocked server-side only after a confirmed payment
- Multiple child profiles per parent account, each with its own assessment
- Separate admin login for managing users, assessments, and contact enquiries
Engineering Challenges
Gating a Paid Assessment
The assessment is the product, so it must be reachable only by parents who have paid, and a refreshed or abandoned checkout must never grant access or charge twice.
Kept payment state on the server and unlocked the assessment from the gateway's confirmation rather than from the browser redirect, with the unlock written idempotently against the parent account.
Access follows confirmed payments only, and repeat confirmations for the same payment are harmless.
Scoring Five Abilities from One Sitting
A single assessment has to produce a separate, comparable result for each of five different abilities, not one overall mark.
Tagged every question with the ability it measures and scored each ability independently as a percentage of its own maximum, so results stay comparable even when abilities have different numbers of questions.
Parents see a per-ability breakdown that shows which abilities are stronger and which need support.
Verified Accounts for an International Audience
Parents sign up from different countries, and unverified or mistyped emails would leave paid accounts unrecoverable.
Added an OTP step to signup and to password recovery, with expiring single-use codes and a country selector on the registration and contact forms.
Every paying account is tied to an email address the parent has proven they can receive mail at.
Core Features
Five-Ability Assessment
Covers Attention, Cognitive Visual, Memory, Logical Reasoning, and Processing Speed in one guided assessment.
Clean Code
1<?php23namespace App\Services;45use App\Models\AssessmentAttempt;67class AssessmentScoringService8{9 public function score(AssessmentAttempt $attempt): array10 {11 $results = $attempt->answers()12 ->with('question.ability')13 ->get()14 ->groupBy(fn ($answer) => $answer->question->ability->slug)15 ->map(function ($answers) {16 $earned = $answers->where('is_correct', true)->sum('question.weight');17 $maximum = $answers->sum('question.weight');1819 return $maximum > 0 ? round(($earned / $maximum) * 100) : 0;20 });2122 $attempt->update([23 'results' => $results,24 'completed_at' => now(),25 ]);2627 return $results->all();28 }29}