Skip to content

Feature Map

This page maps every major feature of SisterShield to its code module, providing a quick reference for developers and evaluators.

Feature Overview

FeatureCode LocationDescriptionStatus
Authenticationsrc/lib/auth.ts, src/app/api/auth/Email/password login with NextAuth, JWT strategy, bcrypt hashing, role-based access (STUDENT, TEACHER, ADMIN)Complete
Registrationsrc/app/api/auth/register/route.ts, src/app/[locale]/(auth)/register/New user signup with email, name, password, role selection, preferred localeComplete
Dashboardsrc/app/[locale]/(dashboard)/dashboard/Role-aware home screen showing relevant courses, progress, and actionsComplete
Course Listingsrc/app/[locale]/(dashboard)/courses/page.tsxBrowse and filter published courses, role-based views (own vs all)Complete
Course Detailsrc/app/[locale]/(dashboard)/courses/[id]/page.tsxView course metadata, Twee source, version history, statusComplete
Course Editorsrc/app/[locale]/(dashboard)/courses/[id]/edit/page.tsxEdit course metadata, update Twee source, manage versionsComplete
Course Creation (Manual)src/app/[locale]/(dashboard)/courses/new/page.tsx, src/app/api/courses/create-from-twee/Upload or paste Twee source, set metadata, create courseComplete
AI Course Generationsrc/app/[locale]/(dashboard)/courses/generate/page.tsx, src/lib/llm/generate-story.tsLLM generates Twee 3 story from topic, objectives, and audienceComplete
Course Publishingsrc/app/api/courses/[id]/publish/route.tsCompile Twee, inject tracking, set status to PUBLISHEDComplete
Course Archive/Restoresrc/app/api/courses/[id]/archive/, src/app/api/courses/[id]/restore/Soft archive and restore coursesComplete
Course Playsrc/app/[locale]/(dashboard)/courses/[id]/play/page.tsx, src/components/twine/TwinePlayer.tsxLoad built HTML in iframe, postMessage-based progress trackingComplete
Twine Compilationsrc/lib/twine/compiler.tsTwee 3 to HTML compilation using tweego, IFID generationComplete
Tracking Injectionsrc/lib/twine/injector.tsInject JavaScript into compiled HTML for passage-change trackingComplete
Twine Parsersrc/lib/twine/parser.tsParse uploaded Twine HTML to extract passages and metadataComplete
Twee Utilitiessrc/lib/twine/twee-utils.tsParse Twee source into passage objects, link extractionComplete
Error Detectionsrc/lib/twine/detect-errors.tsDetect dead links, duplicate passages, and orphan passages in TweeComplete
AI Error Fixingsrc/lib/llm/fix-twee-errors.ts, src/app/api/courses/[id]/fix-errors/LLM repairs structural Twee errors (dead links, duplicates, orphans)Complete
AI Translationsrc/lib/llm/translate.ts, src/app/api/courses/translate-all/Batch metadata translation, full Twee story translation (en-US / ko-KR)Complete
AI Image Promptssrc/lib/llm/generate-image-prompts.ts, src/app/api/courses/[id]/generate-image-prompts/Generate DALL-E 3 prompts with style directive and character personasComplete
AI Image Generationsrc/lib/llm/client.ts (generateImage), src/app/api/courses/[id]/generate-image/DALL-E 3 image generation with safety constraintsComplete
Progress Trackingsrc/app/api/progress/, src/app/[locale]/(dashboard)/progress/Start, update, complete tracking per user per course with visited passages, time, quiz scoresComplete
Submission Uploadsrc/app/api/upload/twine/route.ts, src/app/[locale]/(dashboard)/submissions/new/Upload Twine HTML, parse metadata, create draft submissionComplete
Submission Reviewsrc/app/api/submissions/[id]/review/route.ts, src/app/[locale]/(dashboard)/submissions/[id]/review/Teacher reviews submissions (approve, reject, request changes), global queueComplete
Internationalizationsrc/lib/i18n/, src/messages/en-US.json, src/messages/ko-KR.jsonAll UI strings via next-intl, locale in URL path, locale switcherComplete
Quick Exitsrc/components/safety/quick-exit.tsxEmergency exit button + Escape key, clears sessionStorage, redirects to weather.comComplete
Get Helpsrc/components/safety/get-help.tsxDialog with Korean hotlines (1366, 112, 02-735-8994) and international resourcesComplete
Landing Pagesrc/app/[locale]/page.tsx, src/components/hero/Public landing with hero section, evidence quotes from APIComplete
Evidence APIsrc/app/api/hero-evidence/route.tsCRUD for landing page evidence items (bilingual quotes)Complete
Pilot Requestsrc/app/api/pilot-request/route.ts, src/app/[locale]/pilot/Pilot program interest formComplete
User Settingssrc/app/[locale]/(dashboard)/settings/page.tsxUpdate profile, preferred localeComplete
Design Systemsrc/app/globals.css, tailwind.config.tsSemantic tokens (brand-soft, progress-fill, safety-exit), shadcn/ui primitivesComplete
Security Headersnext.config.jsX-Frame-Options (SAMEORIGIN), X-Content-Type-Options (nosniff), Referrer-PolicyComplete
Teacher Access LogsTeacherAccessLog model in PrismaAudit trail for teacher actions on student resourcesComplete
E2E Teststests/ (Playwright)End-to-end tests for critical flowsComplete

API Route Reference

RouteMethodsAuthPurpose
/api/auth/[...nextauth]GET, POSTPublicNextAuth endpoints
/api/auth/registerPOSTPublicUser registration
/api/coursesGET, POSTAuthenticatedList and create courses
/api/courses/generatePOSTTeacher+AI story generation
/api/courses/create-from-tweePOSTTeacher+Create from Twee source
/api/courses/compilePOSTTeacher+Compile Twee to HTML
/api/courses/translate-allPOSTTeacher+Batch translate metadata
/api/courses/[id]GET, PUT, DELETEAuthenticatedCourse CRUD
/api/courses/[id]/publishPOSTTeacher+Publish course
/api/courses/[id]/archivePOSTTeacher+Archive course
/api/courses/[id]/restorePOSTTeacher+Restore archived course
/api/courses/[id]/playGETAuthenticatedGet built HTML for play
/api/courses/[id]/sourceGETTeacher+Get Twee source
/api/courses/[id]/update-contentPUTTeacher+Update Twee source
/api/courses/[id]/fix-errorsPOSTTeacher+AI error fixing
/api/courses/[id]/generate-image-promptsPOSTTeacher+AI image prompt generation
/api/courses/[id]/generate-imagePOSTTeacher+DALL-E 3 image generation
/api/submissionsGET, POSTAuthenticatedList and create submissions
/api/submissions/[id]GET, PUT, DELETEAuthenticatedSubmission CRUD
/api/submissions/[id]/submitPOSTAuthenticatedSubmit for review
/api/submissions/[id]/reviewPOSTTeacher+Review submission
/api/progressGETAuthenticatedList user progress
/api/progress/[courseId]GET, PUTAuthenticatedCourse progress
/api/progress/[courseId]/startPOSTAuthenticatedStart tracking
/api/progress/[courseId]/completePOSTAuthenticatedMark complete
/api/upload/twinePOSTAuthenticatedUpload Twine HTML
/api/files/[...path]GETAuthenticatedServe stored files
/api/hero-evidenceGET, POSTPublic/AdminEvidence items
/api/hero-evidence/[id]GET, PUT, DELETEAdminEvidence CRUD
/api/pilot-requestPOSTPublicSubmit pilot interest