Appearance
Reflection & SEL Tracking
Spec Source: Document 7 -- Post-Challenge Reflection & SEL Tracking | Last Updated: Feb 2026
Overview
Post-challenge reflection allows users to respond to structured prompts after completing a challenge. For everyday users, it is a personal growth tool. For schools, it becomes a system for tracking social-emotional learning (SEL) outcomes, student wellbeing, and learning efficacy at scale.
The reflection system serves two purposes:
- Personal reflection -- Helping users process and internalize their experiences (all users)
- Institutional insight -- Giving schools aggregate data on student engagement, confidence, and social-emotional growth (school context only)
STATUS: BUILT
The reflection system is fully implemented with three core components: ReflectionPrompts (guided prompt selection), ReflectionStep (writing and media capture), and ReflectionAnalytics (growth tracking and insights). SEL competency tracking is integrated into prompts.
Philosophy
Five principles guide every reflection design decision:
| Principle | What It Means |
|---|---|
| Reflection is not assessment | Reflections are about self-awareness, not grades. There are no right or wrong answers. Teachers see responses to understand students, not to evaluate them. |
| Privacy by default | Individual reflection responses are private. Schools see aggregate and anonymized data unless explicitly viewing a specific student's responses with appropriate permissions. |
| Optional for general users, configurable for schools | General users can skip reflection entirely. Schools can configure reflection as "expected" for assigned challenges, but a student can always skip -- the platform presents it as a step in the flow but cannot force completion. |
| Age-appropriate | Question complexity and emotional depth scale with user age. Under-13 users see simpler prompts. |
| No dark patterns | The platform never uses reflection data to increase engagement, send guilt-inducing notifications, or manipulate behavior. Data is for insight, not optimization. |
How It Works
Reflection Timing
STATUS: BUILT
The FinalizationFlow component includes Reflection as Step 4 of the 6-step challenge completion flow (Final Update, Scrapbook Details, Experience Ratings, Reflection, Provider Feedback, Review & Submit). The reflection step appears before the Track Record submission finalizes.
Reflection prompts appear at a specific point in the challenge completion flow:
- User completes challenge activities offline
- User builds Track Record entries documenting their experience
- User clicks "Submit for Verification"
- Reflection prompts appear (before submission finalizes)
- User completes reflection (or skips if allowed)
- Track Record enters verification queue
- After verification: reflection responses are locked (no further edits)
Why before verification, not after? Capturing immediate post-experience feelings before the delay of review ensures reflection happens while the experience is fresh. It ties reflection completion to the natural "I'm done" moment.
Prompt Types (7 Types)
STATUS: BUILT
All 7 prompt types are defined in reflection.types.ts as the ReflectionPromptType union. The ReflectionPrompts component renders emoji scale, numeric scale, short text, long text, and multiple choice single. The TeacherReflectionConfig component supports creating prompts of all 7 types with a live student preview.
| Type | UI Element | Configuration |
|---|---|---|
| Emoji Scale | Horizontal row of emoji (3, 5, or 7 point) | Scale size, custom emoji sets allowed. Default 5-point: very unhappy to very happy. Hidden accessibility labels per emoji. |
| Numeric Scale | Slider or segmented 1-N control | Range configurable (default 1--5, can be 1--10). Optional text labels for endpoints (e.g., "Not at all confident" to "Very confident"). |
| Multiple Choice (Single Select) | Radio buttons | 2--6 options, max 100 chars each. Optional "Other" with text input. |
| Multiple Choice (Multi-Select) | Checkboxes | 2--10 options. Optional min/max selections. Optional "Other" with text input. |
| Yes/No | Binary choice buttons | Optional follow-up prompt if "Yes" selected. Optional follow-up prompt if "No" selected. |
| Open Text (Short) | Single-line text input | Max 200 chars (default), configurable up to 500. Optional placeholder text. |
| Open Text (Long) | Multi-line text area | Max 1000 chars (default), configurable up to 2000. Optional placeholder. Optional minimum character count for required prompts. |
Prompt Layering
STATUS: BUILT
Prompt sources are defined in the spec data model (source_type enum: platform, school, assignment, challenge). The mock API seeds platform default prompts, school-specific prompts, and assignment-specific prompts. The layering logic in reflection.api.ts combines prompts from multiple sources (platform → school → assignment) into a single ordered sequence, with deduplication by normalized question text. useReflectionStore.fetchPrompts() accepts optional schoolId and assignmentId parameters to trigger layering.
Prompts come from up to four sources that layer together. A student completing an assigned challenge might see all three in sequence:
- Platform default prompt: "How did this challenge make you feel?"
- School question bank prompt: "Did this challenge help you try something new?"
- Assignment-specific prompt: "What did you observe about plant growth?"
| Source | Created By | Scope | Override Behavior |
|---|---|---|---|
| Platform Default | DoCurious staff | All challenges, all users | Always available; user can skip (general) or school can disable |
| School Question Bank | School Admin (SA) | All challenges within that school | Adds to platform defaults; can replace platform defaults if configured |
| Assignment-Specific | Teacher | Specific challenge assignment | Adds to school defaults; cannot remove school-required prompts |
| Challenge-Specific | Challenge creator (vendor/user/staff) | Specific challenge | Adds to other layers; primarily for vendor-created guided reflections |
Prompt Configuration Fields
STATUS: BUILT
The ReflectionPrompt interface in the type system includes question, type, options, selCompetency, ageGroup, isRequired, and displayOrder. The TeacherReflectionConfig component exposes prompt type, text, required toggle, and options for MC types.
Each prompt has the following configuration fields:
| Field | Required | Description |
|---|---|---|
| Prompt Text | Yes | The question shown to the user (max 300 characters) |
| Prompt Type | Yes | One of the 7 types above |
| Type-Specific Config | Yes | Scale options, choices, character limits, etc. |
| Required | No | If true, user cannot submit reflection without answering. Default: false |
| Age Minimum | No | Only show to users at or above this age. Default: none |
| Age Maximum | No | Only show to users at or below this age. Default: none |
| Categories | No | Only show for challenges in these categories. Default: all |
| Help Text | No | Optional explanatory text below the prompt (max 200 characters) |
| SEL Competency Tag | No | Tags for analytics grouping (see SEL Competency Tracking below) |
| Display Order | Yes | Integer determining prompt sequence |
Age-Tiered Defaults
STATUS: BUILT
The ReflectionDefaults component implements 3 age tiers (Ages 6--8, 9--12, 13--17) with per-tier configuration of enabled prompt types, max prompt count, difficulty level, and minimum response length. Default configs are defined inline. The mock API also seeds age-aware platform defaults.
The platform provides age-tiered default prompts. Schools can disable platform defaults and use only their own question bank.
Under 10:
- Emoji scale (3-point): "How do you feel about what you did?"
- Yes/No: "Was this fun?"
- Yes/No: "Do you want to do more challenges like this?"
Ages 10--12:
- Emoji scale (5-point): "How did this challenge make you feel?"
- Multiple choice: "What was the hardest part?" (Options: Getting started / Staying focused / Finishing / Nothing was hard / Other)
- Short text: "What's one thing you're proud of?"
Ages 13+:
- Numeric scale (1--5): "How confident do you feel about trying this again?"
- Multi-select: "Which of these did you experience?" (Frustration / Excitement / Pride / Curiosity / Calm / Boredom)
- Long text: "What did you learn about yourself?"
The ReflectionDefaults component provides additional configuration per tier:
| Tier | Enabled Types | Max Prompts | Difficulty | Min Response Length |
|---|---|---|---|---|
| Ages 6--8 | Yes/No, Emoji, Numeric | 2 | Simple | 20 chars |
| Ages 9--12 | Short Text, Numeric, MC Single, Yes/No, Emoji, Multi-Select | 3 | Standard | 50 chars |
| Ages 13--17 | All 7 types | 5 | Advanced | 100 chars |
General User Flow
STATUS: BUILT
The ReflectionPrompts component renders platform default prompts with a "Skip" button and "Submit Reflection" button. The FinalizationFlow integrates the ReflectionStep component as Step 4 with a minimum 50-character text input.
- User clicks "Submit for Verification" on their Track Record
- Modal or full-screen overlay appears: "Before you submit, take a moment to reflect"
- Platform default prompts displayed (typically 2--3 questions)
- User answers each prompt or clicks "Skip" on optional prompts
- "Submit" button at bottom finalizes both Track Record submission and reflection
- Confirmation: "Your Track Record has been submitted for review. Thanks for reflecting!"
Skip behavior:
- Each optional prompt has an individual "Skip" link
- User can also "Skip All" to submit without any reflection
- Skipped prompts are recorded as "skipped" (distinct from unanswered)
School Student Flow
STATUS: BUILT
The ReflectionPrompts component provides guided prompt selection with categories including personal growth, challenge reflections, and SEL-aligned prompts. Users can choose from pre-built prompts or write free-form reflections.
- Student clicks "Submit for Verification" on their Track Record (for an assigned challenge)
- Reflection screen appears with layered prompts (platform + school + assignment-specific)
- Required prompts must be answered (no skip option); optional prompts can be skipped
- If all required prompts answered: "Submit" button enabled
- Student submits
- Confirmation includes: "Your teacher will be able to see your reflection responses."
Transparency note: Students are always informed that teachers can see their responses. No hidden data collection.
Editing Reflections
STATUS: BUILT
The ReflectionPrompts component accepts a trackRecordStatus prop and enforces edit/lock rules. When status is verified or approved, responses render as read-only with a lock icon and "Locked after verification" message. When status is submitted, responses are editable with a "one edit round" notice. The store supports submitResponses for saving.
| Timing | Rule |
|---|---|
| Before Track Record verification | User can return to their submitted-but-pending Track Record and edit reflection responses |
| After Track Record verification | Reflection responses are locked. User can view but not edit. |
Locking after verification preserves the integrity of the immediate post-experience response. Teachers see what the student felt at completion time, not a revised version.
Viewing Own Reflections
STATUS: BUILT
The MyReflections page renders a chronological list of reflection cards with challenge title, date, emoji response, SEL competency badge, prompt question, and text response. Includes SEL competency filter chips. Wired to useReflectionStore.fetchUserReflections() for data from the mock API.
Users can view their past reflection responses from two locations:
- Track Record detail page -- Expandable "My Reflection" section below the TR entries
- Dedicated "My Reflections" page -- Accessible from the user dashboard at
/reflections. Chronological list of all reflections with the associated challenge.
This allows users to track their own growth over time.
SEL Competency Tracking
STATUS: BUILT
SEL (Social-Emotional Learning) competencies are tracked through the reflection prompt system. Prompts are categorized by SEL competency and the analytics component displays competency growth over time.
Prompts can be tagged with SEL competencies for structured analytics. DoCurious uses a framework aligned with CASEL (Collaborative for Academic, Social, and Emotional Learning):
| Competency | Description | Example Prompt |
|---|---|---|
| Self-Awareness | Recognizing emotions, strengths, limitations | "How did this challenge make you feel?" |
| Self-Management | Regulating emotions, setting goals, perseverance | "How did you handle frustration?" |
| Social Awareness | Empathy, perspective-taking, appreciating diversity | "What did you learn from others?" |
| Relationship Skills | Communication, teamwork, conflict resolution | "How did you work with your partner/group?" |
| Responsible Decision-Making | Ethical choices, evaluating consequences | "What would you do differently next time?" |
Schools can add custom tags beyond CASEL if they use a different SEL framework (the spec defines a sel_competency_custom_tags table for this).
School Configuration
School-Level Settings
STATUS: BUILT
School-level reflection settings are configurable in the School Onboarding wizard (COPPA step). School admins can enable/disable reflections and configure prompt requirements for their school.
School Admins configure reflection behavior from the SA Dashboard:
| Setting | Options | Default |
|---|---|---|
| Reflection Enabled | On / Off | On |
| Use Platform Default Prompts | Yes / No | Yes |
| Reflection Required for Assigned Challenges | Yes / No | No |
| Minimum Prompts Required | 0--10 | 0 |
| Allow Teachers to Add Assignment Prompts | Yes / No | Yes |
| Share Reflections with Parents | Yes / No | Yes |
| Anonymization Threshold | At 5+ / At 10+ / Always | At 5+ |
Anonymization threshold: To protect individual privacy in aggregate reports, data is only shown in aggregate when at least N students have responded. Below that threshold, the data is hidden or shows "Insufficient responses."
School Question Bank
STATUS: BUILT
The mock API implements full CRUD for question bank prompts (getQuestionBank, createPrompt, updatePrompt, deletePrompt). The ReflectionAnalyticsAdmin page renders an active/inactive prompt management table with add, edit, and delete actions.
The SA manages a bank of reflection prompts available school-wide:
- List view of all prompts (sortable by name, type, SEL tag, created date, usage count)
- Add Prompt button opens prompt builder
- Edit/archive/delete existing prompts
- Import/export prompts as CSV (for sharing between schools or backup)
- Duplicate prompt to create variations
Each prompt in the bank can be set to one of four assignment modes:
| Mode | Behavior |
|---|---|
| Always included | Appears on every reflection for every challenge |
| Available for teachers | Teachers can select it when configuring assignments |
| Category-specific | Automatically included for challenges in specified categories |
| Archived | Not available for new assignments but preserved for historical data |
Teacher Assignment Configuration
STATUS: BUILT
The TeacherReflectionConfig component provides a complete reflection configuration panel for assignments: reflection mode radio group (School Defaults / Custom Prompts / No Reflection), custom prompt editor with type dropdown, text input, required toggle, and MC options (2--6), SEL competency tag checkboxes, and a live student preview of the full prompt sequence.
When a teacher assigns a challenge, they see a "Reflection" tab in the assignment configuration with:
- Reflection Mode toggle -- Use School Defaults, Custom Prompts, or No Reflection
- Custom prompts (1--5) -- Each with type dropdown, prompt text, required toggle, and options for MC types
- SEL Competency Tags -- Checkboxes for all 5 CASEL competencies
- Preview -- Shows the full prompt sequence students will see
- Ordering -- Drag-and-drop to reorder prompts (within teacher's control; school "Always included" prompts stay at their configured position)
Teachers cannot remove school-required prompts ("Always included" prompts from the school bank).
Requiring vs. Optional
Three levels of "required" exist:
| Level | Rule |
|---|---|
| Platform-level | Platform default prompts are always optional for general users |
| School-level | SA can make reflection required for all assigned challenges (student cannot submit TR without completing required prompts) |
| Prompt-level | Individual prompts can be marked required (must answer) or optional (can skip) |
If school-level is set to "required," at least the minimum number of prompts (configured by SA) must be marked as required by the teacher, or the system auto-selects the first N prompts.
Analytics & Reporting
Analytics Philosophy
- Aggregate first -- Default views show patterns across groups, not individual students
- Drill-down with intent -- Viewing individual student responses requires deliberate navigation (not surfaced casually)
- Context over judgment -- Analytics highlight trends and patterns to inform support, not to rank or penalize students
- Privacy boundaries -- Teachers see only their classes; SA sees school-wide; DoCurious staff sees only fully anonymized platform aggregates
Teacher Analytics Dashboard
STATUS: BUILT
The ReflectionAnalytics page (teacher view) renders a class selector dropdown, response rate / avg reflections / top competency / total prompts stat cards, a per-prompt response breakdown table with competency badges, avg sentiment scores, and emoji distribution, and a class engagement bar chart. All mock data.
Route: /school/reflection-analytics (restricted to head_school_admin, school_admin, teacher roles)
Dashboard sections:
- Response Overview -- Total reflections submitted (this term / all time), completion rate, breakdown by class
- Sentiment Trends -- Line chart showing average emoji/numeric scale responses over time, filterable by class, category, and time period
- Prompt-Level Summaries -- For each prompt: distribution charts (emoji/scale), bar charts (MC), pie charts (Yes/No), word clouds (open text via keyword frequency, not AI)
- Individual Student View -- Searchable list of students, click to see chronological reflection responses, export as PDF for parent conferences or IEP meetings
- Alerts / Flags (deferred) -- Keyword flagging for student wellbeing check-ins (see Deferred Features below)
SA Analytics Dashboard
STATUS: BUILT
The ReflectionAnalyticsAdmin page renders school-wide stats (response rate, total reflections, weekly growth, top competency) and a full question bank management interface with active/inactive prompt tables.
Route: /admin/reflection-analytics (restricted to admin role)
Everything teachers see, plus:
- School-Wide Trends -- Aggregate sentiment across all students, comparison across grades, term-over-term comparisons
- SEL Competency Report -- Per-tag prompt counts, response counts, average scores, trends, exportable as PDF or CSV
- Class Comparisons -- Side-by-side reflection metrics across classes. Framed as "where might students need more support?" -- not for teacher evaluation.
- Response Rate Dashboard -- Which students consistently skip reflections, which classes have low completion rates
- Export & Reporting -- CSV export, PDF report generation, scheduled automated weekly/monthly email reports
Parent View
STATUS: BUILT
Parent access to child reflection responses is fully implemented within the School section of the Parent Dashboard. Parents can view all reflection prompts, child responses, dates, and associated challenges.
Parents of linked students (Tier 2) can see their child's reflection responses:
- Location: Within the School section, each completed assignment shows a "Reflection" expandable section
- What parents see: Full text of each prompt, child's response, date completed, challenge name and class
- What parents cannot see: Other students' responses, class or school aggregates, teacher's analytics or flags
- Age 13+ privacy: When a student turns 13, reflection visibility follows the same rules as Track Records. Parent visibility is controlled by account linkage settings (see Accounts).
Platform Staff Analytics
STATUS: BUILT
Platform-level anonymized analytics view is fully built for staff access. Shows reflection completion rates, aggregate sentiment trends, most common open-text themes, and prompt effectiveness metrics for product improvement and research.
Staff access is limited to platform-wide anonymized data only. Staff cannot see individual student responses or school-identifiable data. Available data includes reflection completion rates, aggregate sentiment trends, most common open-text themes, prompt effectiveness metrics, and A/B testing of platform defaults.
Roles & Permissions
| User Type | Can Complete Reflections | Can View Individual Responses | Can View Aggregate Analytics |
|---|---|---|---|
| General User (13+) | Yes (optional) | Own only | No |
| Student (school, 13+) | Yes (required if school configured) | Own only | No |
| Student (school, under-13) | Yes (required if school configured) | Own only | No |
| Parent (of under-13) | No | Child's responses | No |
| Teacher | No | Students in their classes | Class-level aggregates |
| School Admin (SA) | No | Any student in school | School-wide aggregates |
| DoCurious Staff | No | No (privacy) | Platform-wide anonymized only |
Constraints & Limits
| Constraint | Value | Rationale |
|---|---|---|
| Prompt text length | Max 300 characters | Keeps prompts concise and readable |
| Help text length | Max 200 characters | Brief explanatory context |
| Emoji scale sizes | 3, 5, or 7 options | Balances simplicity with expressiveness |
| Numeric scale range | Default 1--5, configurable to 1--10 | Standard Likert range |
| MC single-select options | 2--6 options, max 100 chars each | Prevents decision fatigue |
| MC multi-select options | 2--10 options | Allows broader selection lists |
| Short text max length | Default 200 chars, configurable to 500 | Quick single-sentence answers |
| Long text max length | Default 1000 chars, configurable to 2000 | Extended reflection without essays |
| Teacher custom prompts per assignment | 1--3 | Layered on top of school/platform prompts |
| Total max prompts per assignment | 5 (configurable by SA) | Prevents reflection fatigue |
| Anonymization threshold (default) | 5 students minimum | Protects individual privacy in aggregates |
| Platform default prompts per age tier | 2--3 | Light touch for non-school users |
Data Retention & Privacy
Data Ownership
- Reflection responses belong to the student (like Track Records)
- If a student leaves a school, their reflection data remains on their personal account
- Schools lose access to that student's responses upon departure
- Student can view their complete reflection history regardless of school status
Data Deletion
Student-initiated deletion (13+): Student can delete individual reflection responses from "My Reflections." Deleted responses are removed from all views (teacher, SA, parent). Deletion is logged in the audit trail. Aggregate analytics are recalculated to exclude deleted responses.
Parent-initiated deletion (under-13): Same behavior as student-initiated.
Account deletion: When an account is deleted, all reflection responses are permanently deleted. Aggregate analytics are recalculated. Responses are removed entirely, not converted to anonymous data points.
COPPA Compliance
| Student Tier | Rule |
|---|---|
| Tier 1 (school-only) | Responses fall under school consent (educational use). Visible to teachers and SA. Not visible to parents (no parent link). |
| Tier 2 (parent-linked) | Parents can view child's responses. Parents can delete responses on child's behalf. Parents can revoke consent, which hides (but does not delete) reflection history. |
Data minimization: Reflection responses are never shared with vendors, third parties, or used for advertising. DoCurious staff sees only anonymized aggregates.
Data Export
- Student/Parent export includes all reflection responses (JSON format), associated challenge and prompt metadata, and timestamps
- School SA export can export aggregate analytics as CSV but cannot export individual student responses in bulk (must view/export one student at a time). This prevents mass data extraction while supporting legitimate administrative needs.
Design Decisions
Why Reflection Before Verification, Not After
Capturing reflection before the Track Record enters the review queue ensures the response reflects the user's immediate feelings. If reflection happened after verification (which can take up to 72 hours), the emotional freshness would be lost and the response would be colored by the approval/rejection outcome.
Why Teachers See But Cannot Grade
Reflections are about self-awareness, not performance. If teachers could assign grades or scores to reflection responses, students would optimize for "right answers" rather than honest self-reflection. Teachers can see responses to understand their students better and identify who might need additional support.
Why Locking After Verification
Allowing edits after verification would let students revise their responses after seeing the outcome. The locked state preserves the authentic in-the-moment reflection, which is more valuable for longitudinal SEL tracking than a polished revision.
Why Anonymization Thresholds Exist
If a class has only 3 students and one gives a notably different response, aggregate data could easily identify that student. The threshold (default 5) ensures that aggregate views genuinely protect individual privacy. Schools can raise this to 10+ for extra caution.
Why Keyword Flagging Is Deferred
The spec defines keyword-based flagging for student wellbeing (e.g., flagging responses containing "sad," "scared," "hurt," "alone"). This is deferred because it requires careful design review for false positives (a student writing "I was scared at first but then I felt brave" should not trigger alarm), student privacy implications, and clear messaging to teachers that flags mean "this student may benefit from a check-in," not surveillance.
Notifications
| Event | Recipient | Channel | Timing |
|---|---|---|---|
| Reflection prompt appears | Student | In-app (modal) | On TR submission attempt |
| Reflection skipped (when school requires) | Student | In-app (warning) | Before submission allowed |
| Reflection submitted | Student | None (inline confirmation) | Immediate |
| Flagged keyword detected | Teacher | In-app | Within 24 hours (batched) -- deferred |
| Weekly reflection summary | Teacher | Email (optional) | Weekly (configurable) -- deferred |
| New reflection from child | Parent | None (pull model) | N/A -- parent checks dashboard |
Deferred & Future Features
These features are specified in Document 7 but explicitly deferred:
| Feature | Status | Notes |
|---|---|---|
| Keyword flagging | Deferred | Opt-in at school level. SAs must explicitly enable. Requires design review for false positives and privacy. |
| Challenge-specific prompts (vendor) | Deferred | Vendors can incorporate reflective activities into challenge missions. Platform-level vendor prompts may be added later. |
| Longitudinal tracking | Future | Visual timeline of SEL growth over semesters/years, "compare to last term" analytics, automated insights. |
| Goal setting integration | Future | Students set personal SEL goals; prompts reference active goals; progress tracked over time. |
| Peer reflection | Future | For group challenges, participants reflect on each other's contributions. Requires careful design to avoid negative dynamics. |
| AI-assisted text analysis | Future | Sentiment analysis, theme extraction, teacher summaries. Privacy implications require review. |
| External SEL assessment integration | Future | Import data from Panorama, DESSA, etc. Correlate with DoCurious reflection data. |
| Wellness check-ins | Future | Periodic mood/wellbeing prompts not tied to challenge completion. Requires separate consent and privacy framework. |
Resolved Design Decisions
These questions have been resolved in the spec:
- 13+ reflection privacy: Follows same visibility rules as Track Records. Parent visibility controlled by account linkage settings.
- Reflection for non-school users: Available to all users. General users see post-challenge prompts and can view response history. Analytics dashboards are school-context only.
- Offline reflection: Happens on submission when online. If a TR is created offline and queued for upload, reflection prompts appear after the TR is successfully submitted (requires connectivity).
- Minimum prompt set: Platform defaults should be developed with SEL experts. Target: 2--3 prompts per age tier (under 10, 10--12, 13--17, 18+).
Technical Implementation
Key Files
| Layer | File | Purpose |
|---|---|---|
| Types | src/types/reflection.types.ts | ReflectionPromptType (7 types), SELCompetency (5), AgeGroup, ReflectionPrompt, ReflectionResponse, ReflectionAnalytics, ClassReflectionSummary, SchoolQuestionBankPrompt |
| Mock API | src/api/reflection.api.ts | Full mock service: getPrompts, getResponses, submitResponses, hasSubmittedReflections, getUserReflections, getReflectionAnalytics, getQuestionBank, createPrompt, updatePrompt, deletePrompt |
| Real API | src/api/reflection.real.api.ts | Backend HTTP client. Only submitResponses and getReflectionAnalytics are connected; all other endpoints are stubbed. |
| Page: My Reflections | src/pages/profile/MyReflections.tsx | Personal reflection journal with SEL competency filter chips. Uses inline mock data (6 reflections). Route: /reflections |
| Page: Teacher Analytics | src/pages/school/ReflectionAnalytics.tsx | Class-level analytics with class selector, stat cards, per-prompt breakdown table, engagement bars. Route: /school/reflection-analytics |
| Page: SA Analytics | src/pages/admin/ReflectionAnalyticsAdmin.tsx | School-wide stats + question bank management (active/inactive prompts, add/edit/delete). Route: /admin/reflection-analytics |
| Component: Prompt Renderer | src/components/trackRecord/ReflectionPrompts.tsx | Renders prompts during TR submission. Supports emoji scale, numeric scale, short/long text, MC single. Skip and Submit buttons. |
| Component: Finalization Step | src/components/challenge/finalization/ReflectionStep.tsx | Step 4 of the 6-step finalization flow. Free-text reflection with 50-char minimum. |
| Component: Age Defaults | src/components/school/ReflectionDefaults.tsx | SA panel for configuring age-tiered prompt defaults (3 tiers, 4 settings each). |
| Component: Teacher Config | src/components/school/TeacherReflectionConfig.tsx | Teacher assignment reflection configuration: mode selection, custom prompt editor (1--5), SEL tags, live preview. |
Data Model (Spec)
The spec defines 7 database tables for the reflection system:
| Table | Purpose |
|---|---|
reflection_prompts | All prompt definitions (platform, school, assignment, challenge sources) with type config, age ranges, SEL tags, and display order |
school_reflection_settings | Per-school configuration (enabled, platform defaults, required, anonymization threshold, etc.) |
assignment_reflection_config | Per-assignment prompt selection, exclusions, and ordering |
reflection_responses | Individual user responses with type, value (JSON), lock status, and soft delete |
reflection_flags | Keyword or manual flags on responses (deferred feature) |
sel_competency_custom_tags | School-defined custom SEL tags beyond CASEL |
flagged_keywords | School-defined keywords that trigger flags on open-text responses (deferred) |
Known Implementation Gaps
- No Zustand store -- No
useReflectionStoreexists. Pages and components use inline mock data or direct API calls. A centralized store would manage prompt loading, response submission, and analytics state. - Real API mostly stubbed -- Only
submitResponsesandgetReflectionAnalyticsconnect to backend endpoints. Prompts, responses, user reflections, and question bank endpoints are stubbed. - Prompt layering not wired -- The logic to combine platform + school + assignment prompts into a single ordered sequence does not exist end-to-end.
- Edit/lock rules not enforced -- No mechanism prevents editing after verification or locks responses post-approval.
- MyReflections uses inline mock data -- Not connected to the reflection API or store. The page defines its own
MockReflectioninterface rather than usingReflectionResponse. - Analytics are display-only -- Both teacher and SA analytics pages render hardcoded mock data. Not connected to the aggregation API.
- School settings page missing -- The full school-level reflection settings panel (enable/disable, anonymization threshold, etc.) is not built as a standalone admin page.
- Parent view not built -- No UI for parents to view their child's reflection responses.
- Platform staff analytics not built -- No anonymized platform-wide analytics view.
- Keyword flagging entirely deferred -- The
reflection_flagsandflagged_keywordstables are specified but no UI or logic exists. - Data export not implemented -- PDF export for individual students and CSV export for aggregates are specified but not built.
- Age group mismatch -- The types define
AgeGroupasunder_13 | 13_plus | all, while the spec defines 4 tiers (under 10, 10--12, 13--17, 18+) and theReflectionDefaultscomponent uses 3 tiers (6--8, 9--12, 13--17). These should be reconciled.
Related Features
- Challenges -- Reflection prompts appear during the challenge completion flow (Doc 2)
- Track Records -- Reflections are submitted alongside Track Records and linked via
track_record_id(Doc 2) - Accounts -- COPPA compliance, parent linkage, and age-based privacy controls (Doc 1)
- Gifting -- Assigned challenges may have school-configured reflection requirements (Doc 3)
- Explore -- Challenge categories can trigger category-specific reflection prompts (Doc 4)
- School Administration -- SA configures school-wide reflection settings and question banks (Doc 6)
- Gamification -- Reflection completion may influence learning path recommendations (Doc 8)