Changelog
Every feature, fix and improvement to BrainHub — documented in detail.
A focused quality-of-life update shipping a fully playable 100-question quiz system, a motivational quotes carousel, Supabase user accounts, service worker reliability improvements, critical JavaScript bug fixes, and multilingual support across every page.
/pages/quizzes.html with 100 real academic questions across 5 categories: Biology, Chemistry, Mathematics, Physics, and General Knowledge (20 questions each). Features a category picker, animated progress bar, instant answer feedback with explanations, a streak counter that activates after 3 correct answers in a row, a final results screen with grade and emoji, and XP awards on correct answers and quiz completion.
src/supabase.js. Supports email/password sign-up and Google OAuth. User profiles, progress, bookmarks, and XP are synced to a PostgreSQL database (Supabase) on login and every 5 minutes. Includes a dedicated /welcome.html with sign-in, sign-up, password reset, and update password flows. Navbar dynamically shows Sign In or avatar based on session state.
/pages/analytics.html showing study statistics, XP history, session data, and usage patterns for logged-in users.
main.js at line 564 contained literal newline characters embedded inside a regex literal, causing a SyntaxError: Invalid regular expression that crashed JavaScript entirely on every page load. This prevented all cards, the weekly challenge, the chatbot, and all dynamic content from rendering. Fixed by replacing the regex with proper escape sequences (/\n\n/g).
transition: background-color, border-color, color rule added for theme switching was overriding .flashcard-inner's transform transition, causing the card to invert the question face rather than flip to the answer. Fixed by explicitly restoring transition: transform 0.55s cubic-bezier(...) on .flashcard-inner with !important and disabling conflicting transitions on .flashcard-front and .flashcard-back.
initStudyChallenge(), but the IntersectionObserver in initScrollReveal() runs earlier and never observes the newly inserted element. The widget was stuck at opacity: 0 indefinitely. Fixed by removing the reveal class from the dynamically injected widget and forcing opacity: 1 immediately after injection.
max_tokens in the Cloudflare Worker AI call was set to 1000, truncating longer explanations. Raised to 4000.
**bold**, ## headings, and --- table separators displayed as raw text. Fixed by updating the system prompt to instruct the model to respond in clean HTML only, and adding a renderChatContent() function that renders HTML directly with a markdown fallback converter.
brainhub-v4. JavaScript and CSS files now use a network-first strategy instead of cache-first, ensuring code changes always take effect immediately without requiring a hard refresh (Ctrl+Shift+R). HTML pages remain network-first with cache fallback. Images and fonts remain cache-first for performance.
The biggest BrainHub update yet. Introduces a full global search engine, a gamification system with XP and badges, a personal profile page, major dark mode improvements, accessibility upgrades, and performance optimisations across the board.
Workspace-Fix/pages/search.html. Supports live filtering by type (Courses, Notes, Past Papers, Flashcards, Pages), keyword highlighting, recent search history, popular shortcuts, and URL query params.gamification.js awards XP for page visits, opening resources, completing docs, sharing, searching and weekly challenges. Includes 6 levels (Freshman → BrainHub Pro) and 12 unlockable badges./pages/profile.html with full XP breakdown, streak tracking, badge gallery (earned vs locked), level roadmap, XP activity log, and progress reset.prefers-reduced-motion support disables all animations for users who need it.contain: layout style to cards and result items to reduce repaint scope and improve scroll performance.will-change: transform, opacity added to animated elements. Automatically removed after animation completes to free GPU memory.backdrop-filter: blur(12px)) added to navbar background.Professional and standout features — mobile bottom navigation, keyboard shortcuts, weekly study challenge, resource suggestion, completion certificates, and "students also viewed" recommendations.
K search, T theme, C chat, P timer, ? shortcuts panel, G+H/U/F/Q navigate, Esc close all.Major feature expansion adding AI tutoring, PDF viewing, PWA support, SEO, progress tracking, bookmarks, social sharing, newsletter, and a 404 page.
localStorage.localStorage.manifest.json, service worker with cache-first strategy, offline fallback, install prompt banner. BrainHub is installable on Android and desktop.sitemap.xml, robots.txt, canonical URLs added to all pages.Initial public launch of BrainHub. A free, no-login university study platform for Zambian students, starting with CBU Natural Sciences resources.
localStorage.🚀 What's coming next
Features currently in development or planned for future releases.