A monorepo containing reusable core libraries for the DCL ecosystem.
This repository is organized as a monorepo using pnpm workspaces with the following structure:
core-libs/
βββ libs/
β βββ http-commons/ # Common middlewares and utils for HTTP Servers
β βββ crypto/ # Crypto auth primitives for Decentraland
β βββ crypto-middleware/ # Multi-framework authentication middleware for Decentraland signed requests
β βββ crypto-fetch/ # fetch wrapper that signs requests with a Decentraland Identity
- HTTP Commons (
@dcl/http-server-commons) - Middlewares and utilities for HTTP Servers
- Crypto (
@dcl/crypto) - Crypto auth primitives for Decentraland:Authenticator, signature validation, and auth-chain helpers
- Crypto Middleware (
@dcl/crypto-middleware) - Authentication middleware for Decentraland signed requests with Express, Koa, Passport and Well-Known Components adapters
- Crypto Fetch (
decentraland-crypto-fetch) -fetchwrapper that signs requests with a Decentraland Identity
- Node.js >= 22.0.0
- pnpm >= 10.0.0
# Install dependencies
pnpm install# Build all packages
pnpm build
# Run tests for all packages
pnpm test
# Start development mode (watch mode)
pnpm dev
# Clean build artifacts
pnpm clean
# Lint all packages
pnpm lintThis project uses Changesets for version management:
# Create a new changeset
pnpm changeset
# Version packages based on changesets
pnpm version-packages
# Build and publish packages
pnpm releaseEach library includes comprehensive test suites using Jest. Run tests with:
# Run all tests
pnpm test
# Run tests for a specific library
cd libraries/http-server-commons && pnpm testAll packages use TypeScript with strict configuration. TypeScript configuration is inherited from the root tsconfig.json and can be extended in individual packages.
Testing is configured with Jest and ts-jest for TypeScript support. The configuration is centralized in the root jest.config.js.
This project uses Changesets for automated version management and publishing to npm:
@dcl/http-server-commons@dcl/crypto@dcl/crypto-middlewaredecentraland-crypto-fetch
Every pull request that introduces changes to any package must include a changeset file that describes the changes and their semantic versioning impact.
When making changes to any package, run the changeset command to create a changeset file:
pnpm changesetThis interactive command will:
- Ask you to select which packages have changed
- Prompt you to choose the version bump type (major, minor, or patch)
- Request a summary of the changes for the changelog
The command creates a new file in the .changeset/ directory with your change description.
Include the generated changeset file in your PR:
git add .changeset/
git commit -m "chore: Add changeset for [your changes]"After peer review and approval, merge your PR. The changeset CI will automatically:
- Detect the merged changeset
- Create a new "Version Packages" PR with:
- Updated version numbers in
package.jsonfiles - Generated changelogs for each affected package
- Consumed changeset files (they'll be deleted)
- Updated version numbers in
Merge the "Version Packages" PR to trigger the automated publishing process:
- Packages are built and published to npm
- Git tags are created for the new versions
- GitHub releases are generated
- Changesets - Version management tool