Installation & Consumption
Relevant source files
The following files were used as context for generating this wiki page:
The wrelik-kit repository serves as a centralized monorepo containing vendor-agnostic adapters, shared utilities, and configuration packages for the Wrelik ecosystem. It is designed to act as the integration boundary between application code and third-party services, enforcing a "Postgres-first, provider-second" architecture that minimizes direct vendor SDK usage in application repositories.
Sources: README.md:1-12
Monorepo Architecture
The project is structured as a monorepo managed by pnpm and turbo. It separates logic into modular packages under the @wrelik/ scope. This structure allows applications to consume only the specific integrations they require while maintaining a unified standard for infrastructure.
The following diagram illustrates the relationship between the monorepo tooling and the package distribution:
The monorepo uses tsup for building packages into CJS and ESM formats and changesets for managing versioning and releases.
Sources: package.json:4-20, CONTRIBUTING.md:1-10, README.md:20-50
Local Development Setup
To begin development within the monorepo, specific engine requirements must be met, and a standard set of commands is used to prepare the environment.
| Requirement | Version | Source |
|---|---|---|
| Node.js | >=20.0.0 | package.json:23 |
| pnpm | >=9.0.0 | package.json:24 |
Getting Started
- Install Dependencies:
pnpm install - Build Packages:
pnpm build - Run Tests:
pnpm test
Sources: README.md:65-75, package.json:5-15
Consuming Packages in Applications
Applications within the Wrelik ecosystem are prohibited from importing vendor SDKs (like Clerk, Prisma, or AWS SDK) directly. Instead, they must consume functionality through the @wrelik/* adapter packages.
Installation Example
To add core infrastructure to an application:
pnpm add @wrelik/auth @wrelik/db @wrelik/storage
Sources: README.md:58-63
Dependency Enforcement
The @wrelik/eslint-config package enforces these boundaries by triggering linting errors if an application attempts to import directly from restricted vendor paths.
| Restricted Import | Replacement Package |
|---|---|
@clerk/nextjs | @wrelik/auth |
@prisma/client | @wrelik/db |
resend | @wrelik/email |
posthog-node | @wrelik/analytics |
inngest | @wrelik/jobs |
@aws-sdk/* | @wrelik/storage |
Sources: packages/eslint-config/index.js:15-45
Package Release Lifecycle
The repository follows a strict versioning process using changesets. This ensures that all changes are documented and that downstream applications can manage upgrades safely.
Creating a Changeset
When a change is made to any package, the developer must run:
pnpm changeset
This prompts for the semver bump type (patch, minor, or major) and generates a markdown file in the .changeset/ directory.
Sources: CONTRIBUTING.md:22-40, package.json:16-18
Summary
wrelik-kit provides a disciplined framework for infrastructure management. By mandating consumption through the @wrelik/ scope and enforcing this via ESLint and automated release cycles, the project ensures that vendor changes (e.g., switching from R2 to S3 or Resend to another provider) remain localized within the kit rather than requiring broad changes across multiple application repositories.
Sources: README.md:14-18, DECISIONS.md:12-16