- Added `AssignCoursesModal`, `AudienceMemberRow`, `AudienceTable`, and related components for improved audience management UI. - Implemented audience invite actions including resend and revoke functionality. - Updated audience API to support importing members and assigning courses. - Refactored audience data handling to include status and invite management. - Improved overall user experience with pagination and selection features in the audience table.
22 KiB
Forms Product PRD
Status
- Draft
Date
- March 22, 2026
Implementation Plan
- See implementation-plan.md for phased delivery, ticket breakdown, and recommended sprint sequencing.
Purpose
Build a standalone Forms product for schools and education teams to collect structured responses such as student feedback, course reviews, enrollment requests, parent intake, event registrations, and internal staff forms, while reusing as much of the existing exercise question engine as possible.
Executive Summary
ClassroomIO already has a strong reusable question engine:
@cio/question-typesalready centralizes question contracts, answer serialization, renderer contracts, and form-state helpers, and explicitly calls out reuse for future products such as forms/assessments.@cio/ui/custom/exercise-questionalready supports question rendering inedit,take,preview,review, andsubmissionmodes across 12 question types.- The current exercise stack already handles templates, file upload answers, submission storage, and submission summary visualizations.
The main constraint is that the current product is still deeply shaped around courses, lessons, grading, and enrolled students. That makes it a poor fit for Google Forms / Typeform style workflows if we try to ship Forms by directly reusing the exercise and submission entities as-is.
Recommendation
Build Forms as a new top-level product domain, but reuse the existing question engine and renderer stack aggressively.
Reuse Estimate
- High reuse (60-70%): question types, renderer contracts, answer payloads, file upload answer model, template structure, summary visualization patterns.
- Medium reuse (20-30%): builder UI shell, preview flow, submission list components, analytics presentation patterns.
- Low reuse (0-15%): database entities, API routes, auth model, response ownership, publishing/sharing model, grading workflow.
Problem Statement
Today, exercises can technically ask many of the same questions that a form would ask, but they are optimized for assessment, not response collection.
That creates hard product limits for schools and organizations that want to collect:
- Student feedback after a course or session.
- School review forms and satisfaction surveys.
- Enrollment and application forms.
- Parent intake and consent forms.
- Staff requests and internal administrative forms.
- Event registration forms.
The current exercise product does not map cleanly to these workflows because:
- Exercises are attached to a
course, often also alessonandsection. - Exercise access is enforced through course membership middleware.
- Submissions are tied to
groupmemberand carry grading state, total score, reviewer, and feedback fields. - The UX assumes students, instructors, grading, due dates, and completion rather than respondents, publish/share, response settings, and collection workflows.
- There is no public share-link, embeddable form, thank-you page, response export, response caps, or form lifecycle model.
Product Thesis
If ClassroomIO turns the current exercise question engine into a standalone Forms product, the platform gets a second major content primitive:
Learning contentfor teaching and assessment.Response collectionfor school operations and feedback.
This expands ClassroomIO from LMS-only workflows into school operations workflows without throwing away the investment already made in the exercise system.
Current-State Audit
| Area | Current State | Reuse Value | Forms Gap |
|---|---|---|---|
@cio/question-types |
Shared package for question keys, answer payloads, render contracts, serializer, form state | High | Naming is exercise-centric, but architecture is already reusable |
@cio/ui/custom/exercise-question |
Full renderers for edit, take, preview, review, submission |
High | Needs forms shell, branding, page layout, respondent UX |
| Question type coverage | 12 types: radio, checkbox, textarea, true/false, short answer, numeric, fill blank, file upload, matching, ordering, hotspot, link | High | Some types are assessment-first; forms also need presentational blocks and contact fields |
| Exercise builder UI | Existing authoring flow with question reorder, media, templates, preview | Medium | Assumes course exercise editing and points/correctness |
| Submission summary UI | Already shows aggregated response charts and individual response replay | Medium | Needs forms response inbox, filters, export, respondent metadata |
exercise table |
Has courseId, lessonId, sectionId, isUnlocked, dueBy |
Low | Needs standalone form ownership and publish lifecycle |
question table |
Bound to exerciseId only |
Low | Needs form-owned question model or generalized questionnaire ownership |
submission table |
Has exerciseId, courseId, submittedBy, grading fields, feedback |
Low | Needs form response model without grading assumptions |
question_answer table |
Stores answerData JSON and file-upload compatible payloads |
Medium | Tied to groupMemberId; needs respondent abstraction |
| Course exercise routes | Course-member-only access and course-scoped RPC surface | Low | Needs public/authenticated share flows and org-level management |
| Exercise templates | Existing template metadata and questionnaire payload | Medium | Needs form template gallery and form-specific defaults |
Data Sources Checked
packages/question-types/README.mdpackages/question-types/src/exercise-types.tspackages/question-types/src/render-contract.tspackages/question-types/src/form-state.tspackages/question-types/src/question-type-capabilities.tspackages/question-types/tests/form-and-render-contract.test.tspackages/ui/src/custom/exercise-question/question-renderer.sveltepackages/ui/src/custom/exercise-question/question-list.sveltepackages/ui/src/custom/exercise-question/question-form-root.svelteapps/api/src/routes/course/exercise.tsapps/api/src/routes/course/submission.tsapps/api/src/services/exercise/exercise.tsapps/api/src/services/submission/submission.tspackages/utils/src/validation/exercise/exercise.tspackages/utils/src/validation/submission/submission.tspackages/db/src/schema.tsapps/dashboard/src/lib/features/course/api/exercise.svelte.tsapps/dashboard/src/lib/features/course/components/exercise/edit-mode.svelteapps/dashboard/src/lib/features/course/components/exercise/submissions/summary.svelteapps/dashboard/src/lib/features/course/components/exercise/submissions/individual.svelte
Primary Users
- School operators collecting enrollment, consent, and intake data.
- Teachers and tutors collecting student feedback and course reviews.
- Administrators running internal requests, surveys, and registration forms.
- Parents and students responding through public or authenticated form flows.
Goals
- Launch a standalone Forms product without rebuilding the question engine from scratch.
- Reuse the existing question type system and UI renderer stack as the shared questionnaire layer.
- Support the highest-value school use cases first: feedback, review, enrollment, registration, and intake forms.
- Support both internal authenticated forms and public shareable forms.
- Ship response collection, response review, and export as first-class workflows.
- Keep the exercise product working unchanged.
Non-Goals (v1)
- Full Typeform-style branching at question level.
- Payments inside forms.
- Complex computed fields or spreadsheet formulas.
- Workflow automation builder for multi-step approvals.
- E-signatures with legal compliance guarantees.
- PDF-to-form conversion.
- External app integrations beyond CSV export and email notifications.
Confirmed Product Decisions
- Forms will be a new top-level product, not a hidden exercise mode inside courses.
- The shared question engine remains the foundation for both Exercises and Forms.
- Forms v1 will support draft, published, closed, and archived lifecycle states.
- Forms responses are never graded. Points, correctness, grading state, and reviewer workflow do not belong in the forms domain.
- Forms v1 will support one-page and multi-step/page presentation modes.
- Public forms are required for enrollment and feedback use cases, but must include abuse protection.
- Authenticated internal forms are also required for staff and student-only workflows.
- File upload is supported in Forms, but public file upload must be guarded with rate limits and storage controls.
- Existing exercise question types are reused first; new form-only block types can be added later.
- The first implementation prioritizes reuse over perfect naming cleanup. Renaming
exercise-questionto a broader package is optional follow-up, not a blocker.
Core Use Cases
UC-1: Student Feedback Form
- A school admin creates a feedback form.
- Shares a link after a course/session.
- Students submit ratings, free text, and optional anonymous feedback.
- Admin reviews aggregate charts and individual comments.
UC-2: Enrollment Form
- A school publishes an enrollment form publicly.
- Parent or student fills out personal data, preferences, and file uploads.
- Staff exports responses or reviews them inside the dashboard.
UC-3: Internal Review Form
- A school shares a private authenticated form with teachers or staff.
- Respondents can submit once or multiple times depending on settings.
- Admin sees response metadata, completion times, and exports data.
UC-4: Event Registration
- A team creates a registration form with attendance preferences and contact details.
- Form can close automatically at end date or after a response limit.
- Staff monitors response counts in real time.
Functional Requirements
FR-1: Form Lifecycle and Management
Admins can:
- Create a new form from scratch or from a template.
- Save a form as draft.
- Publish a form and generate a shareable URL.
- Close a form manually or automatically by schedule/limit.
- Archive a form without deleting responses.
- Duplicate an existing form.
Each form must support:
- Title
- Description
- Organization ownership
- Status:
DRAFT | PUBLISHED | CLOSED | ARCHIVED - Slug/share URL
- Optional start date
- Optional end date
- Optional response limit
- Optional success/thank-you message
FR-2: Form Builder
Reuse the existing exercise question builder patterns for:
- Add question
- Edit question
- Reorder questions
- Delete questions
- Add images and videos to questions
- Preview form
- Save changes
Forms-specific builder additions:
- Mark question as required/optional.
- Toggle anonymous collection.
- Choose response mode:
- one page
- one question/page
- Configure respondent fields:
- collect name
- collect email
- authenticated respondent only
- anonymous allowed
- Configure submission rules:
- one response per respondent
- multiple responses allowed
- save and continue later (optional)
FR-3: Sharing and Access
Forms v1 must support two access models:
- Public link
- Anyone with the link can respond.
- Optional CAPTCHA / anti-bot protection.
- Authenticated organization form
- User must sign in.
- Access may be limited to organization members.
Phase 2 access model:
- Targeted private form
- User must sign in and be explicitly assigned or invited.
- Best fit for internal staff/student workflows.
FR-4: Respondent Experience
Respondents can:
- Open the form through a share link or internal dashboard link.
- See form title, description, branding, and instructions.
- Complete questions across supported question types.
- Upload files when allowed.
- Submit the form.
- See a thank-you screen after successful submission.
Optional v1 capabilities:
- Save draft and resume later for authenticated respondents.
- Edit own response when form setting allows it.
FR-5: Response Management
Admins can:
- View all responses for a form.
- Filter responses by date, completion status, and respondent metadata.
- Open a single response and inspect answers question-by-question.
- Export responses to CSV.
- Delete a response when policy allows it.
- Close the form to stop new responses while preserving existing ones.
FR-6: Response Analytics
Reuse and extend the current submission summary patterns to provide:
- Total responses
- Response completion rate
- Response trend over time
- Per-question aggregates for structured questions
- Individual response replay for qualitative review
Out of scope for v1:
- AI summarization of comments
- Sentiment analysis
- Cross-form benchmarking
FR-7: Templates
Forms can be created from templates for common education use cases:
- student feedback
- course review
- enrollment
- parent intake
- event RSVP
- staff request
The existing template machinery should be reused where practical, but forms need their own template taxonomy and defaults.
Recommended Architecture
Principle
Reuse the question engine, not the course-bound entities.
Why not reuse exercise and submission directly?
Because the current schema and route model are tightly coupled to:
courseIdlessonIdsectionIdsubmittedBy -> groupmember- grading state
- score totals
- instructor review workflow
- course membership authorization
Trying to bend those entities into a general forms product will create permanent product and technical debt.
Technical Design
1. Shared Layer to Reuse
These assets should remain shared across Exercises and Forms:
@cio/question-types@cio/ui/custom/exercise-question- Answer payload serialization and codecs
- File-upload answer payload model
- Question renderer registry
- Template questionnaire JSON shape
- Submission summary chart primitives
2. New Domain Model
2.1 New form table
CREATE TABLE form (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
organization_id UUID NOT NULL REFERENCES organization(id) ON DELETE CASCADE,
title VARCHAR NOT NULL,
description TEXT,
status VARCHAR NOT NULL DEFAULT 'DRAFT',
slug VARCHAR NOT NULL,
access_mode VARCHAR NOT NULL DEFAULT 'PUBLIC',
response_mode VARCHAR NOT NULL DEFAULT 'ONE_PAGE',
collect_name BOOLEAN NOT NULL DEFAULT false,
collect_email BOOLEAN NOT NULL DEFAULT false,
allow_anonymous BOOLEAN NOT NULL DEFAULT true,
allow_multiple_responses BOOLEAN NOT NULL DEFAULT true,
allow_edit_response BOOLEAN NOT NULL DEFAULT false,
allow_save_draft BOOLEAN NOT NULL DEFAULT false,
response_limit INTEGER,
starts_at TIMESTAMPTZ,
ends_at TIMESTAMPTZ,
success_message TEXT,
settings JSONB NOT NULL DEFAULT '{}',
created_by_profile_id UUID,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
UNIQUE (organization_id, slug)
);
2.2 Form questions and options
Recommended v1 approach:
- Create
form_questionandform_question_optiontables mirroring the current exercise question structure. - Keep the payload shape aligned with the shared question contracts.
- Do not attempt a risky generic cross-product table migration in v1.
Reason:
- It ships faster.
- It avoids destabilizing the existing exercise product.
- It still preserves maximum code reuse at the question-engine layer.
Longer-term option:
- Introduce a generalized
questionnaire,questionnaire_question, andquestionnaire_responsemodel that both Exercises and Forms can use.
2.3 New form_response table
CREATE TABLE form_response (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
form_id UUID NOT NULL REFERENCES form(id) ON DELETE CASCADE,
organization_id UUID NOT NULL REFERENCES organization(id) ON DELETE CASCADE,
respondent_profile_id UUID,
respondent_email VARCHAR,
respondent_name VARCHAR,
status VARCHAR NOT NULL DEFAULT 'SUBMITTED',
source VARCHAR DEFAULT 'link',
submitted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
started_at TIMESTAMPTZ,
completed_at TIMESTAMPTZ,
metadata JSONB NOT NULL DEFAULT '{}'
);
2.4 New form_response_answer table
CREATE TABLE form_response_answer (
id BIGSERIAL PRIMARY KEY,
form_response_id UUID NOT NULL REFERENCES form_response(id) ON DELETE CASCADE,
form_question_id BIGINT NOT NULL REFERENCES form_question(id) ON DELETE CASCADE,
answer_data JSONB,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
3. API Surface
New org-level routes should be introduced rather than extending course exercise routes:
GET /organization/:orgId/formsPOST /organization/:orgId/formsGET /organization/:orgId/forms/:formIdPUT /organization/:orgId/forms/:formIdPOST /organization/:orgId/forms/:formId/publishPOST /organization/:orgId/forms/:formId/closeGET /organization/:orgId/forms/:formId/responsesGET /organization/:orgId/forms/:formId/responses/:responseIdGET /forms/:slugPOST /forms/:slug/respond
Optional authenticated draft routes:
POST /forms/:slug/draftPUT /forms/:slug/draft/:draftId
4. Dashboard Experience
4.1 Admin UI
New dashboard areas:
- Forms list page
- Form builder page
- Form response inbox
- Form analytics page
- Form settings/share page
4.2 Respondent UI
New public/internal form runner:
- Load form by slug or secure token
- Render via shared question components in
takemode - Submit to forms response endpoint
- Show thank-you state
5. Security and Abuse Controls
Public forms introduce risks the exercise system does not currently have.
Forms v1 must include:
- Rate limiting on public submit endpoints.
- Bot protection on public forms.
- File upload limits by size/type/count.
- Optional authenticated-only setting.
- Slug collision prevention.
- Safe export permissions restricted to authorized org users.
6. Reporting and Export
CSV export must include:
- response id
- submitted at
- respondent metadata
- one column per question
- file upload URLs or file identifiers
The dashboard must also support:
- total responses
- incomplete vs submitted
- per-question breakdown
- individual response view
Migration and Reuse Strategy
Phase 0: Shared Abstractions Cleanup
Low-risk cleanup before or during build:
- Confirm shared packages remain exercise-agnostic in behavior.
- Remove assumptions that all respondents are students.
- Allow shared labels to accept forms-specific copy.
- Extract any builder logic that currently depends on course page state.
Phase 1: Forms MVP
Ship:
- Form CRUD
- Draft/publish/close lifecycle
- Public and authenticated forms
- Shared question renderer reuse
- Response collection
- Response inbox
- CSV export
- Basic analytics
Phase 2: Education Workflow Expansion
Add:
- Templates for common school forms
- Save-and-resume drafts
- Edit submitted response
- Section/page builder
- Invite-only forms
- Better branding and embed support
Phase 3: Advanced Forms
Add:
- Conditional logic
- Hidden fields and prefill
- Webhooks/integrations
- AI summaries
- Approval workflows
Delivery Estimate
Team Assumption
- 2 full-stack engineers
- 1 product designer shared part-time
- QA support during stabilization
Rough Timeline
- Foundation and schema: 1-2 weeks
- Builder and shared renderer integration: 2-3 weeks
- Public/internal form runner and submission flow: 2 weeks
- Response inbox, analytics, export: 2 weeks
- Polish, abuse controls, QA, rollout: 1-2 weeks
Total
- 8-11 weeks for a strong MVP
- 12-16 weeks if v1 also includes save/resume, response editing, sections, and invite-only targeting
Key Risks
- Direct schema reuse temptation
- Reusing
exerciseandsubmissiondirectly will look faster initially but create major long-term coupling and UX compromises.
- Public file upload abuse
- This needs careful limits and monitoring from day one.
- Shared package naming drift
- The code can stay shared even if names remain exercise-centric for now, but this will become awkward if Forms grows quickly.
- Builder assumptions
- Some existing builder state is currently tied to course/exercise pages and will need extraction.
- Reporting expectations
- Users comparing the product to Google Forms or Typeform will expect polished analytics and exports even in early versions.
Open Questions
- Should public forms support anonymous file uploads in v1, or should file upload require authentication first?
- Do schools need one-response-per-email enforcement for public forms?
- Should forms live only under organizations, or also under public site/subdomain contexts?
- Is section/page support mandatory for MVP, or acceptable in phase 2?
- Do we need respondent notification emails on submit in v1?
- Do we need staff assignment/routing after submission, or is inbox + export enough for MVP?
Success Metrics
- At least 3 high-value school workflows can be completed without abusing exercises as forms.
- Form creation to publish time is under 10 minutes for common templates.
- Public form submission success rate stays above 98%.
- At least 70% of question rendering code is shared with the exercise product.
- Zero regressions in exercise creation, submission, and grading flows.
Bottom Line
It is realistic to build a strong Forms product on top of the current exercise implementation, but only if the reuse happens at the question engine layer, not by forcing form workflows into the existing course exercise and grading model.
The existing investment already removed the hardest part, which is rich question rendering and answer modeling. What remains is the product work that makes something feel like Google Forms or Typeform: publishing, sharing, respondent identity, response management, analytics, and public-safe submission infrastructure.