Skip to content

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:

RoleCreated ByCapabilities
Head School AdminDoCurious staff during onboardingFull school management. Can add/remove other SAs. Only role that can grant admin privileges to other staff.
School Admin (SA)Head SA invitesSame as Head SA except cannot manage other admin accounts.
TeacherSA creates or invites existing DoCurious userView assigned class rosters, monitor student progress, provide private feedback, assign challenges, request purchases. Cannot modify the school roster or school settings.
StudentSA 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.
AlumniSA transitions studentRetains 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:

  1. 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.

  2. 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.

  3. 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

  1. School completes an application on DoCurious
  2. DoCurious admin reviews and approves

Path B: DoCurious Admin Initiates

  1. DoCurious admin begins registration for the school
  2. School receives email to review and complete their information
  3. School submits completed application
  4. DoCurious admin approves

Post-approval onboarding steps (both paths):

StepDescriptionStatus
1. School registrationDoCurious staff or school creates the organization recordPartial -- admin-side only
2. SA account creationFirst SA account created with credentialsBuilt (mock)
3. Configure school settingsSA reviews and customizes defaultsBuilt (SchoolSettings.tsx)
4. Roster importSA uploads student roster via CSVBuilt
5. Teacher setupSA creates teacher accounts or invites existing usersBuilt
6. Class creationSA or teachers create classes and assign studentsBuilt
7. Challenge assignmentTeachers or SA assign challenges to classesBuilt
8. Go liveStudents begin using the platformBuilt (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):

  1. SA uploads a CSV file with columns: first_name, last_name, email (optional for Tier 1 under-13), grade_level, date_of_birth
  2. System validates: required fields present, no duplicate emails, date format
  3. For under-13 students without email: system generates a school-issued username (e.g., jsmith.lincoln)
  4. For students with email: invitation email sent with account setup link
  5. 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

AgeAccount TypeHow It Works
Under 13Tier 1 (school-only) by defaultSA 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 13Tier 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 affiliationStudent 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:

ColumnDescription
NameStudent's display name and email
Student IDSchool's own identifier
GradeGrade level
StatusActive / Alumni / Deactivated / Suspended
ClassCurrent class assignment
ActionsSuspend / 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:

  1. New account -- SA enters teacher's name and email. Teacher receives invitation email, creates password, completes profile. Account is automatically affiliated with the school.

  2. 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

ActionTeacherSA
View assigned class rostersYesYes
View student last-login dateYesYes
View student Track Records (school challenges)YesYes
Provide private feedback on Track RecordsYesYes
Assign challenges to their classesYesYes
Request challenge purchases from SAYesYes
Create classesYesYes
Add/remove students from their classesYesYes
Modify school roster (add/remove students)NoYes
Change school settingsNoYes
View school-wide analyticsNoYes
Manage teachersNoYes
Send surveysNoYes
Approve gift purchasesNoYes

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

FieldDescriptionConstraints
NameFreeform textMax 100 characters
DescriptionOptionalMax 300 characters
Grade LevelOptional tag for filteringMust be within the school's configured grade range
Teacher(s)One or more assigned teachersPrimary teacher required
StudentsOne or more students from the rosterA student CAN be in multiple classes simultaneously

Class Lifecycle

  1. Create -- Teacher or SA creates a class with name, description, grade level, and assigns a primary teacher
  2. Populate -- Add students from the school roster (search by name, filter by grade)
  3. Active use -- Challenge assignments, progress tracking, class community
  4. Archive -- End of year/term. Hidden from active view but data preserved
  5. 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

  1. Select challenge -- Teacher browses the Explore page or searches for a specific challenge
  2. Select class(es) -- Multi-select from the teacher's assigned classes
  3. 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.
  4. Publish -- All students in selected class(es) see the assignment on their dashboard

When a teacher tries to assign a paid challenge:

  1. System detects the challenge is paid and prompts: "This challenge costs $X per student. Submit a purchase request to your school administrator?"
  2. Teacher confirms. Purchase request sent to SA.
  3. SA sees the request in their purchase queue with: challenge name, cost per student, student count, total cost, requesting teacher.
  4. SA approves or denies (with optional reason).
  5. If approved: SA completes external purchase and uploads receipt for recordkeeping.
  6. 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:

  1. Teacher opens a student's Track Record from the dashboard
  2. Clicks "Private Feedback" button (distinct from public comments)
  3. Writes feedback (rich text, no character limit)
  4. Feedback is visible only to: the student, the teacher, other teachers assigned to the class, the SA, and the student's linked parents
  5. Student receives an in-app notification
  6. 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

  1. SA creates a new survey: title, description, external URL
  2. Selects recipients by audience: all students, all teachers, specific class, specific grade
  3. Schedules or sends immediately
  4. 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:

  1. Membership in school-wide and class communities is deactivated
  2. They can no longer view active school community feeds
  3. All personal Track Records and completed challenges remain permanently
  4. 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:

  1. Pending Parent Approval -- Account created by school. Student can log in but only browse read-only.
  2. Tier 1 Active -- School link established. Can participate in school challenges.
  3. Tier 2 Active -- Parent completes linking flow. Full feature access.
  4. 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:

ActionStudentTeacherSAHead SAParent
Complete assigned challengesYes--------
View school community feedsYesYesYesYesNo
Post in school communityYes (age-gated)YesYesYesNo
View class rostersNoOwn classesAllAllNo
View student Track RecordsOwn onlyOwn classesAllAllLinked child
Provide private feedbackNoYesYesYesNo
Assign challenges to classesNoOwn classesAllAllNo
Request challenge purchasesNoYesYesYesNo
Create classesNoYesYesYesNo
Add/remove class studentsNoOwn classesAllAllNo
Modify school rosterNoNoYesYesNo
Change school settingsNoNoYesYesNo
View school-wide analyticsNoNoYesYesNo
Manage teachersNoNoYesYesNo
Add/remove SA accountsNoNoNoYesNo
Send surveysNoNoYesYesNo
Approve purchasesNoNoYesYesNo
Approve/revoke child sharingNoNoNoNoYes (Tier 2)
View child activityNoNoNoNoYes

Constraints & Limits

ConstraintValueRationale
Class name max length100 charactersSpec requirement
Class description max length300 charactersSpec requirement
Custom assignment instructions500 charactersKeeps teacher notes concise
Parent/guardian links per child2 maximumCovers most custody situations without unbounded complexity
Active school links per student1 at a timePrevents billing/data conflicts; transfer is an explicit process
Due date enforcementSoft deadline onlyNo auto-penalty on expiry; teachers use judgment
Survey trackingClick-through onlyProxy metric; actual survey completion tracked externally
Student age threshold13 years (from DOB)COPPA compliance boundary
Parent approval window30 daysAfter which account becomes dormant
Tier 1 removal reclaim window90 daysTime for parent to link before automatic deletion
Never-activated account purge12 monthsWith 30-day advance notice email

Notifications (School-Specific)

EventRecipientChannelTiming
Challenge assigned to classStudents in classIn-appImmediate
Assignment due date approachingStudentIn-app3 days and 1 day before
Teacher feedback on Track RecordStudent + ParentIn-app + Email (parent)Immediate
Purchase request submittedSAIn-app + EmailImmediate
Purchase request approved/deniedRequesting teacherIn-appImmediate
Survey email sentRecipientsEmailAs scheduled
Student moved to alumniStudent + ParentIn-app + EmailImmediate
Teacher added to schoolTeacherEmailImmediate
Parent weekly digestParentEmailConfigured frequency
New challenge assigned (parent)ParentIn-appImmediate

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

TypeFileDescription
Schoolsrc/types/school.types.tsSchool organization entity with settings flags
SchoolClasssrc/types/school.types.tsClass within a school with teacher and student counts
StudentRostersrc/types/school.types.tsStudent enrollment record with status lifecycle
TeacherRostersrc/types/school.types.tsTeacher/staff roster record with role
ClassAssignmentsrc/types/school.types.tsChallenge assigned to a class with progress tracking
StudentAssignmentProgresssrc/types/school.types.tsPer-student progress for an assignment with grading
CSVImportResultsrc/types/school.types.tsResult summary from bulk CSV import
SchoolDashboardStatssrc/types/school.types.tsAggregate stats for the SA dashboard
ClassDashboardStatssrc/types/school.types.tsAggregate stats for the teacher's class view
GradeLevelsrc/types/school.types.tsGrade level entity with display order
ChallengeRequestsrc/types/school.types.tsTeacher purchase request for paid challenges
Surveysrc/types/school.types.tsSurvey entity with external URL
SurveyCampaignsrc/types/school.types.tsSurvey distribution campaign with audience targeting

Store

StoreFileDescription
useSchoolStoresrc/store/useSchoolStore.tsCentral 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

APIFileDescription
Mock APIsrc/api/school.api.tsFull mock implementation using mockDb. All school operations functional with simulated data.
Real APIsrc/api/school.real.api.tsBackend-connected layer. Some endpoints connected (getMySchool, getClasses, getStudents, getTeachers, importStudentsCSV, createAssignment). Many operations stubbed with console warnings.
Invite APIsrc/api/schoolInvite.api.tsMock invite link system for teacher onboarding. Token validation and acceptance flow.

Pages (19 components)

PageFileDescription
SchoolDashboardsrc/pages/school/SchoolDashboard.tsxSA overview with stats cards, quick actions, class list, pending purchase requests, and teacher invite link
Rostersrc/pages/school/Roster.tsxStudent/teacher roster with search, CSV import (basic + advanced), add student, suspend/reinstate/remove
Classessrc/pages/school/Classes.tsxClass list with search, create class modal (name, description, grade, teacher)
Gradessrc/pages/school/Grades.tsxGrade level management (CRUD, enable/disable, delete protection)
Teacherssrc/pages/school/Teachers.tsxTeacher management with email invite, role selection, department, active/inactive lists
Assignmentssrc/pages/school/Assignments.tsxClass-scoped assignment creation with challenge search, custom instructions, due dates, progress bars
ClassProgresssrc/pages/school/ClassProgress.tsxPer-class progress view with student-level completion tracking
TeacherReviewssrc/pages/school/TeacherReviews.tsxTeacher review queue for student Track Records
Surveyssrc/pages/school/Surveys.tsxSurvey CRUD with campaign creation, audience targeting, click-through stats
PurchaseRequestQueuesrc/pages/school/PurchaseRequestQueue.tsxSA purchase request management with approve/deny and stats
AlumniTransitionsrc/pages/school/AlumniTransition.tsxGraduating student transition flow with batch actions
BulkGiftChallengessrc/pages/school/BulkGiftChallenges.tsx4-step wizard for bulk challenge gifting
ClassroomDashboardsrc/pages/school/ClassroomDashboard.tsxTeacher gradebook view with Recharts visualizations
LearningPathDesignersrc/pages/school/LearningPathDesigner.tsxChallenge sequencing builder
AssignmentBuildersrc/pages/school/AssignmentBuilder.tsxEnhanced assignment creation with curriculum connections
ReflectionAnalyticssrc/pages/school/ReflectionAnalytics.tsxClass-level reflection analytics for teachers
ParentCommunicationHubsrc/pages/school/ParentCommunicationHub.tsxCentralized parent communication tool
CurriculumAlignmentToolsrc/pages/school/CurriculumAlignmentTool.tsxStandards alignment mapping
StudentInsightCardssrc/pages/school/StudentInsightCards.tsxPer-student insight summaries

Components

ComponentFileDescription
CSVRosterImportsrc/components/school/CSVRosterImport.tsxAdvanced CSV import with field mapping and validation
TeacherReflectionConfigsrc/components/school/TeacherReflectionConfig.tsxReflection prompt configuration for teachers
ReflectionDefaultssrc/components/school/ReflectionDefaults.tsxDefault 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:

TablePurpose
organizationsSchool entities with settings, grade levels, and notification preferences
school_affiliationsUser-to-school role mapping with status lifecycle
classesClass groupings with auto-created community references
class_membershipsStudent/teacher membership in classes
challenge_assignmentsChallenge-to-class assignments with due dates and instructions
student_assignment_progressPer-student progress tracking with completion timestamps
purchase_requestsTeacher-to-SA purchase request queue
teacher_feedbackPrivate feedback on Track Records
surveysSurvey definitions with recipient filters and scheduling
survey_recipientsPer-recipient tracking with click-through tokens
survey_templatesReusable survey templates
  • 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

DoCurious Platform Documentation