Skip to Content
DocumentationGuidesExamples Index

Examples Index

Comprehensive guide to GLOST examples organized by category and use case.

πŸ“‚ Organization

Examples are organized into three main categories:

  1. demos/ - Focused examples demonstrating specific features
  2. web-apps/ - Full web applications with UI
  3. benchmarks/ - Performance tests and stress tests

πŸš€ Quick Start

New to GLOST? Start here:

  1. Quick Start Example - Basic GLOST operations
  2. Core API Example - Working with large documents
  3. Extensions API Example - Extension patterns
  4. Processor API Example - Unified-style pipelines

πŸ“š By Category

Language-Agnostic Examples

Examples that work with any language:

ExampleDescriptionConcepts
Quick StartBasic document creation and manipulationNodes, Trees, Traversal
Core APILarge document handlingPerformance, Memory
Extensions APIExtension system usageComposition, Plugins
Processor APIUnified-style pipelinesFluent API, Presets

Language-Specific Examples

Examples demonstrating language-specific features:

Japanese

ExampleDescriptionFeatures
Japanese TranscriptionJapanese romaji transcriptionHiragana, Katakana, Kanji

Korean

ExampleDescriptionFeatures
Korean TranscriptionKorean romanizationHangul, Jamo decomposition

Thai

ExampleDescriptionFeatures
Thai TranscriptionThai RTGS romanizationThai script, Tone marks
Thai Extensions SuiteComprehensive Thai extensionsMultiple extensions, Pipelines
Thai Multi-Extension PipelineFull Thai processing pipelineExtension composition

Web Applications

Interactive demos with UI:

ExampleDescriptionTech Stack
Composition DemoInteractive extension compositionVite, TypeScript
Transcription DemoLive transcription playgroundVite, TypeScript

Performance & Benchmarks

ExampleDescriptionFocus
Stress TestsLarge document stress testsPerformance, 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 test

By Category

# Demos pnpm test:demos # Web Apps pnpm test:webapps # Benchmarks pnpm test:benchmarks

Specific Example

cd examples/demos/glost-quick-start-example pnpm test

Web 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

Last updated on