Skip to content

About

Effect UI with Elm hardening

Resources

Stars

14 stars

Watchers

0 watching

Forks

Repository files navigation

effect-ui-vite

An @effect/ui + Vite template hardened to Elm-level strictness, demonstrated with a localStorage todo app featuring cross-tab sync, async Web Crypto SHA-256 fingerprinting, and clipboard copy.

Strictness guarantees

  • Strictest TypeScript (tsconfig.json): extends @tsconfig/strictest with verbatimModuleSyntax.
  • No type-checker escape hatches (oxlint.config.ts): lint-bans any, all type assertions (as / <T>), non-null assertions (!), and @ts-* comments, plus checks Tailwind classes via eslint-plugin-better-tailwindcss.
  • Exhaustive Elm-style updates (src/App.ts): update uses one handler per AppMessage tag with no catch-alls.
  • Plain Schema models, validated at boundaries (src/Todo.ts, src/services/TodoStorage.ts): AppModel holds plain Schema data; localStorage JSON is decoded through Schema.fromJsonString(Schema.Array(Todo)) on both initial load and cross-tab storage events.
  • I/O only at explicit effect boundaries (src/services/TodoStorage.ts, src/services/Hasher.ts, src/services/Clipboard.ts, src/App.ts, src/index.ts): init, update, view, and head are pure; side effects live in Layers, Command.Services, Subscriptions, and the mount entry point.

Scripts

pnpm watch      # start dev server with live typechecking
pnpm check      # run tsc --noEmit && oxlint
pnpm lint       # run oxlint
pnpm typecheck  # run tsc --noEmit
pnpm build      # production build

About

Effect UI with Elm hardening

Resources

Stars

14 stars

Watchers

0 watching

Forks

Contributors

Languages