localStorage Keys
| Key |
Type |
Description |
studentSubmissions |
Array |
All submitted assignments |
userNotifications |
Array |
Student notifications |
teacherNotifications |
Array |
Teacher notifications |
assignmentDrafts |
Object |
Auto-saved work in progress |
completedAssignments |
Array |
IDs of completed assignments |
Submission Object
{
// Unique identifiers
id: 'submission_1764001677508_um6scxa6x',
assignmentId: 'writing',
// Student info
studentName: 'Lucas Andrews',
// Assignment details
subject: 'Writing',
type: 'writing',
title: 'My Favorite Sport',
// Content (varies by type)
content: '<p>Baseball is my favorite sport...</p>',
writtenWork: '<p>Alternative storage...</p>',
canvasData: 'data:image/png;base64,...', // Math drawings
photos: ['data:image/jpeg;base64,...'], // Uploaded photos
// Reflections (required)
reflection: {
interesting: 'Learning about writing paragraphs',
hard: 'Thinking of enough sentences',
questions: 'How can I make my writing better?'
},
// Metadata
submittedAt: '2025-11-24T15:51:55.057Z',
timeSpent: 20, // minutes
wordCount: 108,
// Status tracking
status: 'pending' | 'returned' | 'graded',
reviewed: false,
// Teacher feedback (after review)
teacherFeedback: 'Great work Lucas! Your paragraph...',
grade: 'A',
areasOfStrength: ['Computation accuracy', 'Persistence/effort'],
areasNeedingPractice: ['Multi-step problems'],
followUpAction: 'Brief review in next lesson',
// Timestamps
returnedAt: '2025-11-24T16:30:00.000Z',
gradedAt: '2025-11-24T17:00:00.000Z',
// Follow-up
followUpNeeded: false,
followUpDate: '2025-11-25',
followUpTopic: 'Comma usage mini-lesson'
}
Notification Object
{
id: 'notif_' + Date.now(),
timestamp: '2025-11-24T15:51:55.057Z',
read: false,
title: '📝 Assignment Returned',
message: 'Your Math assignment has been reviewed. Check your feedback!',
action: {
type: 'viewAssignment',
assignmentId: 'math'
}
}
Notification Types
notif_graded_* |
Assignment received final grade |
notif_revision_* |
Assignment returned for revision |
notif_returned_* |
Teacher confirmation of return |
Assignment Draft Object
// Key: assignmentId
{
"writing": {
content: "<p>Work in progress...</p>",
reflection: {
interesting: "",
hard: "",
questions: ""
},
lastSaved: "2025-11-24T15:45:00.000Z"
},
"math": {
canvasData: "data:image/png;base64,...",
reflection: {
interesting: "The multiplication",
hard: "",
questions: ""
},
lastSaved: "2025-11-24T15:50:00.000Z"
}
}
ID Generation
// Submission ID format
id: 'submission_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9)
// Example: 'submission_1764001677508_um6scxa6x'
// Notification ID format
id: 'notif_' + Date.now()
// Example: 'notif_1764001677508'
// With type prefix
id: 'notif_graded_' + Date.now()
id: 'notif_revision_' + Date.now()
Status Values
| Status |
Meaning |
Student Sees |
pending |
Awaiting teacher review |
Yellow "Pending" badge |
returned |
Sent back for revision |
Red "Try Again" card |
graded |
Complete with grade |
Green "Graded" card with letter |
Content by Subject Type
| Subject |
Content Field |
Format |
| Writing |
content or writtenWork |
HTML from Quill |
| Reading |
content |
HTML from Quill |
| Science |
content |
HTML from Quill |
| Spelling |
content |
HTML from Quill |
| Math |
canvasData |
Base64 PNG image |
Debugging localStorage
// View all submissions
JSON.parse(localStorage.getItem('studentSubmissions'))
// View specific submission
const subs = JSON.parse(localStorage.getItem('studentSubmissions'));
subs.find(s => s.assignmentId === 'math')
// Clear all data (reset)
localStorage.clear()
// View notifications
JSON.parse(localStorage.getItem('userNotifications'))
JSON.parse(localStorage.getItem('teacherNotifications'))