What problem does it solve?
Building large-scale Holochain hApps with consistent, maintainable architecture can be challenging. This skill provides a battle-tested 7-layer Effect-TS architecture pattern, ensuring type safety, standardized services, and reactive state management across all domains. It reduces architectural drift and accelerates development.
Core Features & Use Cases
- 7-Layer Architecture: Standardized patterns for Service, Store, Schema, Error Handling, Composables, Components, and Testing.
- Effect-Native Services: Uses Context.Tag for dependency injection and composable error handling.
- Reactive Stores: Integrates Svelte 5 Runes with 9 helper functions for comprehensive state management.
- Use Case: A development team needs to implement a new domain within an existing Holochain hApp, ensuring it adheres to strict architectural guidelines and maintains high code quality and consistency. This skill provides the templates and validation tools to achieve this.
Quick Start
// Service Layer (Layer 1)
export const MyDomainService = Context.GenericTag<MyDomainService>("MyDomainService");
// Store Layer (Layer 2) with 9 helper functions
export const createMyDomainStore = Effect.gen(function* () {
// Implements: createUIEntity, mapRecordsToUIEntities, createCacheSyncHelper,
// createStatusAwareEventEmitters, createEntitiesFetcher, withLoadingState,
// createRecordCreationHelper, createStatusTransitionHelper, processMultipleRecordCollections
});
// Schema Layer (Layer 3)
export const CreateMyDomainSchema = Schema.Struct({
name: Schema.String,
// ... other fields
});