Document Management, Records & Digital Credentials
The centralized, role-controlled repository for every document, record and digital credential in NexusOne — with QR-verified certificates, transcripts and badges. Entirely Basic tier: none of this chapter's functionality is AI-powered, so it ships to every subscribed school regardless of plan.
Implementation note: the LMS course-completion Certificate lifecycle (Chapter 14) was already implemented and is reused as-is. This chapter adds the broader Document, DocumentRequest, DigitalBadge, Transcript and DocumentShare models plus their controllers/routes. Bulk document generation is intentionally kept simple (sequential, not queued) for this pass — see Chapter 22's pattern for a background-job conversion if volume grows. Camera-based QR scanning on mobile is deferred (manual code entry works today) since it would require adding a new native camera dependency not yet present in the app. Digital badges carry an optional Growth Passport track reference but are not yet surfaced inside the Chapter 21 Portfolio/Growth Passport pages themselves — today they're only visible in the Chapter 23 document wallet; cross-linking into the portfolio view is a fast-follow. Document versioning fields exist on the schema, but there's no re-upload/new-version endpoint yet — every upload is version 1.
Features
Document Repository
- Six ownership categories: identity, academic, medical, financial, employment, operational, certificate, contract, compliance
- Full lifecycle: draft → pending review → approved → issued → archived / expired / rejected
- Cloudinary-backed upload with type/size validation, versioning, and expiry tracking
- Web UI: /dashboard/documents (self-service wallet) and /dashboard/admin/documents (repository hub)
Document Requests
- Students, parents (on behalf of a linked child) and employees submit requests with a reason
- Admin approval auto-generates the document (bonafide, TC, conduct, study, enrollment, graduation, experience certificates) with merge fields, school branding and an embedded QR code
- Full notification trail: submitted → reviewed → approved/rejected → issued
- Web UI: /dashboard/documents/request, /dashboard/admin/documents/requests
QR Verification & Digital Credentials
- Every certificate, transcript, document and badge gets a unique 12-char verification code (XXXX-XXXX-XXXX)
- Public verification portal at nexus-one.in/verify/{code} — no login required, checks all four credential types
- Revocation returns verified: false with the revocation reason and timestamp, permanently
- Mobile: manual code-entry verification screen (camera QR scan intentionally deferred — no camera dependency in this app yet)
Digital Badges & Transcripts
- Badges: skill, achievement, competency, leadership, certification, with an optional passportTrack field to note the intended Growth Passport (Chapter 21) track
- Transcripts compiled from ReportCard (Chapter 12) data, rendered to a branded PDF with QR verification
- Web UI: badges & transcripts shown in /dashboard/documents; Mobile: badge-showcase.tsx
Secure Document Sharing
- Time-limited, optionally password-protected share links (max 90 days per business rule)
- University Sharing Package: bundles transcripts, certificates and documents into one read-only viewer link
- Admin notified when a share link is accessed; access count and last-accessed timestamp tracked
Document Analytics
- Total volume, breakdown by status and category, pending approval queue, expiring-soon count
- Nightly cron scans for 30/60/90-day expiry windows and auto-marks past-due documents as expired
- Web UI: /dashboard/admin/documents/analytics
API Reference — Chapter 23
Documents (Basic)
/api/documentsList documents — own for self-service roles, child's for parents, school-wide filterable for admins
/api/documents/uploadUpload an identity/academic document (Cloudinary)
/api/documents/:documentIdGet a single document
/api/documents/:documentId/downloadGet the download URL
/api/documents/:documentId/verifyAdmin verifies or rejects an uploaded document
/api/documents/:documentId/archiveArchive a document
/api/documents/generateAdmin generates a system document (bonafide, TC, etc.) with QR + merge fields
/api/documents/analyticsVolume, status/category breakdown, expiring-soon count
/api/documents/verify/:codePublic — verify a document by its code
Document Requests (Basic)
/api/document-requestsList / submit a document request
/api/document-requests/:requestId/approveApprove — auto-generates the document
/api/document-requests/:requestId/rejectReject with a reason
/api/document-requests/:requestId/cancelRequester cancels their own pending request
Transcripts & Badges (Basic)
/api/transcripts/generateCompile a term/annual/official transcript from ReportCard data
/api/transcripts/:studentIdList a student's transcripts
/api/transcripts/verify/:codePublic — verify a transcript
/api/badgesList school badges (admin/teacher)
/api/badges/issueIssue a new badge
/api/badges/student/:studentIdA student's badges (self, parent of, or staff)
/api/badges/:badgeId/revokeRevoke a badge
/api/badges/verify/:codePublic — verify a badge
Secure Sharing (Basic)
/api/documents/share-linkList / create a time-limited (optionally password-protected) share link
/api/documents/share-link/:id/revokeRevoke a share link
/api/documents/shared/:tokenPublic — access a shared document package
Certificates — Chapter 14 (Basic, pre-existing)
/api/certificates/generateStudent self-generates a course-completion certificate
/api/certificates/verify/:verificationCodePublic — verify a certificate
/api/certificates/:certificateId/revokeRevoke a certificate
Frontend Pages
| Path | Role | Description | Tier |
|---|---|---|---|
| /dashboard/documents | Student / Parent / All Staff | Document wallet — upload, view, badges, my requests, secure sharing (role-adaptive) | Basic |
| /dashboard/documents/request | Student / Parent / All Staff | Submit a document request | Basic |
| /dashboard/admin/documents | Admin / Super Admin | Repository hub — verify, archive, generate, issue badges | Basic |
| /dashboard/admin/documents/requests | Admin / Super Admin | Request approval queue | Basic |
| /dashboard/admin/documents/analytics | Admin / Super Admin | Volume, issuance & verification trends | Basic |
| /verify/{code} | Public — no login | Credential verification portal (certificate, transcript, document, badge) | Basic |
| /documents/shared/{token} | Public — no login | Read-only shared document package viewer (optionally password-protected) | Basic |
Mobile
Under app/(student)/:documents.tsx (wallet + upload),document-request.tsx,badge-showcase.tsx, andverify-credential.tsx(manual code-entry verification). Under app/(parent)/: a new document-request.tsx to request generated documents for a linked child, alongside the pre-existing documents.tsx(identity-document submission, a separate Chapter-2-era feature built on the StudentDocument model).