Thank you for your interest in contributing to SpooVault! This project is a multi-chain encrypted document vault supporting both Avalanche (EVM) and Stellar (Soroban) networks. We participate in open-source campaigns on Grantfox.
contracts/: Solidity smart contracts for Avalanche EVM.contracts-stellar/: Rust smart contracts for Stellar Soroban.src/: React + Vite frontend application.src/context/Web3Context.tsx: Manages multi-chain connections (Metamask for Avalanche, Freighter for Stellar). The silent auto-connect check (on mount and onaccountsChanged/chainChanged) retries transient failures with capped exponential backoff (3 attempts) and halts immediately - with no more retries until the user explicitly clicks Connect again - the moment a failure looks like an explicit wallet rejection.src/services/contract.service.ts: Client service wrapper routing calls to either network.src/services/stellar.service.ts: Stellar/Freighter wallet integration service.src/services/ipfs.service.ts,src/services/ipfsGateway.ts&src/services/keyInbox.service.ts: IPFS storage. Uploads use Pinata/proxy; downloads race Pinata, Infura, Cloudflare, and ipfs.io with a per-gateway circuit breaker.
- Node.js (v18 or higher) and npm
- Rust and Cargo (for Stellar/Soroban contracts)
- Soroban CLI (optional, for deploying Soroban contracts locally):
cargo install --locked soroban-cli
- Clone the repository and install dependencies:
npm install
- Set up your environment variables:
cp .env.example .env
- Compile contracts:
npx hardhat compile
- Run tests:
npx hardhat test - Deploy to Avalanche Fuji testnet:
npm run deploy:contract
CI runs Slither and Mythril against the Solidity contracts on every pull request. See the "Automated Security Analysis" section of SECURITY.md for the exact commands, the current findings policy, and how to reproduce a scan locally before pushing.
- Navigate to the contract folder:
cd contracts-stellar - Build the contract to WASM:
cargo build --target wasm32-unknown-unknown --release
- Run tests:
cargo test - Check test coverage (cargo-tarpaulin, same as CI):
Opens an HTML report at
cargo install cargo-tarpaulin --locked npm run test:stellar:coverage
coverage/tarpaulin-report.html. CI runs this on every push/PR (seecoverage.yml) and uploads the XML/HTML reports as thesoroban-coverage-reportworkflow artifact. SpooVault's PR policy targets >=90% line/branch coverage on new or modified contract code.
- Start the React/Vite development server:
npm run dev
- Start the local Pinata proxy (optional, for testing IPFS uploads without exposing Pinata keys):
Set the same value in
SPOOVUALT_PROXY_SECRET=dev-hmac-secret PINATA_JWT=your_jwt npm run proxy:pinata
VITE_SPOOVUALT_PROXY_SECRET. Unsigned or cross-origin pin requests are rejected with 403. - Use the network switcher in the header sidebar to toggle between Avalanche (MetaMask) and Stellar (Freighter).
- Run the frontend unit tests (Vitest):
npm run test
- Pick an Issue: Search the GitHub issues list for items marked
help wantedorgood first issue. - Branch Naming: Create a feature branch named
feature/issue-<number>-descriptionorbugfix/issue-<number>-description. - Write Tests: If you are changing smart contract logic, ensure tests are updated or added.
- Code Styling: Format your code before submitting a Pull Request.
- Submit PR: Describe your changes in detail and link to the issue you are fixing.