Full-stack web application with i18n, CI, and plugin support. Supports locale switching, REST API, and extensible middleware.
| .cicada | Update protobuf musl linker flags | 3h ago | |
| docs | Locale contribution guide | 2w ago | |
| locales | Add pt (Portuguese) initial layout | 3d ago | |
| resources | Update fr wordlist v3.3.2 | 1w ago | |
| src | Fix locale fallback for multibyte sequences | 2h ago | |
| tests | Add test_ja_codepoint_preserved | 2h ago | |
| .gitignore | Add build artifacts | 3mo ago | |
| Cargo.lock | Bump icu4x to 2.0-beta2 | 5d ago | |
| Cargo.toml | Bump icu4x to 2.0-beta2 | 5d ago | |
| LICENSE | Initial commit | 4yr ago | |
| README.md | Update build status badges | 1w ago |
example-app
CI passing v3.3.2 14 locales
A full-stack web application with i18n, plugin support, and extensible middleware. Built with Rust, using ICU4X for Unicode handling and plugin-api for extensions.
Supported Locales
French (fr), German (de), Japanese (ja), Spanish (es), Portuguese (pt), Italian (it), Dutch (nl), Korean (ko), Chinese Simplified (zh-Hans), Arabic (ar), Hindi (hi), Russian (ru), Polish (pl), and Swedish (sv).
Building
# Clone with SHA-256 (default on Gumtree) $ git clone https://example.forge/necessary/example-app.git $ cd example-app # Build for your platform $ cargo build --release # Run tests $ cargo test # Build for a specific locale $ cargo build --release --features "locale-ja"
Architecture
The application is split into a platform-agnostic core (src/) and platform shells for iOS (Swift, via Facet FFI) and Android (Kotlin/JNI). The core handles locale fallback, plugin loading, and route resolution. Locale data lives in locales/ as Fluent .ftl files — see the Locale Contribution Guide for adding new locales.
Key modules
src/locale/ — Locale fallback and resolution per BCP-47 tagsrc/predict/ — Trie-based prediction with frequency weightingsrc/plugin/ — Integration with plugin-api via FFIsrc/route/ — Route resolver using BCP-47 locale tagslocales/ — Fluent .ftl translation files per locale
Contributing
Contributions are welcome! Locale contributions (new translations, wordlists, layout feedback) are especially valued. See docs/CONTRIBUTING.md for guidelines, or join !necessary/example-app on IRC to chat with the team.
License
Apache-2.0. See LICENSE.
Full-stack web application with i18n, CI, and plugin support.
Page Source
import { d as define , a , u , s , B as Button , N as Navbar } from "../server-entry.mjs" ;
import { C as CodeBlock } from "./CodeBlock-De-4QTIX.mjs" ;
import { S as StatusBar } from "./StatusBar-BQuHucTn.mjs" ;
import { R as RepoHeader } from "./RepoHeader-CUa-_UBh.mjs" ;
import { R as RepoTabs } from "./RepoTabs-C_wVCins.mjs" ;
import { B as BranchPicker } from "./BranchPicker-xM8yzsjN.mjs" ;
import { C as CommitStrip } from "./CommitStrip-B1Ne_0uh.mjs" ;
import { F as FileTree } from "./FileTree-DaoZhoYA.mjs" ;
import { R as ReadmeCard } from "./ReadmeCard-D7s755N-.mjs" ;
import { C as ClonePanel } from "./ClonePanel-BrPiOidF.mjs" ;
import { B as BuildStatusRow } from "./BuildStatusRow-DLr17dkm.mjs" ;
import { R as ReleaseRow } from "./ReleaseRow-DigdEozy.mjs" ;
import { C as ContributorGrid } from "./ContributorGrid-DUNy91qp.mjs" ;
import { I as IRCChannelRow } from "./IRCChannelRow-DySBR8Or.mjs" ;
import { S as SidebarCard } from "./SidebarCard-BJ0zMtWv.mjs" ;
import { L as LanguageBar } from "./LanguageBar-CdC-Q40t.mjs" ;
import { S as SearchInput } from "./SearchInput-D3rbpEPp.mjs" ;
import { A as Avatar } from "./Avatar-Potiq9_c.mjs" ;
import { I as Icon } from "./Icon-CgSYtcJ1.mjs" ;
import "node:fs/promises" ;
import "node:path" ;
const $$_tpl_2 = [ '<h1>example-app</h1><p><span class="readme-badge" style="color:#2ea44f;border-color:#2ea44f;background:#e8f5e8">' , ' CI passing</span> <span class="readme-badge" style="color:#7a3e9d;border-color:#7a3e9d;background:#f3ecfa">' , ' v3.3.2</span> <span class="readme-badge" style="color:#888;border-color:#ddd;background:#fff">' , " 14 locales</span></p><p>A full-stack web application with i18n, plugin support, and extensible middleware. Built with Rust, using " , " for Unicode handling and " , " for extensions.</p><h2>Supported Locales</h2><p>French (fr), German (de), Japanese (ja), Spanish (es), Portuguese (pt), Italian (it), Dutch (nl), Korean (ko), Chinese Simplified (zh-Hans), Arabic (ar), Hindi (hi), Russian (ru), Polish (pl), and Swedish (sv).</p><h2>Building</h2><pre>" , "</pre><h2>Architecture</h2><p>The application is split into a platform-agnostic core (<code>src/</code>) and platform shells for iOS (Swift, via " , " FFI) and Android (Kotlin/JNI). The core handles locale fallback, plugin loading, and route resolution. Locale data lives in <code>locales/</code> as Fluent <code>.ftl</code> files — see the " , " for adding new locales.</p><h3>Key modules</h3><p><code>src/locale/</code> — Locale fallback and resolution per BCP-47 tag<br><code>src/predict/</code> — Trie-based prediction with frequency weighting<br><code>src/plugin/</code> — Integration with plugin-api via FFI<br><code>src/route/</code> — Route resolver using BCP-47 locale tags<br><code>locales/</code> — Fluent .ftl translation files per locale</p><h2>Contributing</h2><p>Contributions are welcome! Locale contributions (new translations, wordlists, layout feedback) are especially valued. See " , " for guidelines, or join <code>!necessary/example-app</code> on IRC to chat with the team.</p><h2>License</h2><p>Apache-2.0. See " , ".</p>" ] ;
const $$_tpl_3 = [ '<p class="text-xs text-base-content/60 mb-2 leading-snug">Full-stack web application with i18n, CI, and plugin support.</p><div class="flex flex-col gap-0.5"><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , "" , '</div><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , ' 124 stars</div><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , ' 18 forks</div><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , ' 9 watchers</div><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , ' 14 locales supported</div><div class="flex items-center gap-1.5 py-0.5 text-xs text-base-content/50">' , " SHA-256 default hash</div></div>" ] ;
const $$_tpl_1 = [ '<div class="bg-[var(--bg-outer)] p-1.5"><div class="bg-base-200 flex flex-col">' , "" , "" , '<div class="px-3 py-3 pb-6 lg:px-6 lg:py-4 lg:pb-8"><div class="grid gap-5 max-w-[1100px] grid-cols-1 lg:grid-cols-[1fr_280px]"><div><div class="flex items-center gap-2 mb-3 flex-wrap">' , '<span class="text-xs text-base-content/50 flex items-center gap-1">' , ' <strong class="text-base-content/70">4</strong> branches</span><span class="text-xs text-base-content/50 flex items-center gap-1">' , ' <strong class="text-base-content/70">28</strong> tags</span><span class="text-xs text-base-content/50 flex items-center gap-1">' , ' <strong class="text-base-content/70">1,847</strong> commits</span><span class="flex-1"></span>' , "</div>" , "" , "" , '</div><div class="flex flex-col gap-3.5">' , "" , "" , "" , "" , "" , "" , "</div></div></div>" , '</div></div><div class="mt-8 border-t border-[var(--border-card)] pt-6 overflow-x-auto"><h2 class="text-lg font-heading font-semibold mb-3">Page Source</h2>' , "</div>" ] ;
const $$_tpl_4 = [ '<div class="hidden lg:flex gap-4">' , "" , "</div>" ] ;
const $$_tpl_5 = [ '<div class="flex items-center gap-4"><div class="hidden lg:block">' , "</div>" , "</div>" ] ;
const $$_tpl_6 = [ "<span>necessary/example-app · main · SHA-256</span>" ] ;
const $$_tpl_7 = [ '<span>1,847 commits · 12 contributors · 14 locales</span><span class="w-px h-3 bg-base-content/20"></span><span>Garage S3 · FoundationDB · gitoxide</span>' ] ;
const __source = await Deno . readTextFile ( new URL ( import . meta. url ) . pathname ) ;
const repoMeta = [ {
icon : "star" ,
label : "124 stars"
} , {
icon : "git-fork" ,
label : "18 forks"
} , {
icon : "eye" ,
label : "9 watchers"
} , {
icon : "scroll" ,
label : "Apache-2.0"
} , {
icon : "fingerprint" ,
label : "SHA-256"
} ] ;
const tabs = [ {
label : "Code" ,
icon : "code" ,
active : true
} , {
label : "Issues" ,
icon : "bug" ,
count : 7
} , {
label : "PRs" ,
icon : "git-pull-request" ,
count : 3
} , {
label : "CI" ,
icon : "pipe"
} , {
label : "Translations" ,
icon : "translate" ,
count : 14
} , {
label : "Chat" ,
icon : "chat-dots" ,
count : 3 ,
countAlert : true
} , {
label : "Settings" ,
icon : "gear"
} ] ;
const files = [ {
name : ".cicada" ,
type : "dir" ,
lastCommitMessage : "Update protobuf musl linker flags" ,
lastCommitDate : "3h ago"
} , {
name : "locales" ,
type : "dir" ,
lastCommitMessage : "Add pt (Portuguese) initial layout" ,
lastCommitDate : "3d ago"
} , {
name : "src" ,
type : "dir" ,
lastCommitMessage : "Fix locale fallback for multibyte sequences" ,
lastCommitDate : "2h ago"
} , {
name : "tests" ,
type : "dir" ,
lastCommitMessage : "Add test_ja_codepoint_preserved" ,
lastCommitDate : "2h ago"
} , {
name : "resources" ,
type : "dir" ,
lastCommitMessage : "Update fr wordlist v3.3.2" ,
lastCommitDate : "1w ago"
} , {
name : "docs" ,
type : "dir" ,
lastCommitMessage : "Locale contribution guide" ,
lastCommitDate : "2w ago"
} , {
name : ".gitignore" ,
type : "file" ,
lastCommitMessage : "Add build artifacts" ,
lastCommitDate : "3mo ago"
} , {
name : "Cargo.toml" ,
type : "file" ,
lastCommitMessage : "Bump icu4x to 2.0-beta2" ,
lastCommitDate : "5d ago"
} , {
name : "Cargo.lock" ,
type : "file" ,
lastCommitMessage : "Bump icu4x to 2.0-beta2" ,
lastCommitDate : "5d ago"
} , {
name : "LICENSE" ,
type : "file" ,
lastCommitMessage : "Initial commit" ,
lastCommitDate : "4yr ago"
} , {
name : "README.md" ,
type : "file" ,
lastCommitMessage : "Update build status badges" ,
lastCommitDate : "1w ago"
} ] ;
const languages = [ {
name : "Rust" ,
percentage : 62 ,
color : "#dea584"
} , {
name : "Swift" ,
percentage : 18 ,
color : "#89b4fa"
} , {
name : "Kotlin" ,
percentage : 8 ,
color : "#f9e2af"
} , {
name : "Fluent" ,
percentage : 6 ,
color : "#a6e3a1"
} , {
name : "YAML" ,
percentage : 4 ,
color : "#cba6f7"
} , {
name : "Other" ,
percentage : 2 ,
color : "#ccc"
} ] ;
const contributors = [ {
name : "brendan" ,
placeholder : "B" ,
color : "#89b4fa"
} , {
name : "alice" ,
placeholder : "A" ,
color : "#cba6f7"
} , {
name : "bob" ,
placeholder : "B" ,
color : "#a6e3a1"
} , {
name : "carol" ,
placeholder : "C" ,
color : "#f9e2af"
} , {
name : "dave" ,
placeholder : "D" ,
color : "#f38ba8"
} , {
name : "eve" ,
placeholder : "E" ,
color : "#94e2d5"
} , {
name : "fay" ,
placeholder : "F" ,
color : "#fab387"
} , {
name : "grace" ,
placeholder : "G" ,
color : "#74c7ec"
} ] ;
const repoLanding = define . page ( function RepoLandingExample ( ) {
return a ( $$_tpl_1 , u ( Navbar , {
brand : u ( "a" , {
class : "font-heading text-secondary font-extrabold uppercase tracking-wider text-base" ,
children : "Gumtree"
} ) ,
center : a ( $$_tpl_4 , u ( "a" , {
class : "text-xs font-semibold text-[#888] hover:text-[var(--color-secondary)] flex items-center gap-1" ,
children : [ u ( Icon , {
name : "compass" ,
size : 14
} ) , " Explore" ]
} ) , u ( "a" , {
class : "text-xs font-semibold text-[#888] hover:text-[var(--color-secondary)] flex items-center gap-1" ,
children : [ u ( Icon , {
name : "tray" ,
size : 14
} ) , " My Work" ]
} ) ) ,
end : a ( $$_tpl_5 , u ( SearchInput , {
placeholder : "Search repos, issues, PRs…"
} ) , u ( Avatar , {
size : "sm" ,
placeholder : "B"
} ) )
} ) , u ( RepoHeader , {
org : "necessary" ,
repo : "example-app" ,
visibility : "Public" ,
description : "Full-stack web application with i18n, CI, and plugin support. Supports locale switching, REST API, and extensible middleware." ,
meta : repoMeta
} ) , u ( RepoTabs , {
tabs
} ) , u ( BranchPicker , {
branch : "main"
} ) , u ( Icon , {
name : "git-branch" ,
size : 12
} ) , u ( Icon , {
name : "tag" ,
size : 12
} ) , u ( Icon , {
name : "git-commit" ,
size : 12
} ) , u ( Button , {
variant : "brand" ,
size : "sm" ,
children : [ u ( Icon , {
name : "download-simple" ,
size : 14
} ) , " Clone ▾" ]
} ) , u ( CommitStrip , {
authorName : "brendan" ,
authorPlaceholder : "B" ,
authorColor : "#89b4fa" ,
message : "Add es and pt to is_rtl() for comprehensive locale fallback" ,
sha : "a1f3e02" ,
time : "2 hours ago"
} ) , u ( FileTree , {
entries : files ,
class : "-mt-px"
} ) , u ( ReadmeCard , {
class : "mt-3" ,
children : a ( $$_tpl_2 , u ( Icon , {
name : "check-circle" ,
size : 11
} ) , u ( Icon , {
name : "tag" ,
size : 11
} ) , u ( Icon , {
name : "translate" ,
size : 11
} ) , u ( "a" , {
children : "ICU4X"
} ) , u ( "a" , {
children : "plugin-api"
} ) , s ( `# Clone with SHA-256 (default on Gumtree)
$ git clone https://example.forge/necessary/example-app.git
$ cd example-app
# Build for your platform
$ cargo build --release
# Run tests
$ cargo test
# Build for a specific locale
$ cargo build --release --features "locale-ja"` ) , u ( "a" , {
children : "Facet"
} ) , u ( "a" , {
children : "Locale Contribution Guide"
} ) , u ( "a" , {
children : "docs/CONTRIBUTING.md"
} ) , u ( "a" , {
children : "LICENSE"
} ) )
} ) , u ( SidebarCard , {
title : "Clone" ,
icon : "code" ,
children : u ( ClonePanel , {
urls : [ {
label : "SSH" ,
url : "git@example.forge:necessary/example-app.git"
} , {
label : "HTTPS" ,
url : "https://example.forge/necessary/example-app.git"
} ] ,
note : "SHA-256 object format · gitoxide compatible"
} )
} ) , u ( SidebarCard , {
title : "About" ,
icon : "info" ,
children : a ( $$_tpl_3 , u ( Icon , {
name : "scroll" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) , u ( "a" , {
class : "text-primary hover:underline" ,
children : "Apache-2.0"
} ) , u ( Icon , {
name : "star" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) , u ( Icon , {
name : "git-fork" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) , u ( Icon , {
name : "eye" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) , u ( Icon , {
name : "translate" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) , u ( Icon , {
name : "shield-check" ,
size : 14 ,
class : "text-base-content/30 w-4 text-center"
} ) )
} ) , u ( SidebarCard , {
title : "Builds" ,
icon : "hammer" ,
children : [ u ( BuildStatusRow , {
status : "pass" ,
label : "app-ci #313" ,
resultText : "11/11 passed"
} ) , u ( BuildStatusRow , {
status : "running" ,
label : "app-ci #312" ,
resultText : "8/11 running"
} ) ]
} ) , u ( SidebarCard , {
title : "Languages" ,
icon : "code" ,
children : u ( LanguageBar , {
languages
} )
} ) , u ( SidebarCard , {
title : "IRC · EucalyptIRCd" ,
icon : "chat-circle-dots" ,
children : [ u ( IRCChannelRow , {
name : "necessary/example-app" ,
type : "auto" ,
onlineCount : 4
} ) , u ( IRCChannelRow , {
name : ".../pr/131" ,
type : "auto" ,
onlineCount : 3
} ) , u ( IRCChannelRow , {
name : "design" ,
type : "custom" ,
onlineCount : 6
} ) ]
} ) , u ( SidebarCard , {
title : "Releases" ,
icon : "tag" ,
children : [ u ( ReleaseRow , {
version : "v3.3.2" ,
time : "yesterday" ,
isLatest : true
} ) , u ( ReleaseRow , {
version : "v3.3.1" ,
time : "1w ago"
} ) , u ( ReleaseRow , {
version : "v3.3.0" ,
time : "3w ago"
} ) ]
} ) , u ( SidebarCard , {
title : "Contributors · 12" ,
icon : "users-three" ,
children : u ( ContributorGrid , {
contributors,
overflow : 4
} )
} ) , u ( StatusBar , {
left : a ( $$_tpl_6 ) ,
right : a ( $$_tpl_7 )
} ) , u ( CodeBlock , {
code : __source
} ) ) ;
} ) ;
const routeCss = null ;
const css = routeCss ;
const config = void 0 ;
const handler = void 0 ;
const handlers = void 0 ;
const _freshRoute___examples_repo_landing = repoLanding ;
export {
config ,
css ,
_freshRoute___examples_repo_landing as default ,
handler ,
handlers
} ;