NexaLedger is an end-to-end Web3 platform demo for tokenization, on-chain payments, and account-abstraction wallet controls.
- Tokenized receivables via
InvoiceNFT - Stablecoin settlement rails via
PaymentEscrow - Delegated wallet policy controls via
SmartAccount+PermissionManager - Backend relayer/indexer APIs using
Express+ethers - Premium dashboard UI in
Next.js
- Tokenization and payments:
- Invoice minting + escrow-based settlement flows map directly to digital asset use cases.
- Account abstraction and wallet architecture:
- Session-key controls and per-function spend limits demonstrate delegated wallet design.
- End-to-end Web3 delivery:
- Smart contracts, backend APIs, and polished frontend are integrated in one platform.
- Security and quality:
- Foundry tests, static analysis notes, and threat model documentation are included.
- Product and architecture collaboration readiness:
- Clear architecture docs and implementation tradeoffs are captured for team decision-making.
- Dashboard overview:
docs/screenshots/dashboard-desktop.png - Ledger and policy controls:
docs/screenshots/dashboard-mobile.png
contracts/: Solidity contracts, tests, and Foundry configbackend/: REST APIs, chain client, deployment scriptfrontend/: dashboard and UX flowsdocs/: architecture, threat model, and security scan notes
- Node.js 20+
- pnpm
- Foundry (
forge,anvil,cast)
- Install workspace dependencies
cd "/Users/abdelrahaman/Desktop/BLOCKCHAIN PROJECT/NexaLedger"
pnpm install- Install Foundry test library
cd contracts
forge install foundry-rs/forge-std- Start local chain
anvil --host 127.0.0.1 --port 8545- Run contract tests
cd "/Users/abdelrahaman/Desktop/BLOCKCHAIN PROJECT/NexaLedger/contracts"
forge test --offline -vv- Deploy contracts and generate env files
cd "/Users/abdelrahaman/Desktop/BLOCKCHAIN PROJECT/NexaLedger"
pnpm deploy:localThis writes:
backend/.envfrontend/.env.localdocs/local-deployment.json
- Build + run services
cd "/Users/abdelrahaman/Desktop/BLOCKCHAIN PROJECT/NexaLedger"
pnpm --filter nexaledger-backend build
pnpm --filter nexaledger-frontend build
# terminal 1
cd backend && node dist/index.js
# terminal 2
cd frontend && pnpm start --hostname 127.0.0.1 --port 3000- Backend:
http://localhost:4000/api/health - Frontend:
http://127.0.0.1:3000
-
InvoiceNFT.sol- Mints invoice NFTs with payer/token/amount/due-date metadata
- Tracks lifecycle state:
Created -> Funded -> Released/Refunded
-
PaymentEscrow.sol- Locks settlement tokens from payer
- Requires bilateral approvals for release or refund
- Supports emergency refund after due-date grace period
-
PermissionManager.sol- Defines per-account actor permissions by target + selector + token
- Enforces daily spend ceilings
-
SmartAccount.sol- Owner and session-key execution model
- Enforces policy checks before delegated execution
cd contracts
/Users/abdelrahaman/Library/Python/3.9/bin/slither . --exclude-dependencies- Findings summary and dispositions:
docs/security-scan.md
POST /api/invoicesPOST /api/invoices/:id/fundPOST /api/invoices/:id/releasePOST /api/invoices/:id/refundPOST /api/wallet/session-keysPOST /api/wallet/permissionsPOST /api/wallet/execute
- CI workflow:
.github/workflows/ci.yml - Sepolia deploy workflow:
.github/workflows/deploy-sepolia.yml
To use the deploy workflow, set repository secrets:
SEPOLIA_RPC_URLPRIVATE_KEYISSUER_ADDRESSPAYER_ADDRESS
- Create invoice in UI
- Fund invoice escrow
- Release settlement
- Configure session key and permission policy
- Execute wallet action via controlled account abstraction path