How sevan1211/prism works
PRISM is a browser-based reading workspace: users import and inspect a PDF, request and approve a source-grounded lesson plan, then read, revise, and retain the lesson alongside the evidence. The README also describes optional compatible-agent authoring and opt-in account cloud storage; local reading does not depend on either. The graph emphasizes those documented product branches and the sampled call paths. Some lesson and reader wiring is documented but not present in the excerpts, so uncertain internal links are omitted.
Main entry points: browserVault.ts Browser library · App.tsx PRISM workspace · SourceReader.tsx Source reader · usePrismLibraryTools.ts Library tools
Components 26
Reading workspace
- PRISM workspace
apps/web/src/App.tsx - Source library
apps/web/src/workspace/SourceLibrary.tsx - Source reader
apps/web/src/reader/SourceReader.tsx - Lesson reader
apps/web/src/lesson/LessonReaderPage.tsx
Source handling
- PDF import
apps/web/src/storage/browserSources.ts - Source indexing
apps/web/src/storage/sourceIndexWorker.ts - Contents analysis
apps/web/src/reader/contentsScanWorker.ts - Visual inspection
apps/web/src/reader/SourceVisualViewer.tsx
Lesson authoring
- Request composer
apps/web/src/lesson/LessonBriefComposer.tsx - Plan and scope
apps/web/src/lesson/lessonPlans.ts - Coverage review
apps/web/src/lesson/lessonCoverageReview.ts - Lesson documents
apps/web/src/lesson/lessonDocuments.ts - Lesson revisions
apps/web/src/lesson/lessonRevisionDiff.ts
Agent tools
- Tool registration
apps/web/src/webmcp/useModelContextTool.ts - Library tools
apps/web/src/webmcp/usePrismLibraryTools.ts - Topic tools
apps/web/src/webmcp/useTopicTools.ts
Library and sync
- Browser library
apps/web/src/storage/browserVault.ts - Sync journal
apps/web/src/storage/syncDatabase.ts - Cloud settings
apps/web/src/account/CloudStoragePanel.tsx - Cloud sync client
apps/web/src/storage/syncedLibrary.ts - Cloud API
apps/sync/worker.ts - Cloud metadata
db/schema.ts
Other components
- Reader
- Compatible agent
- Clerk
- Private R2 files
Connections 30
- Reader → PRISM workspace: uses
- PRISM workspace → Source library: shows library
- PRISM workspace → Source reader: opens source
- PRISM workspace → Lesson reader: opens lesson
- Source library → PDF import: imports PDF
- PDF import → Browser library: stores source
- Source indexing → Browser library: reads source
- Source reader → Browser library: reads evidence
- Source reader → Contents analysis: scans contents
- Source reader → Visual inspection: inspects figures
- PRISM workspace → Request composer: starts request
- Request composer → Plan and scope: saves plan
- Plan and scope → Coverage review: reviews scope
- Lesson reader → Lesson documents: reads lesson
- Lesson reader → Lesson revisions: reviews revisions
- Compatible agent → Tool registration: invokes tools
- Tool registration → Library tools: registers tools
- Tool registration → Topic tools: registers tools
- Library tools → Browser library: reads source
- Library tools → Lesson documents: reads and patches
- Library tools → Plan and scope: checks plan access
- Topic tools → Plan and scope: accesses plans
- Cloud settings → Cloud sync client: manages sync
- Cloud sync client → Browser library: syncs library
- Sync journal → Browser library: tracks writes
- Cloud sync client → Sync journal: journals changes
- Cloud sync client → Cloud API: sends requests
- Cloud API → Clerk: authenticates
- Cloud API → Cloud metadata: reads and writes
- Cloud API → Private R2 files: stores objects