Thank you for your interest in contributing to the Luzia SDK. This guide will help you get started with development, testing, and the release process.
- Bun v1.0 or later
- Node.js 18+ (for npm publishing)
-
Clone the repository:
git clone https://github.com/luziadev/luzia.git cd luzia -
Install dependencies:
bun install
-
Navigate to the SDK package:
cd packages/sdk -
Build the SDK:
bun run build
-
Run tests:
bun test
The SDK types are generated from the OpenAPI specification to ensure type safety and API contract compliance.
When the API changes, regenerate the types:
bun run generateThis reads /apps/api/openapi.yaml and outputs src/types/generated.ts.
After regenerating, verify that src/types/index.ts properly re-exports any new types with developer-friendly names.
Run the unit test suite:
bun testVerify the build output is valid and all exports work:
bun run test:buildThis script:
- Builds the SDK (
bun run build) - Imports from
dist/to verify exports - Runs runtime checks on all public APIs
Test against a running API server:
# Start API server in another terminal
bun dev:api
# Run manual test
bun run scripts/manual-test.ts lz_your_api_key- Follow existing patterns in the codebase
- Use TypeScript strict mode
- Keep bundle size minimal (zero runtime dependencies)
- Write JSDoc comments for public APIs
The SDK uses tag-based releases via GitHub Actions.
- Update
CHANGELOG.mdwith the new version and changes - The version in
package.jsonis set automatically during publishing
-
Ensure all changes are merged to
main -
Create and push a version tag:
git tag sdk-v1.0.0 git push origin sdk-v1.0.0
-
The GitHub Action will automatically:
- Build the package
- Run tests
- Publish to npm as
@luziadev/sdk - Create a GitHub Release
- Format:
sdk-v{semver}(e.g.,sdk-v1.0.0,sdk-v1.2.3) - The version is extracted from the tag name
Before tagging a release:
cd packages/sdk
# Build and test
bun run build
bun run test
bun run test:build
# Verify package contents
npm pack --dry-runSee ARCHITECTURE.md for detailed information about:
- Package structure
- Design decisions
- Type generation workflow
- Error handling patterns
- Retry logic
- Open an issue on GitHub
- Contact support@luzia.dev