anza-xyz / anza-xyz/kit

Describe user group package hierarchy

Open
#1,437 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
695
Forks
210
Avg merge
21h 33m
Merged PRs (30d)
90

Description

## Motivation

I'm updating the CONTRIBUTING.md here - https://github.com/anza-xyz/kit/pull/1427 to give contributors a walkthrough of the various packages on this project. I've been looking at the package dependency trees and feel like the user and developer experience could be improved.

It seems like all the packages depend on each other whenever, and as needed. This creates confusion as to what packages are flexible building blocks vs. APIs for framework authors and end users (e.g. https://github.com/anza-xyz/kit/pull/1428).

## Details

It could be clearer which packages should be dependencies for others by sorting them into user groups. I'm proposing the hierarchy described by the chart below.

Obviously, nothing here is final. Within this framework, packages need to be created, moved around, and rethought. Happy to discuss further.

```
┌──────────────────────────────────────────┐
│ @solana/kit │
│ What non-framework developers │
│ install and use │
│ (Re-exports everything below) │
└─────────────────┬────────────────────────┘


┌──────────────────────────────────────────┐
│ Packages for Framework Authors │
│ Examples: │
│ • @solana/codecs │
│ • @solana/addresses │
│ • @solana/accounts │
└─────────────────┬────────────────────────┘


┌──────────────────────────────────────────┐
│ Building Blocks for Kit Contributors │
│ Examples: │
│ • @solana/codecs-core │
│ • @solana/codecs-data-structures │
│ • @solana/codecs-numbers │
└──────────────────────────────────────────┘

┌──────────────────────────────────────────┐
│ **Helper Packages │
│ (Used by all levels) │
│ │
│ Examples: │
│ • @solana/errors │
│ • @solana/nominal-types │
│ • @solana/assertions │
│ • @solana/webcrypto-ed25519-polyfill │
└──────────────────────────────────────────┘
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.