Skip to content

About

Native Markdown rendering SDK for AI apps on Jetpack Compose and SwiftUI, with streaming LLM output and artifacts.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

EagleRender

CI License: MIT Android Apple

EagleRender is an open-source native Markdown Rendering SDK for AI apps.

It renders rich markdown and structured AI artifacts in Jetpack Compose and SwiftUI, with first-class support for real-time LLM streaming, OpenAI-compatible streams, Gemini-compatible streams, mock broken-chunk streams, custom themes, and component slots.

This is not a static markdown demo. The sample apps are live test harnesses for real AI responses.

Screenshots

Android corpus Android artifacts
Android EagleRender markdown corpus screenshot Android EagleRender tables, code, and artifact screenshot
iOS dark streaming iOS multilingual typography
iOS EagleRender dark long AI response screenshot iOS EagleRender multilingual typography screenshot

Why EagleRender

AI apps need more than plain text:

  • Markdown that streams without flicker.
  • Tables that remain readable on mobile.
  • Code blocks with copy affordances.
  • Images with loading, placeholder, and error states.
  • Citations, icon tokens, tool results, charts, accordions, metric cards, and thought signatures.
  • Native design systems, not web views.
  • Live OpenAI and Gemini testing without putting API keys in mobile apps.

EagleRender keeps those concerns separated:

Markdown input
  -> Streaming buffer
  -> Parser
  -> Normalized AST
  -> Artifact resolver
  -> Native renderer
      -> Jetpack Compose
      -> SwiftUI

Features

  • Kotlin core AST, parser, artifact model, theme tokens, and streaming buffer.
  • Jetpack Compose renderer with Material 3-compatible defaults.
  • SwiftUI renderer with Apple-platform defaults.
  • Flicker-resistant streaming markdown snapshots.
  • Generic artifact model for tables, images, charts, code, citations, metric grids, tool results, accordions, thought signatures, and custom types.
  • Theme tokens for typography, colors, spacing, radius, tables, code blocks, quotes, and links.
  • Component slots for replacing default paragraph, heading, table, image, code, and artifact rendering.
  • Local TypeScript proxy for mock, OpenAI-compatible, Gemini-compatible, and artifact streaming routes.
  • Shared markdown corpus used across platforms.
  • Android Paparazzi and iOS SnapshotTesting visual baselines.

Repository Layout

core/                         Kotlin AST, parser, artifacts, streaming
android-compose/renderer/     Jetpack Compose renderer SDK
android-compose/sample-app/   Android Material 3 sample and live harness
ios-swiftui/                  Swift Package, SwiftUI renderer, sample app
examples/corpus/              Shared markdown fixtures
server/proxy/                 Local streaming proxy
docs/                         Architecture, streaming, theming, testing, release docs
tasks/                        Implementation ledger

Quick Start

Clone and verify the SDK:

git clone https://github.com/eagleisbatman/eagle-render.git
cd eagle-render

Android and Kotlin:

./gradlew :core:test
./gradlew :android-compose:renderer:verifyPaparazziDebug
./gradlew :android-compose:sample-app:testDebugUnitTest :android-compose:sample-app:assembleDebug

SwiftUI:

cd ios-swiftui
swift test --filter \
  'MarkdownParserTests|MarkdownThemeTests|MarkdownRendererArtifactImageTests|SampleAppTests'
xcodebuild -project EagleRender.xcodeproj \
  -scheme EagleRenderSampleApp \
  -destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
  build

Streaming proxy:

cd server/proxy
npm ci
npm run build
npm test

Live OpenAI And Gemini Testing

Mobile apps must never contain provider API keys. EagleRender sample apps call the local proxy; only the proxy reads credentials from environment variables.

cd server/proxy
cp .env.example .env
$EDITOR .env
npm run build
npm run dev:env

Default proxy URLs:

  • Android emulator: http://10.0.2.2:43187
  • Android adb reverse fallback: http://127.0.0.1:43187
  • iOS simulator and macOS: http://localhost:43187

Supported routes:

  • POST /stream/mock
  • POST /stream/openai
  • POST /stream/gemini
  • POST /stream/artifacts

All providers are normalized to EagleRender SSE events:

data: {"type":"markdown_delta","text":"# Coffee Rust\n"}
data: {"type":"artifact","artifact":{"id":"table_1","type":"table"}}
data: {"type":"done"}

SDK Usage

Compose:

MarkdownRenderer(
    document = document,
    theme = MarkdownTheme.fromMaterialTheme(),
    components = MarkdownComponents.default(),
    artifactResolver = artifactResolver
)
StreamingMarkdownRenderer(
    stream = streamEvents,
    theme = MarkdownTheme.fromMaterialTheme(),
    artifactResolver = artifactResolver
)

SwiftUI:

MarkdownRenderer(
    document: document,
    theme: MarkdownTheme.fromAppTheme(),
    components: .default,
    artifactResolver: artifactResolver
)
StreamingMarkdownRenderer(
    stream: streamEvents,
    theme: MarkdownTheme.fromAppTheme(),
    artifactResolver: artifactResolver
)

Package Coordinates

Initial local package coordinates:

  • Android core: io.github.eagleisbatman:eaglerender-core:0.1.0
  • Android Compose renderer: io.github.eagleisbatman:eaglerender-compose:0.1.0
  • Swift Package product: EagleRender

Local Maven smoke test:

./gradlew :core:publishToMavenLocal :android-compose:renderer:publishToMavenLocal

Documentation

Platform Support

  • Android Compose renderer and sample app: API 23+.
  • SwiftUI renderer and sample app: iOS 13+ and macOS 10.15+.
  • Android sample UI follows Material Design / Material 3.
  • SwiftUI sample UI follows Apple platform conventions.

See Platform Support.

Status

EagleRender is a production-ready source baseline for the initial 0.1.0 SDK. The repository includes license, contribution guide, security policy, CI, snapshot baselines, local package publishing tasks, provider proxy tests, and live Android/iOS sample harnesses.

License

MIT. See LICENSE.

About

Native Markdown rendering SDK for AI apps on Jetpack Compose and SwiftUI, with streaming LLM output and artifacts.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages