Workshop Overview

Think & Speak Platform
Technical Architecture Workshop

🏗️ Architecture Foundation

The platform employs a modern, component-based frontend built on React with Next.js, utilizing CSS Modules (.module.scss) for scoped, maintainable styling. The pageComponents/ directory structure isolates page-level components from shared UI elements, enabling independent feature development without style conflicts between the login portal and core learning modules.

🎯 Multi-Role Ecosystem

The architecture serves both teacher and student accounts with distinct interface requirements. CSS Modules prevent authentication-specific styling — mascot positioning, age-selection buttons, responsive form layouts — from leaking into Dashboard, Course Adventure, Vocabulary Builder, or Live Translation features. This encapsulation is critical for educational software where interface clarity directly impacts learning outcomes.

20
Mascot Variants
8
Assessment Dimensions
3
Languages (EN/ZH-C/ZH-T)
5
Age Groups (6→18+)

🔑 Key Takeaway: Every technical decision — from CSS Modules to mascot state management — serves the pedagogical promise: understanding learners before learning begins.

Visual Identity System

Mascot Character System:
20 Functional Variants

🔵 Blue Characters (Analytical & Literacy)

🔍
Detective + Magnifying Glass
Exam Simulation Mode — textual analysis for HKDSE preparation
📖
Reading Book + A-Z + 💡
Vocabulary Collection & Read & Speak modules
📋
Glasses + Magnifying Glass
Teacher Dashboard — Live Learning Feedback & Heatmap
💪
Crossed Arms
Confidence/Completion State — mastery achieved

🟢🟠🟡🟣 Other Persona Colors

Green = Media & Active
Orange = Communication
Yellow = Creative & STEM
Purple = Exploration
🟢 Green — Live Translation & VR Training

Image 1 (🎧+🎤+🎬): Headphones + Microphone + Film Reel represents Live Translation and Conversation Role Play modules, indicating active listening/speaking modes with video content integration.

Image 6 (🥽+🎮): VR Goggles + Controller indicates immersive scenario training for virtual presentation and debate environments.

Image 10 (🎧+🪙): Headphones + Coin represents the Gamification Layer and Vocabulary Builder with in-platform currency/point systems.

🟠 Orange — Communication & Global

Image 8 (🌍+🏢): Globe + Building represents the global classroom aspect of Live Translation supporting multilingual classrooms and international Group Discussion.

Image 10 Podium variant: Public Speaking & Debate specialization for Think & Speak Speech & Debate Course Adventure in structured academic speaking contexts.

💔 Emotional State — Struggling Learner (Image 14)

The shy, seated blue character represents the "Struggling Learner State" — triggered when the AI Coach detects hesitation during speaking modules. This mascot appears alongside speech bubbles after failed authentication attempts, providing empathetic feedback that reduces anxiety through non-verbal reassurance. Aligned with Krashen's Affective Filter theory.

Color Psychology System

Age-Based Theming:
Cognitive Development Color Architecture

6–8 Years
Warm yellow-orange. Concrete thinking & curiosity-driven foundations
9–11 Years
Balanced teal. Growing cognitive abilities
12–14 Years
Cool blue. Systematic learning approaches
15–17 Years
Energetic orange. DSE preparation readiness
18+ Years
Deep orange. Academic focus & professional contexts

Implementation Architecture

SCSS Variables & data-age-group Selectors
$age-primary-6-8: #FFB347;
$age-primary-9-11: #4ECDC4;
$age-primary-12-14: #45B7D1;
$age-secondary-15-17: #FFA94D;
$age-adult-18: #FF8C42;

// Cascaded via data-age-group attribute
[data-age-group="9-11"] { --accent: #4ECDC4; }
[data-age-group="12-14"] { --accent: #45B7D1; }

CSS custom properties cascade throughout the interface. When a student selects "Age 9–11" during assessment, the entire interface shifts to teal theming — form borders, button hovers, mascot halos, and Live Translation cohort indicators all adopt the age-group color.

Cross-Feature Continuity

How Colors Extend to Live Translation & Dashboard

The age-group color system extends to Live Translation cohort indicators where color coding helps students instantly identify their assigned learning cohort during real-time sessions.

The same color system applies to heatmap indicators and engagement tracking visualizations throughout the Dashboard, maintaining visual cohesion from authentication through Course Adventure progression.

The [data-age-group] attribute selectors ensure that a 9-year-old encountering the login page experiences consistent teal accents, while a 17-year-old receives orange-tinted UI elements appropriate for DSE exam preparation.

Conversational UI

Speech Bubble Architecture &
Multilingual Typography Engineering

💬 Speech Bubble Design System

Bubble Styling — border-radius, drop-shadow, tails
border-radius: 24px;
filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
padding: 24px 32px;
// Directional tails via CSS clip-path or ::after
// ::after { content:''; clip-path: polygon(...); }

White rounded-rectangle containers implement conversational UI patterns supporting dynamic welcome messages and contextual help. Directional tails pointing toward the mascot use CSS clip-path or ::after pseudo-elements, allowing JavaScript to dynamically reposition tails based on mascot location within the viewport.

Multilingual Container Flexibility

Generous padding and min-height specifications ensure CJK character sets (Mandarin and Cantonese) with greater line-height requirements render without visual containment breakage. Line-height values are inflated to 1.6–1.8 for CJK glyph vertical complexity.

The [dir="rtl"] qualifications and logical CSS properties (margin-inline-start rather than margin-left) future-proof for potential Arabic or Hebrew language support.

🔤 Font Engineering for Trilingual Support

CJK Font Stack — Noto Sans CJK rendering
font-family: system-ui, -apple-system, "Segoe UI",
  Roboto, "Helvetica Neue", Arial,
  "Noto Sans", "Noto Sans CJK SC",
  "Noto Sans CJK TC", sans-serif;

Comprehensive font stack ensuring optimal Chinese character rendering across all supported browsers and operating systems. Fluid typography using rem units and clamp() functions ensures that when grandparents assist primary students with login (common in Hong Kong family structures), the interface remains readable at higher zoom levels without breaking mascot-inclusive layouts.

Interface Language Toggle — English ↔ Mandarin ↔ Cantonese

.languageToggle positioned absolutely within login containers allows interface language switching without page reloads. CSS transitions morph button shapes and flag indicators. The auto-routing is intelligent: English defaults to Cantonese translation, while both Chinese inputs route to English — reflecting the primary use case of supporting English language acquisition for Chinese native speakers.

Assessment System

8-Dimension Learner Profiling
& Iframe Sandboxing Architecture

📝 The 8 Assessment Dimensions

  • 1 Age Groups: 6–8, 9–11, 12–14, 15–17, 18+ — Adapts content delivery & interface complexity
  • 2 Gender Preferences: Avatar and content theme customization
  • 3 Interest Topics: 11 categories (Space & Science, Animals, Sports, Technology, etc.)
  • 4 Learning Personas: 9 types (Debate Hero, Story Explorer, Game Master, etc.)
  • 5 Motivation Factors: 8 categories (Travel, Career Goals, HKDSE Prep, etc.)
  • 6 Learning Styles: 8 methods (Games, Stories, Speak & Act, etc.)
  • 7 Proficiency Levels: 1–10 scale with detailed descriptors
  • 8 Curious Subjects: 22 academic topics including HKDSE-relevant areas

🔒 Iframe Sandboxing Architecture

Secure Cross-Origin Communication via postMessage
${origin}/english-assessment/form/${selectedLevel}/${selectedFormId}.html
t: btoa(token) // Base64-encoded JWT
env: process.env.NEXT_PUBLIC_ENV

// Bi-directional message validation
window.addEventListener('message', handleMessage)
// Payload: { englishAssessment: { selectedLevelId, formData } }

Assessment content is embedded via iframe with encrypted authentication tokens. The postMessage API enables secure cross-origin communication while maintaining strict origin checking — preventing XSS injection of false assessment results. This architecture means assessment content can be updated without redeploying the main application.

Progressive Disclosure: Welcome → Assessment → Results

The "Welcome → Assessment → Results" flow uses React useState for isDialogOpen boolean, featuring a mascot-driven narrative (blue "Go For It" mascot) that psychologically prepares learners and reduces test anxiety per Krashen's Affective Filter theory. The getMascotByScore utility maps percentage scores to emotional mascot responses.

Emotional Intelligence

Mascot State Machine &
Emotional Feedback Design

😟
Worried / Contemplative
Appears after failed auth attempts. Empathetic visual feedback reduces anxiety. Shows "difficulty is normal."
😴
Sleepy / Relaxed
Triggers during late study sessions via client-side time API. Gently suggests break reminders proactively.
🎉
Celebratory
Appears upon achievements, login streaks, and milestones. Scale(1.1) + brightness(1.2) animation for reward.
😲
Surprised / Shouting
Expresses unexpected events with dynamic feedback. Maintains friendly personality during error states.

CSS State Classes

.mascot-state--frustrated { /* after failed attempt */ }
.mascot-state--tired { /* late-night detection */ }
.mascot-state--celebrating { /* milestone achieved */ }
.mascot-state--thinking { /* assessment processing */ }

// Dynamic swap based on patterns or time-of-day
// 15-second safety timeout for dead air

Krashen's Affective Filter Theory

The AI Coach philosophy centers on personalized emotional support — understanding not just what the learner knows, but how they feel about learning. The worried mascot appears alongside speech bubbles after failed authentication, reducing frustration through empathetic feedback.

The sleepy mascot demonstrates proactive wellness management: detected via client-side time APIs, it gently suggests break reminders before users even access the Dashboard — potentially reducing study fatigue and eye strain during HKDSE preparation.

Gateway Architecture

Login SCSS Architecture:
Security UX & Multi-Role Authentication

🔐 Visual Encryption Feedback

Environment-Specific Visual Cues (Prod vs UAT)

Production (https://app.thinkandspeak.com) uses vibrant growth themes while UAT (https://uat-app.thinkandspeak.com) uses muted desaturated modes. Subtle background gradient shifts distinguish sandbox from live environments, preventing accidental data modification during teacher training sessions.

Input field micro-animations use phoneme-level color coding: orange for warning/instruction, green for valid/ready — mirroring pronunciation feedback in Conversation Role Play.

Anti-Phishing Visual Verification

Brand-protection visual hashes using unique gradient patterns and mascot positioning (Image 18 "confidence pose") appear only on legitimate domains, helping users verify authentic sites before entering credentials. Critical for school deployments where phishing prevention is essential.

👨‍🏫 vs 👨‍🎓 Multi-Role UI

Teacher Portal — 60% Analytics + 40% Auth

grid-template-columns: 60% 40% prioritizing "Live Learning Feedback & Heatmap preview." Left panel shows Live Translation Session Preview with simulated classroom heatmaps and Broadcast & Group Teaching Tools.

Student Portal — Full-Screen Immersive Auth

grid-template-columns: 100% for full-screen mascot immersion (Image 16 backpack student). Immediate Assessment phase styling with yellow/orange variants reducing anxiety during "Age group and learning stage" data collection.

Touch targets: 48px minimum for young primary students. Bilingual placeholder text animations alternating English and Chinese (Images 19/20) subconsciously reassure multilingual users of translation capabilities.

Performance

Performance Optimization Strategy
for School Network Environments

👁️ Content Visibility API

content-visibility: auto for off-screen mascot illustrations enables rapid login interface loading while deferring heavier character animations. Particularly beneficial for schools with limited bandwidth in rural areas where initial page load time directly impacts user perception of platform quality.

Critical Path: Login renders first

🔒 CSS Containment

contain: layout style paint isolates authentication form from browser reflows caused by dynamic font loading for Chinese character sets. Prevents input lag during credential entry — frustrating for students attempting to log in quickly before class begins.

No layout shifts on font load

🚀 GPU Acceleration

will-change: transform optimizations maintain 60fps mascot animations (floating, parallax, entrance) on school-issued devices with limited GPU capabilities. Common in 1:1 tablet programs where animation smoothness directly impacts perceived professionalism.

60fps on budget tablets

📊 Asset Delivery Pipeline: image-set() or Next.js <Image> serves optimized WebP/AVIF formats with PNG fallbacks. Transparent alpha backgrounds enable layered compositing where mascot poses are absolutely positioned within login containers for parallax effects.

Accessibility

Accessibility & Inclusive Design
for Diverse Learners

👁️ Visual & Motor Accessibility

  • High Contrast Mode: Speech bubble and form focus-visible styling ensures readability for visual impairments. WCAG 2.1 AA compliance for educational software.
  • Keyboard Navigation: .focusVisible polyfill ensuring tab navigation through age-selection badges remains visually prominent for motor control considerations.
  • Touch Target Sizing: Minimum 44px targets for young learners on tablets, 56px for ruggedized school devices accessing Vocabulary Trainer.

🧠 Cognitive & Wellness Accessibility

  • Reduced Motion: @media (prefers-reduced-motion) queries respecting user preferences while maintaining mascot communicative function through static pose variations.
  • Cognitive Load Management: .interactionZone wrappers with :focus-within logging hesitation data for learning motivation analysis while maintaining clear visual feedback.
  • Late-Night Wellness: Sleepy mascot triggers via client-side time API, suggesting break reminders — proactive wellness management for HKDSE preparation students.

♿ Summary: These accessibility features directly support the platform's promise to serve every learner regardless of ability level, ensuring all students benefit from personalized English language instruction.

Onboarding

Progressive Onboarding Architecture
& Session Persistence

🔐
Authentication
🎯
Age Selection
📊
Assessment
🖥️
Dashboard
🎓
Personalized Content

🔄 Returning vs New User

Transition Speed Optimization

.returning-user modifiers trigger faster transitions (reduced from 600ms to 300ms) for students who completed Assessment previously. .new-user classes enable elaborate mascot introduction animations — first impressions matter for platform adoption.

Preference Observation System

The login interface observes interaction patterns — hover time on age badges, mascot preference clicks — to pre-configure Vocabulary Builder difficulty curves and Conversation Role Play scenario selections before the Dashboard fully renders.

💾 Cross-Device Persistence

LocalStorage + Secure Cookies

localStorage and secure cookies remember user preferences, enabling seamless daily access for spaced practice vocabulary review sessions across devices. Authentication state management enables tracking of Words vocabulary collections, AI Coach interaction histories, and Course Adventure milestones.

Students can start a lesson on school computers, continue on tablets at home, and review on phones during MTR commute — progress syncs in real-time.

Live Translation

Live Translation & Group Collaboration
Styling Architecture

🌐 Real-Time Translation Features

Session Code Integration & Language Toggle

.sessionCode styling positions session code inputs prominently for quick teacher entry, displayed in monospace font within bordered containers. .languageToggle allows interface language switching (English ↔ Mandarin ↔ Cantonese) without page reloads.

The auto-routing is intelligent: English defaults to Cantonese translation, both Chinese inputs route to English — reflecting the primary use case of supporting English language acquisition for Chinese native speakers.

Cohort Color Indicators

Color-coded theming (matching age-group palette) helps students identify their assigned learning cohort during real-time sessions. The same color system applies to heatmap indicators and engagement tracking visualizations throughout the Dashboard.

👥 Group Teaching Support

Multi-User States & Split-View Layouts

Indicator badges show "Class In Progress" or "Group Session Active" positioned alongside authentication fields, utilizing the orange "presenter" mascot variant when group discussion features are active.

CSS Grid template-areas accommodate login interface alongside Live Translation preview windows or engagement heatmaps. .mode--individual and .mode--group modifier classes reconfigure the layout.

🌍 "Turn every class into a learning ecosystem"

Synthesis

Architecture Summary &
Feature Integration Map

🔐 Auth Gateway
Role detection + Age selection + Mascot integration
📊 Assessment Engine
Iframe profiling + 8 dimensions + Level placement
🎓 Personalized Content
Vocab + Course Adventure + Role Play + Live Translation

🏗️ Micro-Interaction Library

@keyframes wave { /* Welcome animation */
  transform: rotate(-15deg) rotate(15deg);
  transform-origin: bottom center;
}

@keyframes shake { /* Error feedback */
  transform: translateX(±5px); /* decreasing */
}

@keyframes morphToDashboard { /* Login→Learning */
  container: scale↓ + opacity↓ ;
  mascot: translateY↑ + squash/stretch;
}

📋 Implementation Priorities

  • Phase 1: Core login with age-selection + mascot integration
  • Phase 2: Assessment integration with seamless profiling
  • Phase 3: Accessibility audit — WCAG 2.1 AA verification
  • Phase 4: Performance optimization — asset pipeline tuning
  • Phase 5: Live Translation session code + cohort styling

🔑 The Platform Promise: From the moment users enter credentials, they are immersed in a responsive, gamified learning ecosystem that adapts to their cognitive stage, emotional state, and linguistic background.

Teacher Tools

Teacher Dashboard Capabilities
& Classroom Management

📊 Live Monitoring Features

Real-Time Heatmap & Engagement Tracking

The Live Learning Feedback & Heatmap shows real-time visualization of student engagement signals during Vocabulary Builder and Reading Comprehension. Color-coded heatmap: green = understand, yellow = neutral, red = has question.

The AI Coach intervention system detects hesitation in speaking modules — teacher notification when students activate "question" status button enables immediate intervention before frustration builds.

Progress Tracking Dashboard

Historical performance graphs showing vocabulary mastery over time, reading comprehension improvement trends, conversation fluency development metrics. All data feeds from the same Redux state driving student-facing features.

🎯 Instructional Tools

Broadcast & Group Teaching Tools

Simultaneous content delivery to entire class for vocabulary introduction, grammar explanation, or cultural context. "Targeted Assignment" sends differentiated tasks to student subgroups based on assessment levels.

Group Discussion Configuration

Live Translation session setup for multilingual classroom activities with English↔Chinese and English↔Cantonese support. Real-time translation during collaborative speaking activities. Session Recording captures Live Translation for student playback and parent-teacher conference evidence.

Key Takeaways

Workshop Summary
Five Core Insights for Teachers

🏗️ 1. Modular Architecture

Feature-based component organization enables independent updates without disrupting learning activities. CSS Modules prevent style conflicts between Dashboard, Course Adventure, and Live Translation modules.

🎯 2. Adaptive Assessment

Iframe-based evaluation captures 8 proficiency dimensions for personalized learning path generation. NOT a test — a preference profile driving all subsequent personalization.

🎨 3. Visual State Communication

The 20 mascot variants reduce cognitive load by communicating learning modes instantly. Emotional states provide empathetic feedback transcending language barriers.

👨‍🏫👨‍🎓 4. Multi-Role Flexibility

Teacher and Student experiences optimized independently — dashboard monitoring versus immersive learning. Same platform, different purposes.

🔄 5. Continuous Personalization

Assessment results propagate to Vocabulary, Reading, Conversation, and Translation modules automatically. The platform adapts to each student's needs continuously — like a GPS recalculating routes based on traffic.

✨ "Teach with Confidence. Learn without Limits." ✨

Think & Speak — See Change AI English · Contact: support@seechange-edu.com · URL: app.thinkandspeak.com

Slide 1 of 14 — Press N to toggle

Welcome to the Think & Speak technical workshop. Today we'll explore the frontend architecture that powers this AI English learning platform.