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:
- 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
- Keep
contract/ and remove contracts/middleware from workspaces until they have content, documenting the layout in README.md.
Acceptance criteria
Summary
The root
package.jsondeclares four workspaces:frontend,backend,contracts,middleware. In reality:contract/Cargo.toml,src/lib.rs)contracts/middleware/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, whosecontractsjob hard-codesworking-directory: contract.Impact
npm install/workspace commands silently ignore the Rust code path.npm runaggregation (build/lint across workspaces) will miss or misreport these areas.Proposed options
Pick one direction and document it:
contracts/), updating.github/workflows/ci.ymlandci-cd.yml(working-directory,Swatinem/rust-cacheworkspaceskey), orcontract/and removecontracts/middlewarefromworkspacesuntil they have content, documenting the layout inREADME.md.Acceptance criteria
package.jsonworkspacescontains only directories that exist and are used.