Helpers
The @churchapps/helpers package provides base utilities used by all ChurchApps projects, both frontend and backend. It is framework-agnostic and includes common helpers such as DateHelper, ApiHelper, CurrencyHelper, plus the shared TypeScript interfaces that form the data contract between apps and APIs.
Before You Begin
- Install Node.js and Git -- see Prerequisites
- Familiarize yourself with the Packages workspace setup and release flow
Who Consumes This
Every ChurchApps API (the core Api, AskApi, and LessonsApi) and every web frontend (B1Admin, B1App, B1Transfer, LessonsApp) depends on this package directly. Frontends also get many of its exports (ApiHelper, DateHelper, UserHelper, and other interfaces) re-exported through @churchapps/apphelper. The other shared packages declare it as a peer dependency so each app resolves exactly one copy.
Setup for Local Development
This package lives in the Packages workspace alongside the other shared libraries:
-
Clone the workspace:
git clone https://github.com/ChurchApps/Packages.git -
Install dependencies at the workspace root:
cd Packages && yarn install -
Build (compiles TypeScript to
dist/):yarn workspace @churchapps/helpers buildOr run
yarn buildat the root to build every package in dependency order.
To test changes inside a consuming project, use a temporary Yarn portal -- see Local Development Against a Consuming App.
Publishing
Releases go through changesets rather than manual version bumps:
- Run
yarn changesetat the workspace root and select@churchapps/helperswith the appropriate bump type; commit the generated changeset file with your change. - When ready to release, run
yarn publish-allat the root -- it bumps versions, writes CHANGELOGs, builds in dependency order, and publishes to npm.
New shared interfaces go in helpers/src/interfaces/ and are re-exported through the package barrel. The website builder's element-type catalog (ElementTypes.ts — 35 types with their answers schemas) also lives here; it is the contract shared by the apphelper renderers, the B1Admin editor forms, and the AI generation prompts (see Website Builder Architecture).
Since this package is used by every ChurchApps project, changes here have a wide impact. A release of helpers automatically bumps apihelper and apphelper so their dependency ranges stay current. Test with a Yarn portal in at least one consuming API and one consuming web app before publishing.
Related Articles
- ApiHelper -- Server-side utilities that depend on this package
- AppHelper -- React components that depend on this package
- Shared Libraries Overview -- Workspace setup, release flow, and local-link workflow