@withpotter/onboarding — module reference

HTTP routes this module mounts, plus its internal use-cases, entities, and repositories. The exhaustive request/response contract is the engine’s OpenAPI document at /docs; the layered structure below follows the package internal architecture.

HTTP routes

Onboarding /onboarding

MethodPathAuthDescription
GET/onboarding/:tenantId/progressYesGet onboarding progress for a tenant
POST/onboarding/:tenantId/dismissYesDismiss onboarding checklist
POST/onboarding/:tenantId/duplicateYesDuplicate a workspace (config only)
POST/onboarding/:tenantId/seedYesSeed sample content for tenant
POST/onboarding/provisionYesProvision a new tenant with template
PATCH/onboarding/:tenantId/intentsYesUpdate tenant intents
PATCH/onboarding/:tenantId/stepsYesUpdate onboarding step status

Internals

Use-cases

Application operations. Each is a single-purpose class with one execute() method.

Use-caseSignature
DismissOnboardingUseCaseexecute(tenantId: string): Promise<{ dismissed: boolean }>
DuplicateTenantUseCaseexecute(input: DuplicateTenantInput): Promise<DuplicateTenantResult>
GetOnboardingProgressUseCaseexecute(tenantId: string): Promise<OnboardingProgress | null>
ProvisionTenantUseCaseexecute(input: ProvisionTenantInput): Promise<ProvisionTenantResult>
SeedContentUseCaseexecute(input: SeedContentInput): Promise<SeedContentResult>
UpdateOnboardingStepUseCaseexecute(input: UpdateStepInput): Promise<UpdateStepResult>
UpdateTenantIntentsUseCaseexecute(input: UpdateTenantIntentsInput): Promise<UpdateTenantIntentsResult>

Entities

Sequelize models owned by this module.

OnboardingChecklist — table onboarding_checklists

FieldType
idstring
tenantIdstring
templateIdstring
stepDefinitionsOnboardingStepDefinition[]
stepProgressOnboardingStepProgress[]
completionPercentagenumber
completedAtDate | null
dismissedboolean
createdAtDate
updatedAtDate

Repositories

Data-access classes wrapping the entities.

OnboardingRepository

create · findByTenant · findByTenantOrFail · updateStepProgress · dismiss · reset

Generated from the module’s source. Routes are relative to the engine root (default http://localhost:3001). For full request/response schemas use the live OpenAPI document.