Skip to content

chore(monorepo): resolve contracts/middleware workspace mismatch (empty dirs vs actual contract/ crate) #657

Description

@phertyameen

Summary

The root package.json declares four workspaces: frontend, backend, contracts, middleware. In reality:

Path State
contract/ The actual Soroban Rust crate (Cargo.toml, src/lib.rs)
contracts/ Empty directory, declared as npm workspace
middleware/ Empty directory, declared as npm workspace

This mismatch is actively confusing tooling and contributors: npm workspaces point at directories with no package.json, while the Rust crate everyone works in is invisible to workspace tooling and is only discovered through .github/workflows/ci.yml, whose contracts job hard-codes working-directory: contract.

Impact

  • npm install/workspace commands silently ignore the Rust code path.
  • Contributors following the README monorepo description land in the wrong directory.
  • Any future npm run aggregation (build/lint across workspaces) will miss or misreport these areas.

Proposed options

Pick one direction and document it:

  1. Rename the Rust crate directory to match expectations (contracts/), updating .github/workflows/ci.yml and ci-cd.yml (working-directory, Swatinem/rust-cache workspaces key), or
  2. Keep contract/ and remove contracts/middleware from workspaces until they have content, documenting the layout in README.md.

Acceptance criteria

  • Exactly one canonical location for the smart-contract crate.
  • All workflow files reference that location consistently.
  • package.json workspaces contains only directories that exist and are used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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