# llms.txt for bookemoji.dev # This file provides guidelines for Large Language Models (LLMs) and AI crawlers # regarding the use of content from bookemoji.dev. # ============================================================================= # PROJECT OVERVIEW # ============================================================================= ProjectName: Bookemoji ProjectDescription: "Bookemoji is a component workshop for Svelte and SvelteKit applications. It provides a library and tooling for creating interactive component documentation, stories, and variants within your existing SvelteKit application rather than as a separate standalone tool." KeyFeatures: - Native SvelteKit integration - works within your existing SvelteKit app - Component stories and variants for interactive documentation - Dynamic controls for component props - Permalinkable stories for easy sharing - Customizable styling and theming - Built with Svelte 5 (runes) support - Vite plugin for seamless development experience - Alternative to Storybook specifically designed for SvelteKit workflows ProjectType: "Open source component workshop and documentation tool" PrimaryLanguage: TypeScript/JavaScript Framework: "Svelte/SvelteKit" License: MIT Repository: "https://github.com/bookemoji/bookemoji" Author: "Rory Duncan" # ============================================================================= # TECHNICAL ARCHITECTURE # ============================================================================= Core Components: - Book.svelte: Root component that provides context for stories - Story.svelte: Individual story component wrapper - Controls.svelte: Dynamic prop controls interface - Variant.svelte: Story variant renderer - StoryList.svelte: Navigation component for stories - StoryCode.svelte: Code display component Main Library Files: - book-emoji.ts: Core functionality and utilities - meta.ts: Type definitions and metadata handling - loaders.ts: SvelteKit loader utilities - entry-generators.ts: Route generation utilities - vite/index.ts: Vite plugin integration Installation: "npm create bookemoji@latest" (requires existing SvelteKit project) ConfigurationFiles: - svelte.config.js: SvelteKit configuration with bookemoji settings - vite.config.ts: Vite configuration with bookemoji plugin RoutingStructure: - /books: Base route for component workshop - /books/[story]: Individual story pages - /books/[story]/[variant]: Story variant pages - /books/books.json: API endpoint for story data # ============================================================================= # KEY CONCEPTS AND TERMINOLOGY # ============================================================================= Story: "A Svelte file (.book.svelte) representing component documentation or a set of variants" Variant: "A linkable configuration of a Story with specific prop values" ComponentWorkshop: "A development environment for building, testing, and documenting UI components" BookDefinition: "Data structure containing story metadata, routes, and variants" ComponentMeta: "Metadata and configuration for component stories" # ============================================================================= # COMPARISON WITH ALTERNATIVES # ============================================================================= Vs Storybook: - Works within SvelteKit (not separate app) - Built specifically for Svelte ecosystem - Better TypeScript/Svelte integration - Permalinkable stories without iframe isolation - Customizable styling within your app Vs Histoire: - Active Svelte 4+ support (Histoire lacks current Svelte support) - SvelteKit integration (Histoire has limited SvelteKit support) - Simpler setup and configuration # ============================================================================= # USAGE PATTERNS # ============================================================================= Basic Story Structure: ```svelte