How sudoghut/sautoyrs works
Main Components
• Client-Side UI: All components within the "app" directory (e.g., layout.tsx, page.tsx) represent the main user interface. These files and their associated assets (like fonts, CSS in globals.css, etc.) form the front-end portion.
• Story Generation Engine: The integration with @mlc-ai/web-llm leverages the Gemma-2-Ataraxy-9B model (as specified in the README), responsible for story generation. Although it is running in-browser (thus client-side), it is conceptually isolated as the core ‘engine’ component.
• Browser-Based Cache: Mentioned in the README, the application downloads and stores the model (~5.2GB) to the browser cache with an option to remove it through settings. This is an important part of the architecture impacting performance.
• Configuration & Settings: Instructions for character customization, language content, cookie management (via js-cookie), and preferences are integral for driving the user experience.
• Tailwind CSS, Lucide React, and other libraries: These provide the UI styling and iconography.
File Structure and Relate to Architecture
• The “app” directory contains the Next.js pages, global styles, and layout components indicating a typical React/Next.js project structure.
• Configuration files (next.config.ts, tsconfig.json, tailwind.config.ts, postcss.config.mjs, etc.) are spread at the project’s root ensuring project-level setup and build practices.
• The “public” directory is used to serve static assets.
• The “backup” directory contains historical versions or backups of certain pages and documentation (like prompt-backup.md), which although not part of the final production, gives insights into iterative design.