Local Development Workflow
Relevant source files
The following files were used as context for generating this wiki page:
The local development workflow for the wrelik-kit monorepo is designed to maintain a strict "adapter-first" architecture across shared packages. This environment ensures that all vendor-agnostic adapters, shared utilities, and configuration packages are built, tested, and linted according to centralized standards before being consumed by external applications.
The workflow leverages pnpm for package management and Turborepo for task orchestration, providing a unified interface for building, testing, and linting all packages within the @wrelik/ scope.
Sources: README.md:3-8, package.json:4-16
Environment Setup and Task Orchestration
Development in this repository requires Node.js (>=20.0.0) and pnpm (>=9.0.0). The project uses a task runner to manage inter-package dependencies and caching.
Core Development Commands
The root package.json defines standard scripts that delegate tasks to Turbo.
| Command | Action | Description |
|---|---|---|
pnpm install | Setup | Installs all workspace dependencies. |
pnpm build | Turbo Build | Compiles all packages into dist folders. |
pnpm dev | Turbo Dev | Starts development mode with persistent tasks. |
pnpm test | Turbo Test | Executes unit tests (Vitest) across all packages. |
pnpm lint | Turbo Lint | Runs ESLint checks using the shared @wrelik/eslint-config. |
pnpm clean | Cleanup | Removes dist folders and node_modules. |
Sources: package.json:4-18, README.md:65-79
Task Dependency Graph
Turborepo manages the execution order of tasks. For instance, testing a package requires it to be built first to ensure all internal workspace dependencies are resolved.
The diagram illustrates the task dependencies defined in the monorepo configuration where testing depends on a successful build.
Sources: turbo.json:4-12
Adding and Modifying Packages
The repository enforces a specific structure for all new packages to maintain consistency across the ecosystem.
Package Creation Checklist
- Location: Create a new directory within
packages/. - Identity: Initialize
package.jsonwith the@wrelik/scope. - Tooling: Add
@wrelik/tsconfigand@wrelik/eslint-configas development dependencies. - Implementation: Source code must reside in
src/index.ts. - Validation: Implement minimal tests (using Vitest).
Sources: CONTRIBUTING.md:3-9
Import Restrictions and Enforcement
The development workflow enforces strict boundaries. Developers are prohibited from importing vendor SDKs directly in application code and must use the @wrelik/* adapters. This is enforced via no-restricted-imports in the ESLint configuration.
This diagram shows the integration boundary where direct vendor imports are blocked in favor of the standardized wrelik-kit adapters.
Sources: packages/eslint-config/index.js:14-46, README.md:85-88
Versioning and Release Lifecycle
Versioning is managed through Changesets, ensuring that every modification to a package is documented and semantically versioned.
Changeset Workflow
- Creation: Run
pnpm changesetafter making changes. - Selection: Choose the packages that were modified.
- Impact: Select the semver bump type (patch, minor, or major).
- Commit: Include the generated
.changeset/*.mdfile in the pull request.
Sources: CONTRIBUTING.md:20-27
Release Process
The release follows a strictly defined lifecycle from development to NPM publishing.
The sequence diagram outlines the transition from a local commit to a public package release.
Sources: CONTRIBUTING.md:29-37
Summary
The local development workflow in wrelik-kit prioritizes infrastructure stability. By utilizing Turborepo for task management and Changesets for versioning, the project ensures that shared adapters for services like Clerk, Neon, and Cloudflare R2 are reliably maintained and consistently integrated across the Wrelik application ecosystem.