CredChain is a decentralized certificate issuance platform built on the Stellar Soroban smart contract platform. Registered institutions can issue tamper-proof credentials as NFTs, verify them instantly by ID, and maintain a transparent revocation list β all on the Stellar blockchain.
- Live Demo URL: https://credchain-stellar.vercel.app
- Deployed Contract Address:
CBMYQYSWFPCXG5B5WXC73P4V6WR765EGA2YSMMSNM32I47Q4YYAQDXFE - Successful Contract Call Tx Hash:
872a109b7bf635750440c9ba1a6444127205126e88254761d7c7beb300980ec1(Stellar Testnet)
graph TD
Client[Next.js Client] -->|Reads / Writes| RPC[Soroban RPC Server]
Client -->|XLM Transfers| Horizon[Stellar Horizon API]
Client -->|Connects & Signs| SWK[Stellar Wallets Kit]
SWK -->|Integrates| Freighter[Freighter Wallet]
SWK -->|Integrates| xBull[xBull Wallet]
SWK -->|Integrates| Albedo[Albedo Wallet]
RPC -->|Interacts| Contract[CredChain Soroban Contract]
Contract -->|Inter-Contract Call| Token[Stellar Asset Token Contract]
RPC -->|Emits Events| Client
- ποΈ Institution Registration β Register as a verified institution on-chain.
- π Certificate Issuance β Issue tamper-proof credential NFTs to recipients.
- β Instant Verification β Verify any certificate by ID and check its status.
- β Certificate Revocation β Revoke certificates with full on-chain transparency.
- πΈ Send XLM β Transfer XLM directly on the Stellar Testnet.
- π Real-Time Event Listening β Automatic UI updates and toast notifications using RPC contract event polling.
- π Dark Mode β Sleek dark/light theme toggle.
- π Multi-Wallet Support β Integrated via Stellar Wallets Kit (Freighter, xBull, Albedo).
- Smart Contract: Rust + Soroban SDK
- Frontend: Next.js 15 + TypeScript
- Styling: Tailwind CSS + shadcn/ui
- State: Zustand + TanStack Query
- Blockchain: Stellar Soroban +
@stellar/stellar-sdk - Wallet Integration:
@creit.tech/stellar-wallets-kit
credchain/
βββ contract/ # Soroban smart contract
β βββ Cargo.toml
β βββ src/
β β βββ lib.rs # Contract implementation
β β βββ test.rs # Contract tests
β βββ Makefile # Build rules
βββ client/ # Next.js frontend
β βββ src/
β β βββ app/ # Pages
β β β βββ page.tsx # Landing page
β β β βββ dashboard/ # Wallet, Send XLM & institution overview
β β β βββ app/ # Main application (Issuance & Revocation)
β β β βββ activity/ # Event feed & transactions history
β β βββ components/ # UI components
β β β βββ ui/ # UI primitives
β β β βββ Navbar.tsx
β β β βββ WalletModal.tsx
β β β βββ ActivityFeed.tsx
β β β βββ TransactionTracker.tsx
β β βββ hooks/ # Custom hooks
β β β βββ contract.ts # TanStack Query contract read/write hooks
β β β βββ useContractEventsListener.ts # Real-time Soroban RPC event poller
β β β βββ use-toast.ts
β β βββ stores/ # Zustand stores
β β β βββ wallet.ts # Wallet state & transaction actions
β β β βββ transactions.ts # UI transaction tracking
β β β βββ activity.ts # Activity events
β β βββ lib/ # Utilities
β β β βββ utils.ts
β β β βββ contracts.ts # Network config
β β β βββ scval.ts # ScVal converters
β β βββ types/ # TypeScript types
β βββ .env.example # Env template
β βββ scripts/deploy.sh # Deployment script
βββ README.md
- Rust (stable)
- Node.js 18+
- Stellar CLI (installed and on PATH)
- Freighter, xBull, or Albedo browser extension wallet
Copy client/.env.example to client/.env and update the variables:
cd client
cp .env.example .envNEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_CONTRACT_ADDRESS=CBMYQYSWFPCXG5B5WXC73P4V6WR765EGA2YSMMSNM32I47Q4YYAQDXFE- Install dependencies:
cd client npm install - Start the development server:
npm run dev
- Open
http://localhost:3000in your browser.
If you want to compile and deploy the contract yourself:
# Navigate to contract directory
cd contract
# Build the contract target
stellar contract build
# Deploy to Testnet
stellar contract deploy \
--wasm target/wasm32v1-none/release/credchain.wasm \
--source dev \
--network testnetRun unit tests for the smart contract (including mock token fee inter-contract calls):
cd contract
cargo testRun unit tests for the client-side XDR helper utilities:
cd client
npm run testThis project features a GitHub Actions workflow configured in .github/workflows/ci.yml. On every push and pull request to the main branch, the workflow:
- Sets up the Rust toolchain and installs components (
rustfmt,clippy). - Checks Rust contract formatting (
cargo fmt --check). - Runs Rust static code analysis and linting (
cargo clippy -- -D warnings). - Runs all 18 contract unit tests (
cargo test). - Builds the contract WASM target (
wasm32v1-none). - Installs frontend Node dependencies.
- Runs frontend code linting and style checks (
npm run lint). - Runs all 24 frontend unit tests (
npm run test). - Performs Next.js production compilation to verify build soundness.
The application supports connecting to multiple Stellar wallets (Freighter, xBull, Albedo). Once connected, the user's wallet address and status are displayed in the dashboard.
The wallet balance (retrieved directly from the Stellar Horizon network) is displayed dynamically in the Wallet Status card.
Users can send XLM transfers directly on the Stellar Testnet. When a transaction is submitted, the transaction is signed using the connected wallet and broadcasted to the network.
The real-time status of the transaction (pending, success, or failure) is shown to the user with detailed feedback and a direct link to view it on the Stellar Explorer.
The frontend has been verified on mobile, tablet, and desktop viewports to ensure clean layouts and smooth wallet interactions.
The automated GitHub Actions workflow executes building, linting, formatting, and unit testing on every push and pull request.
All 18 smart contract tests and 24 frontend store/utility tests pass successfully.
- IPFS Metadata Pinning: Automatically pin certificate metadata to IPFS/Arweave from the client side during issuance.
- Batch Issuance: Optimize the contract and frontend to support issuing multiple certificates to different recipients in a single transaction.
- Advanced Role Access: Implement multi-signature roles to allow multiple staff members to authorize certificate revocations.
- CSV/Excel Recipient Import: Allow upload of CSV lists of recipients to automatically generate certificates in bulk.
β
Wallet Connect β Supports connecting via multiple wallets.
β
Wallet Disconnect β Clean disconnect and state clearing.
β
Balance Display β Fetches and displays actual XLM balance from Horizon.
β
Testnet Transaction β Send XLM on Testnet directly in the dApp.
β
Error Handling β Handles wallet-not-installed, user-rejections, and insufficient-balances.
β
Multi-wallet Support β Handled via @creit.tech/stellar-wallets-kit.
β
Smart Contract Deployed β Deployed at CBMYQYSWFPCXG5B5WXC73P4V6WR765EGA2YSMMSNM32I47Q4YYAQDXFE.
β
Frontend Contract Calls β Fully integrated read/write interactions.
β
Contract Read β Checks institution status and verifies certificates.
β
Contract Write β Register institutions, issue, and revoke certificates.
β
Event Listener & Real-Time Sync Indicator β Real-time event polling, query cache invalidation, and live sync status badge in the Navbar.
β
Smart Contract Input Validation β Added safety checks rejecting empty inputs with custom InvalidInput errors.
β
Robust Testing β 18 smart contract unit tests and 24 frontend store/utility tests passing successfully.
β
CI/CD Pipeline Checks β Automated Rust formatting, clippy static analysis, and Next.js ESLint linting in GitHub Actions.
β
Transaction Status β Clear display of Pending, Success, and Failed states.
β
10+ Meaningful Git Commits β Grouped logically in Git history.
β
Public GitHub Repository β Pushed and accessible on GitHub.
β
README Complete β Fully detailed documentation with Mermaid architecture diagram.
β
Live Demo β Deployed and running on Vercel.
β
Demo Video Link β CredChain Level 3 Presentation Video (1-2 mins)






