This repository is a monorepo with two main packages:
quicklendx-contracts/: Soroban smart contracts in Rust (src/modules such asinvoice.rs,bid.rs,settlement.rs), plus contract tests and WASM size checks.quicklendx-frontend/: Next.js App Router frontend (app/,app/components/,app/lib/,public/).
Project-level docs live in docs/ and root *.md files. CI workflows are in .github/workflows/.
Run commands from the relevant package directory unless noted.
- Contracts:
cargo build(ormake build): build Rust contract.cargo test: run unit/integration tests.cargo test --features fuzz-tests fuzz_: run proptest fuzz tests../scripts/check-wasm-size.sh: enforce WASM size budget (256 KB).
- Frontend:
npm ci: install exact dependencies.npm run dev: start local dev server.npm run build: production build (includes type checks).npm run lint: run Next.js ESLint checks.npx tsc --noEmitandnpx prettier --check .: match frontend CI checks.
- Root helper:
./run_fuzz_tests.sh [quick|standard|extended|thorough].
- Rust: use
cargo fmt --all; keep modules and functionssnake_case, types/enumsPascalCase. - TypeScript/React: follow Next.js conventions; component files in
PascalCase(e.g.,ErrorBoundary.tsx), helpers incamelCase(e.g.,api-client.ts); prefer 2-space indentation in TS/JSON. - Keep functions focused, validate inputs, and avoid hardcoded secrets or environment-specific values.
- Add/extend
cargo testcoverage for contract logic changes. - For risk-sensitive contract paths, include fuzz tests under the
fuzz-testsfeature. - Frontend currently relies on lint, type-check, and build validation in CI; add targeted tests when introducing complex UI/state behavior.
- Follow observed Conventional Commit prefixes:
feat:,fix:,test:,docs:,chore:. - Keep commit scope specific (example:
test: add dispute lifecycle edge cases). - PRs should use
.github/pull_request_template.md, link related issues (Closes #...), summarize testing performed, and include screenshots for UI changes. - Ensure contract build/WASM checks and frontend lint/type/build checks pass before requesting review.