Effect-TS Architecture
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';
More from happenings-community/requests-and-offers
holochain development
This skill should be used when developing Holochain zomes, modifying zome functions, adding entry types or link types, setting up Holochain dev environment, or debugging Holochain-related issues
15deployment automation
This skill should be used when deploying, releasing, packaging, managing cross-platform builds, or troubleshooting CI/CD pipelines for Holochain hApps
14hrea integration
This skill should be used when working with hREA GraphQL integration, ValueFlows ontology mapping, proposal/intent creation, prerequisite management, or the pending queue system
1