Technical Documentation

Installation

This package is published to the dicoding-dev GitHub Packages registry. To install it, you must first configure your local environment to authenticate with GitHub Packages.

📦 1. Via NPM GitHub Packages

Step 1: Create a Personal Access Token (PAT)

Go to your GitHub Developer Settings and create a new Personal access token (classic) with the read:packages scope.

Step 2: Configure your .npmrc

In your project's root directory (or your global ~/.npmrc), add the following lines:

//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN @dfbe:registry=https://npm.pkg.github.com

Step 3: Install the package

Now you can install the core engine along with its required peer dependencies:

npm install @dfbe/core react react-dom react-hook-form zod @hookform/resolvers react-router

📋 2. Peer Dependency Matrix

To ensure stability, please make sure your project uses compatible versions of the following peer dependencies:

DependencyVersion RequirementPurpose
react^19.0.0Core UI library.
react-router^7.0.0Routing and Navigation state.
react-hook-form^7.0.0Form state management.
zod^3.0.0Runtime validation schemas.
@hookform/resolvers^3.0.0Binding Zod to React Hook Form.

🛠 3. TypeScript Configuration

The package is built with TypeScript and provides full type definitions. For the best developer experience, we recommend the following tsconfig.json settings:

{ "compilerOptions": { "strict": true, "module": "ESNext", "moduleResolution": "Bundler", "verbatimModuleSyntax": true, "skipLibCheck": true } }

🔗 4. Local Installation (Development)

If you are developing features for the engine and want to test it in a local app without publishing:

npm install /path/to/dcd-campaign-form-builder/packages/core