Examples Index
Comprehensive guide to GLOST examples organized by category and use case.
π Organization
Examples are organized into three main categories:
- demos/ - Focused examples demonstrating specific features
- web-apps/ - Full web applications with UI
- benchmarks/ - Performance tests and stress tests
π Quick Start
New to GLOST? Start here:
- Quick Start Example - Basic GLOST operations
- Core API Example - Working with large documents
- Extensions API Example - Extension patterns
- Processor API Example - Unified-style pipelines
π By Category
Language-Agnostic Examples
Examples that work with any language:
| Example | Description | Concepts |
|---|---|---|
| Quick Start | Basic document creation and manipulation | Nodes, Trees, Traversal |
| Core API | Large document handling | Performance, Memory |
| Extensions API | Extension system usage | Composition, Plugins |
| Processor API | Unified-style pipelines | Fluent API, Presets |
Language-Specific Examples
Examples demonstrating language-specific features:
Japanese
| Example | Description | Features |
|---|---|---|
| Japanese Transcription | Japanese romaji transcription | Hiragana, Katakana, Kanji |
Korean
| Example | Description | Features |
|---|---|---|
| Korean Transcription | Korean romanization | Hangul, Jamo decomposition |
Thai
| Example | Description | Features |
|---|---|---|
| Thai Transcription | Thai RTGS romanization | Thai script, Tone marks |
| Thai Extensions Suite | Comprehensive Thai extensions | Multiple extensions, Pipelines |
| Thai Multi-Extension Pipeline | Full Thai processing pipeline | Extension composition |
Web Applications
Interactive demos with UI:
| Example | Description | Tech Stack |
|---|---|---|
| Composition Demo | Interactive extension composition | Vite, TypeScript |
| Transcription Demo | Live transcription playground | Vite, TypeScript |
Performance & Benchmarks
| Example | Description | Focus |
|---|---|---|
| Stress Tests | Large document stress tests | Performance, Memory |
π― By Use Case
I want toβ¦
Learn the Basics
β Start with Quick Start Example
Build a Language Learning App
β See Processor API Example
Add Transcription to My Language
β Check language-specific transcription examples:
Create Custom Extensions
β Study Extensions API Example
Optimize Performance
β Review Core API Example and Stress Tests
Build a Web Interface
β Explore web app examples:
π§ͺ Running Examples
All Examples
cd examples
pnpm testBy Category
# Demos
pnpm test:demos
# Web Apps
pnpm test:webapps
# Benchmarks
pnpm test:benchmarksSpecific Example
cd examples/demos/glost-quick-start-example
pnpm testWeb Apps (Dev Mode)
cd examples/web-apps/glost-composition-demo-example
pnpm devπ Additional Resources
Core Concepts
Plugin Development
API Documentation
Language Support
πΊοΈ Language Γ Feature Matrix
See MATRIX.md for a complete matrix showing all possible language + feature combinations.
ποΈ Example Structure
All examples follow a consistent structure:
glost-{name}-example/
βββ package.json # Dependencies and scripts
βββ README.md # Example-specific docs
βββ tsconfig.json # TypeScript config
βββ vitest.config.ts # Test config (optional)
βββ src/
βββ index.ts # Main entry point
βββ __tests__/ # Co-located tests
βββ *.test.tsπ€ Contributing
Want to add a new example? See CONTRIBUTING.md for guidelines.
Naming Conventions
- Language-Agnostic:
glost-{feature}-example - Language-Specific:
glost-{lang}-{feature}-example - Web Apps:
glost-{name}-demo-example - Benchmarks:
glost-{name}-example
All examples:
- Must be marked
"private": true - Should include tests in
src/__tests__/ - Should have a descriptive README.md
For the most up-to-date list of examples, see examples/README.md