presentation/screens/domains/curriculum_creator_screens library
Deferred-load barrel for the content-acquisition flows: the starter
catalog (/domains/starters), the in-app import (/domains/import), and
the CLI-oriented pair (/domains/curriculum-creator and
/domains/upload-curriculum).
Defers file_picker for everyone who never opens one of these.
Classes
- CurriculumCreatorScreen
- Informational screen explaining how to use the Curriculum Creator CLI tool. Links to the GitHub repo and navigates to the upload screen.
- ImportCurriculumScreen
- Lets a solo learner turn pasted source material into a curriculum without leaving the app (audit H5).
- ProposedCurriculum
- A curriculum the model proposed from pasted text, before it is written.
- StarterCatalogScreen
- The curated starter catalog (audit H5, migration 072).
- UploadCurriculumScreen
- Screen for uploading curriculum output (manifest + structure + chunks).
Constants
- kImportMaxChars → const int
-
Mirrors
MAX_STRUCTURE_INPUT_CHARSinsupabase/functions/ai-proxy. Enforced client-side too so an oversized paste fails instantly and locally instead of after a request the learner pays for. - kImportMinChars → const int
- Shortest paste worth sending to the model. Below this there is nothing to organize and the round trip only spends the learner's tokens.
Functions
-
buildChunkRowsForUpload(
{required List chunks, required Map< String, String> titleToId, required Uuid uuid}) → List<Map< String, dynamic> > - Build flat chunk row maps for Supabase insertion.
-
buildTopicRowsForUpload(
{required List topics, required String domainId, required String? parentId, required List< Map< rows, required Map<String, dynamic> >String, String> titleToId, required Uuid uuid}) → void - Build flat topic row maps for Supabase insertion (depth-first).
-
countTopicsInStructure(
List topics) → int - Count total topics including nested children.
-
parseStructuredCurriculum(
String response, {String? nameOverride}) → ProposedCurriculum? - Parses the model's structuring response.
-
slugifyCurriculumTitle(
String title, {String suffix = ''}) → String - Derives a URL-safe, collision-resistant slug from a curriculum title.