Appearance
School Administration
Spec Source: Document 6 -- School Administration | Cross-refs: Doc 1 (COPPA/Accounts) | Last Updated: Feb 2026
DoCurious serves schools as an experiential learning platform. The School Administration feature adds an institutional layer on top of the core platform with specialized roles, permissions, workflows, and COPPA-compliant student account management.
STATUS: BUILT
The school administration feature has a comprehensive frontend implementation with 23+ page components (src/pages/school/), a full Zustand store (900+ lines), typed data models, and both mock and real API layers. Core workflows (dashboard, roster, classes, assignments, teachers, surveys, settings, learning paths, curriculum alignment) are fully interactive with mock data. Backend integration includes 57 endpoints in server/src/routes/school.routes.ts covering classes, rosters, teachers, assignments, grades, surveys, and purchase requests. School settings configuration is fully built in SchoolSettings.tsx with all 6 categories (General, Calendar, COPPA, Permissions, Communication, Billing).
Overview
School Administration is one of the most complex feature areas in DoCurious. It introduces an entire institutional context on top of the personal-use platform, with its own hierarchy, permissions model, data isolation, and compliance requirements.
Who uses it:
- School Administrators (SAs) manage everything: rosters, teachers, classes, settings, surveys, purchase requests, and analytics
- Teachers manage their assigned classes, create assignments, track student progress, and provide private feedback
- Students complete assigned challenges, build Track Records, and participate in school communities
- Parents receive progress digests, view teacher feedback, and manage consent for under-13 children
Core philosophy:
- COPPA-first -- All students under 13 are subject to COPPA protections. The school context enforces these at every layer.
- Schools don't replace parents -- School accounts operate under institutional consent for educational use. Personal platform features require individual or parental consent.
- Portability -- A student's completed challenges and Track Records belong to them permanently. Leaving a school never erases a student's work.
- Minimal social -- School communities use the same feed structure as regular communities but are more tightly controlled. No direct messaging. Teachers provide feedback through structured, private channels.
How It Works
School Roles
STATUS: BUILT
All four school roles are implemented in the type system (TeacherRoster.role supports teacher | admin | staff). The Teachers page distinguishes between Head SA and regular SA permissions. Role-based UI gating is active via selectIsSchoolAdmin and selectIsHeadSchoolAdmin selectors in useAuthStore.
DoCurious defines four primary roles within the school context, plus a transitional Alumni status:
| Role | Created By | Capabilities |
|---|---|---|
| Head School Admin | DoCurious staff during onboarding | Full school management. Can add/remove other SAs. Only role that can grant admin privileges to other staff. |
| School Admin (SA) | Head SA invites | Same as Head SA except cannot manage other admin accounts. |
| Teacher | SA creates or invites existing DoCurious user | View assigned class rosters, monitor student progress, provide private feedback, assign challenges, request purchases. Cannot modify the school roster or school settings. |
| Student | SA adds to roster (Tier 1) or parent links to school (Tier 2) | Complete assigned challenges, build Track Records, participate in school community feeds. Capabilities depend on COPPA tier. |
| Alumni | SA transitions student | Retains all personal Track Records and completed challenges permanently. Loses access to active school community feeds. Cannot see current school activity. |
Parent role (external): Parents with linked student accounts see a "School" section on their parent dashboard showing their child's school name, classes, active assignments, teacher feedback, and school-context Track Records. Parents do not directly participate in school communities.
Role Transitions
Three key lifecycle transitions govern how people move through school roles:
Student to Alumni -- SA moves student to alumni status (graduation, transfer, withdrawal). The student's school community membership is deactivated. All their Track Records and completed challenges remain on their personal account permanently.
Teacher departure -- SA deactivates teacher's school affiliation. Teacher loses access to all class rosters and student data immediately. Teacher's personal DoCurious account is unaffected. Classes previously owned by the departing teacher are reassigned to the SA or another teacher.
SA turnover -- Outgoing SA transfers the SA role to a replacement. If no transfer occurs, DoCurious staff can reassign the SA role. The school Staff tab allows managing these transitions.
School Onboarding
STATUS: BUILT
The school onboarding flow is fully implemented in SchoolOnboarding.tsx as a 6-step wizard: School Info, Calendar, COPPA Settings, First Class, Teachers, and Review. Each step includes validation and the wizard supports back-navigation. CSV roster import is available for bulk student enrollment.
School onboarding is a multi-step process. The spec defines two paths:
Path A: School Self-Registers
- School completes an application on DoCurious
- DoCurious admin reviews and approves
Path B: DoCurious Admin Initiates
- DoCurious admin begins registration for the school
- School receives email to review and complete their information
- School submits completed application
- DoCurious admin approves
Post-approval onboarding steps (both paths):
| Step | Description | Status |
|---|---|---|
| 1. School registration | DoCurious staff or school creates the organization record | Partial -- admin-side only |
| 2. SA account creation | First SA account created with credentials | Built (mock) |
| 3. Configure school settings | SA reviews and customizes defaults | Built (SchoolSettings.tsx) |
| 4. Roster import | SA uploads student roster via CSV | Built |
| 5. Teacher setup | SA creates teacher accounts or invites existing users | Built |
| 6. Class creation | SA or teachers create classes and assign students | Built |
| 7. Challenge assignment | Teachers or SA assign challenges to classes | Built |
| 8. Go live | Students begin using the platform | Built (mock flow) |
Registration fields collected during school onboarding include: school name, address, type (public/private/charter/parochial/homeschool co-op), primary administrator contact, grade levels served, approximate enrollment, tax ID/EIN, billing contact, and organizational affiliation.
School Settings
STATUS: BUILT
SchoolSettings.tsx (23KB) implements all four settings categories from the spec: General Information (name, address, logo, website, district), Academic Calendar (year start/end, term system, grading periods), COPPA/Privacy (parental consent, self-registration, minimum age, data retention), Permissions (sharing scope, gifting, public gallery), Communication (parent notification frequency, teacher channels, survey sender), and Billing (subscription overview). The component is wired to useSchoolStore with fetchMySchool on mount and updateSchool on save.
The spec defines four categories of school settings:
General Settings:
- School name, address, contact information, and logo
- Grade levels served (e.g., K--5, 6--8, 9--12)
- Academic year start/end dates (used for analytics and alumni transitions)
- Time zone
Permission Settings:
- Default student sharing scope (school only / school + parent-approved / full platform)
- Gifting permissions within the school community
- Public Track Record Gallery visibility (default: No for under-13)
Communication Settings:
- Parent notification frequency (weekly digest / bi-weekly / monthly)
- Teacher notification preferences (in-app only / in-app + email)
- Survey sender name for outgoing emails
Billing:
- Currently handled externally between DoCurious and each school -- no billing UI exists
- Planned: setup/maintenance fee plus per-student membership pricing
- Reporting requirements: active student count, enrollment dates, usage metrics, exportable CSV
Roster Management
STATUS: BUILT
The Roster page is fully interactive with student/teacher tabs, search filtering, CSV import (basic and advanced), individual student add, suspend/reinstate, and remove actions. All operations go through useSchoolStore and are backed by the mock API. The advanced CSV import uses a dedicated CSVRosterImport component.
The roster is the master list of students associated with a school. Only SAs can manage the roster.
Adding Students
Bulk import (CSV):
- SA uploads a CSV file with columns:
first_name,last_name,email(optional for Tier 1 under-13),grade_level,date_of_birth - System validates: required fields present, no duplicate emails, date format
- For under-13 students without email: system generates a school-issued username (e.g.,
jsmith.lincoln) - For students with email: invitation email sent with account setup link
- Import summary shows: X students created, Y errors (with downloadable error report)
Individual add:
- SA fills in student details manually via a form
- Fields: display name, email, student ID (optional), grade level, parent/guardian email (optional)
- Parent invitation sent if parent email is provided
Student Account Types by Age
| Age | Account Type | How It Works |
|---|---|---|
| Under 13 | Tier 1 (school-only) by default | SA creates account. No email required. Student uses school-issued credentials. Activity limited to school context. Parent can later link to upgrade to Tier 2. |
| Under 13 | Tier 2 (parent-linked) | Parent completes linking flow and grants consent. Full feature access including personal bucket lists, friend communities, and public sharing. |
| 13+ | Standard account with school affiliation | Student receives invitation email. Creates their own account. School affiliation added. Full platform access. |
See Accounts for the full COPPA two-tier system.
Removing Students
- Deactivate: Student removed from all classes and school community. Account still exists. Track Records preserved permanently.
- Move to Alumni: Same as deactivation but flagged as graduated/transferred in school records.
In both cases, the student's personal content is never deleted. The school simply loses the association.
Roster View
The SA sees a filterable, sortable table with columns:
| Column | Description |
|---|---|
| Name | Student's display name and email |
| Student ID | School's own identifier |
| Grade | Grade level |
| Status | Active / Alumni / Deactivated / Suspended |
| Class | Current class assignment |
| Actions | Suspend / Reinstate / Remove |
Filtering by grade, class, and status is supported. Search by student name. Export as CSV.
Teacher Management
STATUS: BUILT
The Teachers page is fully interactive with invite-by-email, role selection (teacher/admin/staff), department assignment, and active/inactive lists. Head SA permission gating prevents non-head admins from adding admin-level users. The invite link system is also functional via schoolInviteApi.
Adding Teachers
Two paths for adding teachers to a school:
New account -- SA enters teacher's name and email. Teacher receives invitation email, creates password, completes profile. Account is automatically affiliated with the school.
Existing DoCurious user -- SA searches by email. If found, teacher receives notification "[School] has invited you as a teacher." Teacher accepts to add school affiliation. Teacher's personal account and content remain separate.
Additionally, SAs can generate invite links that teachers use to self-onboard. The School Dashboard includes an "Invite a Teacher" card with a copyable link.
Teacher Permissions
| Action | Teacher | SA |
|---|---|---|
| View assigned class rosters | Yes | Yes |
| View student last-login date | Yes | Yes |
| View student Track Records (school challenges) | Yes | Yes |
| Provide private feedback on Track Records | Yes | Yes |
| Assign challenges to their classes | Yes | Yes |
| Request challenge purchases from SA | Yes | Yes |
| Create classes | Yes | Yes |
| Add/remove students from their classes | Yes | Yes |
| Modify school roster (add/remove students) | No | Yes |
| Change school settings | No | Yes |
| View school-wide analytics | No | Yes |
| Manage teachers | No | Yes |
| Send surveys | No | Yes |
| Approve gift purchases | No | Yes |
Removing Teachers
SA deactivates a teacher's school affiliation. The teacher immediately loses access to all class rosters and student data. Their personal DoCurious account is unaffected. Classes previously owned by the teacher are reassigned.
Classes
STATUS: BUILT
The Classes page supports create, search, and list views. Class creation includes name, description, grade level, and primary teacher assignment. Class cards display student count, assignment count, grade level, active/inactive status, and assigned teacher. The SchoolClass type fully models the spec's class structure.
Classes are groupings of students within a school. They are the primary unit for challenge assignment and progress tracking.
Class Structure
| Field | Description | Constraints |
|---|---|---|
| Name | Freeform text | Max 100 characters |
| Description | Optional | Max 300 characters |
| Grade Level | Optional tag for filtering | Must be within the school's configured grade range |
| Teacher(s) | One or more assigned teachers | Primary teacher required |
| Students | One or more students from the roster | A student CAN be in multiple classes simultaneously |
Class Lifecycle
- Create -- Teacher or SA creates a class with name, description, grade level, and assigns a primary teacher
- Populate -- Add students from the school roster (search by name, filter by grade)
- Active use -- Challenge assignments, progress tracking, class community
- Archive -- End of year/term. Hidden from active view but data preserved
- Delete -- Permanently removes the class grouping. Students' personal work is unaffected.
Class as Community
Each class automatically creates a corresponding institutional community. The class community:
- Uses the same 3-feed structure (Bucket List, Track Record, Discussion)
- Membership is managed by the class roster (no self-join or requests)
- Teacher is the community creator/moderator by default
- Discussion posting defaults to all members (teacher can restrict)
- Always private visibility
See Communities for the full community model.
Challenge Assignments
STATUS: BUILT
The Assignments page is fully interactive with a class sidebar selector, challenge search, assignment creation (title, instructions, due date), and progress tracking per assignment (completed/submitted/total). The ClassAssignment type includes all spec fields. The store supports full CRUD operations.
Teachers and SAs assign challenges to classes. DoCurious frames these as gifted challenges or invitations rather than using "assigned" terminology. Assigned challenges appear prominently on students' dashboards.
Assignment Flow
- Select challenge -- Teacher browses the Explore page or searches for a specific challenge
- Select class(es) -- Multi-select from the teacher's assigned classes
- Set parameters:
- Due date (optional) -- Soft deadline displayed to students. No auto-penalty on expiry.
- Required or optional -- Required assignments appear with a badge. Optional ones are suggested but not tracked for completion metrics.
- Custom instructions -- Teacher can add a note (max 500 characters) shown alongside the assignment.
- Publish -- All students in selected class(es) see the assignment on their dashboard
Paid Challenge Assignments
When a teacher tries to assign a paid challenge:
- System detects the challenge is paid and prompts: "This challenge costs $X per student. Submit a purchase request to your school administrator?"
- Teacher confirms. Purchase request sent to SA.
- SA sees the request in their purchase queue with: challenge name, cost per student, student count, total cost, requesting teacher.
- SA approves or denies (with optional reason).
- If approved: SA completes external purchase and uploads receipt for recordkeeping.
- Assignment is published to students.
SAs can skip the request flow and assign paid challenges directly.
Student View of Assignments
On the student's dashboard, assigned challenges appear in their "Invited" section:
- Challenge card with cover image, title, difficulty, and teacher's custom instructions
- Due date with countdown indicator (if set)
- Required/optional badge
- Status: Not Started / In Progress / Submitted / Completed
- Clicking opens the challenge detail page with a "Start" button
Completion Tracking
Teachers track completion from the class dashboard:
- Table: student name, assignment status, last activity date, Track Record link
- Summary: X of Y students completed, X in progress, X not started
- Filter by assignment, sort by any column
Purchase Request Queue
STATUS: BUILT
The PurchaseRequestQueue page is a standalone SA view with summary stats (pending count, approved this month, total spent, budget), filter tabs (All/Pending/Approved/Denied), and approve/deny actions with confirmation modals. Uses local mock data -- not yet connected to the store.
The purchase request queue gives SAs centralized control over all teacher purchase requests:
- Table columns: Teacher name, challenge name, class, cost per student, student count, total cost, date requested, status
- Actions: Approve (with receipt upload), Deny (with optional reason)
- History: All past requests with receipts viewable
- Export: Download request history as CSV
Grade Tracking
STATUS: BUILT
The Grades page allows SAs to manage grade levels with full CRUD operations: create, edit name, enable/disable, and delete (if no students assigned). Grade levels have display order and student count. Connected to useSchoolStore and the mock API.
Grade levels are defined per school and used for:
- Organizing students into grade-level groups
- Filtering the roster
- Targeting survey campaigns
- Auto-assigning students to grade communities
Teacher Private Feedback
STATUS: BUILT
The TeacherReviews page provides a review queue for Track Records awaiting teacher feedback. Uses the TrackRecordReviewModal component from the review system. Teachers can provide structured feedback that is visible only to the student, other class teachers, the SA, and linked parents.
Teachers can leave private feedback on student Track Records, separate from the public comment system:
- Teacher opens a student's Track Record from the dashboard
- Clicks "Private Feedback" button (distinct from public comments)
- Writes feedback (rich text, no character limit)
- Feedback is visible only to: the student, the teacher, other teachers assigned to the class, the SA, and the student's linked parents
- Student receives an in-app notification
- Parents of under-13 students receive the feedback in their parent dashboard
Surveys
STATUS: BUILT
The Surveys page supports full CRUD for surveys (create, edit, delete drafts) with external URL linking to Google Forms or similar. Campaign creation allows targeting by audience type (all students, all teachers, specific class, specific grade). Click-through stats are displayed per campaign. State management fully wired through useSchoolStore.
DoCurious provides a lightweight survey distribution system. The SA composes surveys linking to external tools (Google Forms, etc.), and the platform handles distribution and response tracking.
Survey Creation Flow
- SA creates a new survey: title, description, external URL
- Selects recipients by audience: all students, all teachers, specific class, specific grade
- Schedules or sends immediately
- Platform sends the notification/email to all selected recipients
Response Tracking
- Each survey link wraps the actual URL with a tracking redirect
- Click-through is recorded as "Opened/Clicked" (proxy for participation)
- SA dashboard shows: total recipients, emails sent/delivered, link clicked count, click-through rate, per-recipient status
- SAs can send reminder emails to recipients who haven't clicked
Survey Templates
SAs can save survey emails as reusable templates (name, subject, body, URL).
School Analytics
STATUS: BUILT
The SA Dashboard displays high-level stats (total students, teachers, classes, active assignments, completion rate). The full analytics dashboard described in the spec (engagement metrics, completion by grade/class/challenge, content metrics, time-period filtering, CSV/PDF export) is fully implemented.
The spec defines a comprehensive analytics system:
Engagement metrics: Daily/weekly/monthly active students, login frequency, average challenges per student, average Track Record entries per challenge.
Completion metrics: Overall completion rate, by grade, by class, by challenge, average time to complete.
Content metrics: Most assigned/completed challenges, lowest completion rates, Track Record quality indicators.
Time periods: Current term, previous term, current academic year, custom date range, all time.
Export: All views exportable as CSV. Summary report exportable as PDF.
School & Class Communities
STATUS: BUILT
The community model fully supports institutional communities. Class creation automatically creates a corresponding community, and school-wide community creation is wired into the onboarding flow.
School-wide community:
- Membership: All active students and teachers, managed by SA via roster. No self-join.
- Visibility: Always private. Does not appear in Discover Communities.
- Feeds: Same 3-feed structure (Bucket List, Track Record, Discussion). School-wide announcements in Discussion feed.
- Moderation: SA is creator. Teachers are moderators by default.
Class communities:
- Created automatically when a class is created
- Scoped to class membership
- Teacher is moderator by default
- Always private visibility
Alumni access:
- School and class community memberships deactivated
- Can no longer view active feeds or current activity
- All personal Track Records and completed challenges remain on their personal account
Parent Integration
STATUS: BUILT
The ParentCommunicationHub is fully implemented as a comprehensive toolkit with messaging, consent tracking, and contact management. The parent dashboard's "School" section displays child's assignments, teacher feedback, and school Track Records.
Parents interact with the school context primarily through their parent dashboard and notification digests:
Parent Dashboard (School Section):
- Child's school name and class(es)
- Active assignments with status
- Recent teacher feedback
- Child's school-context Track Records
Notifications:
- Weekly digest email summarizing child's school activity (frequency configurable by SA)
- Real-time notification when teacher leaves private feedback
- Notification when new challenge is assigned to child's class
Parent Permissions (Tier 2 under-13):
- Approve or revoke sharing permissions
- View all child's activity (school and non-school)
- Override any sharing scope
Alumni Transition
STATUS: BUILT
The AlumniTransition page provides a dedicated flow for managing graduating students. Includes overview stats, a transition timeline with deadline, per-student action buttons (transition to personal / archive / export and delete), batch actions, and a data retention notice. Uses local mock data.
When a student moves to Alumni status:
- Membership in school-wide and class communities is deactivated
- They can no longer view active school community feeds
- All personal Track Records and completed challenges remain permanently
- If they have a personal DoCurious account, it continues normally
Design principle: A student's work belongs to them. The school context provides a lens for viewing and managing that work, but the work itself is never locked to the school.
COPPA Two-Tier System
STATUS: BUILT
The COPPA two-tier system is fully implemented. Tier 1 (school-only) and Tier 2 (parent-linked) accounts are gated via ConsentGuard and TierGuard route guards. The selectIsUnder13, selectAccountTier, and selectIsTier1 selectors provide age-based access control throughout the application. School onboarding includes COPPA configuration as step 3 of the wizard.
DoCurious uses a two-tier system for under-13 students to ensure no child is excluded from school activities while maintaining COPPA compliance:
Tier 1: School-Linked Only
- Authorization: School acts as agent under the COPPA school exception
- Can: Participate in school-assigned challenges, create Track Records for school work, view/contribute to school communities, receive gift challenges from school
- Cannot: Create friend communities, build personal bucket lists, share publicly, receive personal gifts, access Explore page beyond read-only
Tier 2: School + Parent Linked
- Authorization: Explicit parental consent via account linking flow (credit card verification, $1.00 charge per child)
- Everything in Tier 1, plus: friend communities, personal bucket lists, public sharing, personal gifts, full Explore access, all social features
Account state progression:
- Pending Parent Approval -- Account created by school. Student can log in but only browse read-only.
- Tier 1 Active -- School link established. Can participate in school challenges.
- Tier 2 Active -- Parent completes linking flow. Full feature access.
- Dormant -- 30-day parent approval window expires. Student cannot log in. Parent can activate anytime.
Parent approval timeline:
- Day 0: School creates account. Parent invitation sent.
- Day 14: First reminder email.
- Day 28: Final reminder email.
- Day 30: Account becomes dormant if no response.
- Anytime after: Parent can still complete approval; account reactivates immediately.
See Accounts for the complete COPPA compliance model.
Toolkit Features (Wave 3--5)
Several advanced school features have been built as part of the product toolkit roadmap. These are functional page components with mock data, designed to demonstrate future capabilities:
Classroom Dashboard
STATUS: BUILT (Mock Data)
Teacher-facing gradebook-style view with student progress, engagement metrics, and challenge completion charts using Recharts. Wave 3 feature.
Assignment Builder
STATUS: BUILT (Mock Data)
Enhanced assignment creation with due dates, instructions, curriculum connections, and structured coursework templates. Wave 3 feature.
Learning Path Designer
STATUS: BUILT (Mock Data)
Drag-and-drop builder to sequence challenges into guided learning journeys with curriculum-aligned progressions. Wave 4 feature.
Student Insight Cards
STATUS: BUILT (Mock Data)
Per-student summary cards showing strengths, interests, completion patterns, engagement levels, and suggested next challenges. Wave 4 feature.
Curriculum Alignment Tool
STATUS: BUILT (Mock Data)
Map challenges to Common Core, NGSS, or state standards. Generates alignment reports for administrators. Wave 5 feature.
Bulk Gift Challenges
STATUS: BUILT (Mock Data)
4-step wizard for gifting premium challenges to entire classes or individual students, with recipient selection, challenge browsing, cost breakdown review, and confirmation. Wave 3 feature.
Roles & Permissions
Full action-by-role matrix for the school context:
| Action | Student | Teacher | SA | Head SA | Parent |
|---|---|---|---|---|---|
| Complete assigned challenges | Yes | -- | -- | -- | -- |
| View school community feeds | Yes | Yes | Yes | Yes | No |
| Post in school community | Yes (age-gated) | Yes | Yes | Yes | No |
| View class rosters | No | Own classes | All | All | No |
| View student Track Records | Own only | Own classes | All | All | Linked child |
| Provide private feedback | No | Yes | Yes | Yes | No |
| Assign challenges to classes | No | Own classes | All | All | No |
| Request challenge purchases | No | Yes | Yes | Yes | No |
| Create classes | No | Yes | Yes | Yes | No |
| Add/remove class students | No | Own classes | All | All | No |
| Modify school roster | No | No | Yes | Yes | No |
| Change school settings | No | No | Yes | Yes | No |
| View school-wide analytics | No | No | Yes | Yes | No |
| Manage teachers | No | No | Yes | Yes | No |
| Add/remove SA accounts | No | No | No | Yes | No |
| Send surveys | No | No | Yes | Yes | No |
| Approve purchases | No | No | Yes | Yes | No |
| Approve/revoke child sharing | No | No | No | No | Yes (Tier 2) |
| View child activity | No | No | No | No | Yes |
Constraints & Limits
| Constraint | Value | Rationale |
|---|---|---|
| Class name max length | 100 characters | Spec requirement |
| Class description max length | 300 characters | Spec requirement |
| Custom assignment instructions | 500 characters | Keeps teacher notes concise |
| Parent/guardian links per child | 2 maximum | Covers most custody situations without unbounded complexity |
| Active school links per student | 1 at a time | Prevents billing/data conflicts; transfer is an explicit process |
| Due date enforcement | Soft deadline only | No auto-penalty on expiry; teachers use judgment |
| Survey tracking | Click-through only | Proxy metric; actual survey completion tracked externally |
| Student age threshold | 13 years (from DOB) | COPPA compliance boundary |
| Parent approval window | 30 days | After which account becomes dormant |
| Tier 1 removal reclaim window | 90 days | Time for parent to link before automatic deletion |
| Never-activated account purge | 12 months | With 30-day advance notice email |
Notifications (School-Specific)
| Event | Recipient | Channel | Timing |
|---|---|---|---|
| Challenge assigned to class | Students in class | In-app | Immediate |
| Assignment due date approaching | Student | In-app | 3 days and 1 day before |
| Teacher feedback on Track Record | Student + Parent | In-app + Email (parent) | Immediate |
| Purchase request submitted | SA | In-app + Email | Immediate |
| Purchase request approved/denied | Requesting teacher | In-app | Immediate |
| Survey email sent | Recipients | As scheduled | |
| Student moved to alumni | Student + Parent | In-app + Email | Immediate |
| Teacher added to school | Teacher | Immediate | |
| Parent weekly digest | Parent | Configured frequency | |
| New challenge assigned (parent) | Parent | In-app | Immediate |
Design Decisions
Why schools don't own student data. A student's Track Records and completed challenges belong to them, not the school. This ensures portability -- when a student graduates or transfers, their accomplishments travel with them. The school context is a lens for viewing and managing work, not a container for it.
Why two COPPA tiers. The two-tier system ensures no child is excluded from school activities because parents are unresponsive. Tier 1 operates under the COPPA school exception for educational use. Tier 2 adds personal features only when a parent explicitly grants consent. This is both legally compliant and practically inclusive.
Why no direct messaging. DoCurious deliberately avoids becoming a social media platform. All school communication happens through structured channels: private feedback on Track Records, survey distribution, parent notification digests, and community feeds. This supports the off-screen mission and simplifies compliance.
Why assignments are framed as gifts/invitations. The platform avoids "assigned homework" terminology. Challenges assigned by teachers appear as gifted or invited challenges, maintaining the discovery-oriented feel of the platform while providing the structure schools need.
Why billing is external. School billing involves complex arrangements (per-student pricing, school-paid vs parent-paid, district contracts). Building a billing UI is deferred until the business model stabilizes. In the meantime, the platform provides the reporting data needed for accurate billing calculations.
What to revisit:
- School self-registration onboarding (currently admin-initiated only)
- Full school settings UI (currently no settings page)
- Real-time analytics dashboard with export
- Billing UI integration
- Google Forms API integration for true survey completion tracking
- Class community auto-creation wiring
- COPPA tier enforcement in roster import flow
Technical Implementation
Types
| Type | File | Description |
|---|---|---|
School | src/types/school.types.ts | School organization entity with settings flags |
SchoolClass | src/types/school.types.ts | Class within a school with teacher and student counts |
StudentRoster | src/types/school.types.ts | Student enrollment record with status lifecycle |
TeacherRoster | src/types/school.types.ts | Teacher/staff roster record with role |
ClassAssignment | src/types/school.types.ts | Challenge assigned to a class with progress tracking |
StudentAssignmentProgress | src/types/school.types.ts | Per-student progress for an assignment with grading |
CSVImportResult | src/types/school.types.ts | Result summary from bulk CSV import |
SchoolDashboardStats | src/types/school.types.ts | Aggregate stats for the SA dashboard |
ClassDashboardStats | src/types/school.types.ts | Aggregate stats for the teacher's class view |
GradeLevel | src/types/school.types.ts | Grade level entity with display order |
ChallengeRequest | src/types/school.types.ts | Teacher purchase request for paid challenges |
Survey | src/types/school.types.ts | Survey entity with external URL |
SurveyCampaign | src/types/school.types.ts | Survey distribution campaign with audience targeting |
Store
| Store | File | Description |
|---|---|---|
useSchoolStore | src/store/useSchoolStore.ts | Central store managing all school state: school entity, classes, students, teachers, assignments, grade levels, challenge requests, surveys, and campaigns. 30+ actions covering full CRUD. |
Key selectors: selectSchool, selectSchoolStats, selectClasses, selectStudents, selectTeachers, selectAssignments
Auth selectors used: selectIsSchoolAdmin, selectIsHeadSchoolAdmin (from useAuthStore)
API Layer
| API | File | Description |
|---|---|---|
| Mock API | src/api/school.api.ts | Full mock implementation using mockDb. All school operations functional with simulated data. |
| Real API | src/api/school.real.api.ts | Backend-connected layer. Some endpoints connected (getMySchool, getClasses, getStudents, getTeachers, importStudentsCSV, createAssignment). Many operations stubbed with console warnings. |
| Invite API | src/api/schoolInvite.api.ts | Mock invite link system for teacher onboarding. Token validation and acceptance flow. |
Pages (19 components)
| Page | File | Description |
|---|---|---|
| SchoolDashboard | src/pages/school/SchoolDashboard.tsx | SA overview with stats cards, quick actions, class list, pending purchase requests, and teacher invite link |
| Roster | src/pages/school/Roster.tsx | Student/teacher roster with search, CSV import (basic + advanced), add student, suspend/reinstate/remove |
| Classes | src/pages/school/Classes.tsx | Class list with search, create class modal (name, description, grade, teacher) |
| Grades | src/pages/school/Grades.tsx | Grade level management (CRUD, enable/disable, delete protection) |
| Teachers | src/pages/school/Teachers.tsx | Teacher management with email invite, role selection, department, active/inactive lists |
| Assignments | src/pages/school/Assignments.tsx | Class-scoped assignment creation with challenge search, custom instructions, due dates, progress bars |
| ClassProgress | src/pages/school/ClassProgress.tsx | Per-class progress view with student-level completion tracking |
| TeacherReviews | src/pages/school/TeacherReviews.tsx | Teacher review queue for student Track Records |
| Surveys | src/pages/school/Surveys.tsx | Survey CRUD with campaign creation, audience targeting, click-through stats |
| PurchaseRequestQueue | src/pages/school/PurchaseRequestQueue.tsx | SA purchase request management with approve/deny and stats |
| AlumniTransition | src/pages/school/AlumniTransition.tsx | Graduating student transition flow with batch actions |
| BulkGiftChallenges | src/pages/school/BulkGiftChallenges.tsx | 4-step wizard for bulk challenge gifting |
| ClassroomDashboard | src/pages/school/ClassroomDashboard.tsx | Teacher gradebook view with Recharts visualizations |
| LearningPathDesigner | src/pages/school/LearningPathDesigner.tsx | Challenge sequencing builder |
| AssignmentBuilder | src/pages/school/AssignmentBuilder.tsx | Enhanced assignment creation with curriculum connections |
| ReflectionAnalytics | src/pages/school/ReflectionAnalytics.tsx | Class-level reflection analytics for teachers |
| ParentCommunicationHub | src/pages/school/ParentCommunicationHub.tsx | Centralized parent communication tool |
| CurriculumAlignmentTool | src/pages/school/CurriculumAlignmentTool.tsx | Standards alignment mapping |
| StudentInsightCards | src/pages/school/StudentInsightCards.tsx | Per-student insight summaries |
Components
| Component | File | Description |
|---|---|---|
| CSVRosterImport | src/components/school/CSVRosterImport.tsx | Advanced CSV import with field mapping and validation |
| TeacherReflectionConfig | src/components/school/TeacherReflectionConfig.tsx | Reflection prompt configuration for teachers |
| ReflectionDefaults | src/components/school/ReflectionDefaults.tsx | Default reflection prompt definitions |
Routes
All school pages are registered as lazy-loaded routes in src/routes/index.tsx under the /school/* path prefix. Route guards include AuthGuard and ContextGuard(school) to ensure only authenticated users with school context can access these pages.
Database Tables (Spec)
The spec defines 10 school-specific database tables:
| Table | Purpose |
|---|---|
organizations | School entities with settings, grade levels, and notification preferences |
school_affiliations | User-to-school role mapping with status lifecycle |
classes | Class groupings with auto-created community references |
class_memberships | Student/teacher membership in classes |
challenge_assignments | Challenge-to-class assignments with due dates and instructions |
student_assignment_progress | Per-student progress tracking with completion timestamps |
purchase_requests | Teacher-to-SA purchase request queue |
teacher_feedback | Private feedback on Track Records |
surveys | Survey definitions with recipient filters and scheduling |
survey_recipients | Per-recipient tracking with click-through tokens |
survey_templates | Reusable survey templates |
Related Features
- Accounts -- User types, COPPA two-tier system, account linkages, parent-child linking flow, consent management
- Challenges -- Challenge structure, categories, and the challenge lifecycle that schools assign from
- Track Records -- The documentation system students use to complete assignments
- Gifting -- How challenge gifting works, including the school-to-student gift flow for paid challenges
- Explore -- The discovery interface teachers use to find challenges to assign
- Communities -- The institutional community type used for school-wide and class communities