Skip to content

Describe user group package hierarchy #1437

@datasalaryman

Description

@datasalaryman

Motivation

I'm updating the CONTRIBUTING.md here - #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. #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    │
└──────────────────────────────────────────┘

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions