Effect-TS Architecture

Installation
SKILL.md

Effect-TS 7-Layer Architecture

Architecture patterns for this Holochain hApp's frontend: Service → Store → Schema → Errors → Composables → Components → Testing.

Key Reference Files

  • Service template: ui/src/lib/services/zomes/serviceTypes.service.ts
  • Store template: ui/src/lib/stores/serviceTypes.store.svelte.ts
  • Store helpers: ui/src/lib/utils/store-helpers/ (withLoadingState, createGenericCacheSyncHelper, etc.)
  • Zome helpers: ui/src/lib/utils/zome-helpers.ts (wrapZomeCallWithErrorFactory)
  • Error contexts: ui/src/lib/errors/error-contexts.ts
  • Cache service: ui/src/lib/utils/cache.svelte (CacheServiceTag, CacheServiceLive)

Service Layer Pattern

Services use Context.Tag for DI and wrapZomeCallWithErrorFactory to wrap Promise-based zome calls into Effects:

import { HolochainClientServiceTag } from '$lib/services/HolochainClientService.svelte';
Related skills
Installs
GitHub Stars
12
First Seen