Secure, Transparent, and Tamper-Proof Educational Credentials on Stellar Network
Cost-effective transactions โข Fast settlement โข Decentralized infrastructure โข Native Soroban contracts
๐ Stellar Network | ๐ Stellar Expert Explorer | ๐ง Get Test XLM
- Overview
- Why Stellar Network
- The Problem
- Our Solution
- Screenshots
- Key Features
- Smart Contracts
- Technology Stack
- Testing Strategy
- System Architecture
- How It Works
- Getting Started
- Environment Setup
- Usage Guide
- Project Structure
Acredia is a revolutionary decentralized platform that transforms how academic credentials are issued, stored, and verified. Built on Stellar Network, a decentralized network focused on financial inclusivity and fast, low-cost transfers, Acredia leverages blockchain technology, IPFS, and modern web technologies to eliminate credential fraud, reduce verification time, and provide lifetime access to verified academic records.
Traditional paper-based or centralized digital credentials suffer from:
- Easy forgery and tampering
- Time-consuming verification processes
- Risk of loss or damage
- Limited accessibility
- Centralized control and single points of failure
Acredia solves these problems by creating immutable, blockchain-verified credentials that are:
- โ Permanent and tamper-proof
- โ lntly verifiable
- โ Decentralized and censorship-resistant
- โ Accessible anywhere, anytime
- โ Privacy-preserving with student control
Acredia is built on Stellar Network, a decentralized network focused on providing financial inclusion and fast, low-cost transfers of assets globally:
๐ฐ Cost-Effective Transactions
- Minimal transaction fees (less than a cent)
- Makes credential issuance affordable for educational institutions worldwide
- Students can claim credentials without significant costs
โก Fast Settlement
- Transaction finality in 3-5 seconds
- Instant credential verification
- Improved user experience with near-instant confirmations
๐ Global Reach & Accessibility
- Designed for global financial inclusion
- Works on low-bandwidth connections
- Accessible from anywhere in the world
๐ Decentralized Infrastructure
- No single point of failure
- Community-run validator network
- Battle-tested since 2014
โป๏ธ Energy Efficient
- Minimal energy consumption
- Uses consensus algorithm designed for efficiency
- Supports sustainable applications
- Stellar Public Network: Production network (Network ID: Public Global Stellar Network)
- Stellar Testnet: Testing environment with test XLM faucet
- Block Explorer: Stellar Expert
- RPC/API Endpoints: Horizon API for reliable connections
- Native Currency: XLM (Lumens)
Smart Contracts: Soroban - Stellar's smart contract platform built on Rust
The current academic credential system faces critical challenges:
- Credential Fraud: Fake degrees and certificates cost employers billions annually
- Slow Verification: Manual verification takes days or weeks
- Institutional Dependency: Students rely on institutions to provide transcripts
- Data Loss: Physical documents can be lost, damaged, or destroyed
- Privacy Concerns: Sharing full credentials when only partial verification is needed
Acredia creates a three-layer verification system powered by Stellar Network:
- Blockchain Layer: Immutable credential records on Stellar Network using Soroban smart contracts
- Storage Layer: Decentralized metadata storage on IPFS
- Database Layer: Fast querying and indexing via Supabase
This architecture ensures credentials are:
- Permanent: Stored on blockchain forever
- Cost-Effective: Minimal transaction fees on Stellar Network make issuance affordable
- Fast: Near-instant transaction settlement
- Verifiable: Instant verification via token ID or QR code
- Decentralized: No single point of failure
- Detailed: Subject-wise marks, grades, and complete academic records
- Accessible: Students own their credentials via blockchain accounts
Modern, responsive landing page showcasing the platform's features
Students can view all their credentials with detailed information and blockchain verification
Institutions can issue credentials with subject-wise marks, grades, and complete academic records
Public verification page with blockchain proof and comprehensive credential details
Detailed subject-wise performance and blockchain transaction information
Contract owner dashboard for authorizing institutions and monitoring system statistics
Credential files and JSON metadata are permanently anchored on the decentralized IPFS network via Pinata
- Digital Wallet: Receive credentials as NFTs in your wallet
- Instant Access: View all credentials anytime, anywhere
- Easy Sharing: Generate QR codes or shareable verification links
- Subject Details: Access complete subject-wise marks and grades
- Lifetime Ownership: Credentials stored permanently on blockchain
- Simple Issuance: Issue credentials with an intuitive web interface
- Subject-Wise Records: Add detailed marks, grades, and performance data
- Batch Processing: Upload credentials for multiple students
- Blockchain Verification: Each credential is verifiable on-chain
- Authorization Control: Admin-approved issuer system
- Instant Verification: Verify credentials in seconds via token ID or QR code
- Blockchain Proof: Direct links to blockchain transactions
- Complete Details: View student information, institution, marks, and grades
- No Login Required: Public verification page accessible to anyone
- Tamper-Proof: Impossible to forge or modify credentials
- Authorization Management: Approve institutions to issue credentials
- System Statistics: Real-time dashboard with credential counts
- Contract Ownership: Full control over smart contract parameters
- Security: Only contract owner can authorize new issuers
Acredia uses a unified Soroban smart contract deployed on Stellar Network:
Contract ID:
CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF
Network: Stellar Testnet
Owner / Deployer:GAJRNUO6HSMQG4FNHNWQVRXJZJZ7QRA7HXPYYB6H5PTA3EAAJXJNZD7U
Deployed: 2026-04-01 (Updated Setup) Explorer: View on Stellar Expert โ
This single contract replaces two separate EVM contracts (CredentialNFT + CredentialRegistry) with one unified Soroban contract written in Rust. Additionally, it features upgraded Next.js boundary protection to bypass @stellar/stellar-sdk object coercions on the browser.
Purpose: Issue, store, and verify academic credentials on Stellar Network
Key Features:
- Authorization system โ only admin-approved institutions can issue credentials
- Immutable on-chain credential storage with IPFS metadata links
- Credential lookup by token ID or SHA-256 hash
- Revocation mechanism with issuer-only control
- Timestamp-based issuance records via
env.ledger().timestamp()
Contract Functions:
| Function | Access | Description |
|---|---|---|
initialize(owner) |
One-time | Initialize contract with owner address |
authorize_issuer(issuer) |
Owner only | Grant institution credential issuance rights |
revoke_issuer(issuer) |
Owner only | Remove institution authorization |
is_authorized_issuer(issuer) |
Public | Check if address is an authorized issuer |
issue_credential(student, issuer, hash, uri) |
Authorized issuers | Mint a new credential, returns token_id |
revoke_credential(token_id, issuer) |
Issuer only | Revoke an issued credential |
get_credential(token_id) |
Public | Fetch full credential struct by ID |
verify_credential(hash) |
Public | Look up credential by SHA-256 hash |
is_revoked(token_id) |
Public | Check revocation status |
total_credentials() |
Public | Get total credentials ever issued |
Storage Architecture:
DataKey::Authorized(Address)โinstancestorage (low-cost, ephemeral)DataKey::Credential(u64)โpersistentstorage (permanent, survives ledger closings)DataKey::HashIndex(String)โpersistentstorage (hash โ token_id index)
Network: Stellar Testnet
RPC Endpoint: https://soroban-testnet.stellar.org
Horizon API: https://horizon-testnet.stellar.org
Block Explorer: Stellar Expert (Testnet)
Network: Stellar Public Network
RPC Endpoint: https://soroban-mainnet.stellar.org
Horizon API: https://horizon.stellar.org
Block Explorer: Stellar Expert
All deployments, metadata hashes, and transaction executions can be publicly verified directly on the Stellar ledger explorer:
- Main Contract Viewer: AcrediaCredential Testnet Explorer โ
- Deployer Account Ledger: Stellar Account Overview โ
- Soroban RPC Instance:
https://soroban-testnet.stellar.org
โ ๏ธ Important: Always verify contract IDs on Stellar Expert before interacting with them. Never trust addresses from unofficial sources.
- Next.js 16 - React framework with App Router for optimal performance
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component primitives
- Stellar SDK - Wallet connection and blockchain interactions
- Lucide React - Modern icon library
- Rust - Language for Soroban smart contracts
- Soroban SDK - Smart contract development on Stellar
- Stellar Network - Distributed ledger for credential management
- Stellar SDK (JavaScript/Python) - Client library for blockchain interactions
- Horizon API - REST API for Stellar network queries
- IPFS - Decentralized metadata storage via Pinata
- Supabase - PostgreSQL database with Row Level Security
- PostgreSQL - Relational database for indexing
- RESTful APIs - Custom API routes in Next.js
- npm - Package manager used by
frontend/package-lock.json - ESLint - Code quality
- Prettier - Code formatting
- Git - Version control
Acredia employs a rigorous testing methodology to ensure absolute security and reliability before deployment on the Stellar Network:
- DataKey Validation: Utilizing
#[contracttype]enumerations rigorously enforces that unique contract state keys are tightly managed off-ledger, avoiding standard library allocation exceptions (no_std) required by Soroban. - Address Validation: Hardened validation ensuring
symbol_short!usage keeps within maximum string lengths, confirming valid G-Type Stellar identities.
Comprehensive unit testing utilizing vitest covering all utility logic natively on the UI structure:
- Ledger Identity Matching:
isValidAddressaccurately verifies if a 55-character string matches the absolute Stellar Ledger Public pattern (^G[A-Z2-7]{54}$). - State Transition Machine: Business-logic evaluations (
getNextStatus) verifying strict one-way credential progression: Draft โ Pending_Issuance โ Issued โ Revoked. Hard-coded safety blocks malicious regression. - Malicious Payload Defense: Dynamic testing blocking inputs containing short strings, missing public keys, or invalid empty object injections before the transaction reaches the
Freighterwallet prompt.
- Freighter API v6 Compatibility: Safe-parse bypass resolving
e.switch is not a functionby seamlessly handling both string and object responses (signedTxXdr) natively returned during wallet transaction signing. - RPC Parsing Fallback: Strict bypasses for parsing
xdr.ScValprimitives (like booleans) ensuring boolean RPC responses (e.g.,is_authorized_issuer) do not crash if executed directly through client-side Javascript prototype boundaries. - Zero-Balance Accounts: The simulation explicitly constructs dummy
Accountsequences (e.g., Sequence "0") to ensure read-only blockchain queries execute gracefully even if the user connects an unfunded0 XLMwallet.
graph TB
subgraph "Frontend Layer"
A[Next.js Application]
B[React Components]
C[Stellar SDK]
end
subgraph "Blockchain Layer"
D[AcrediaCredential Contract]
F[Stellar Network Ledger]
end
subgraph "Storage Layer"
G[IPFS Network]
H[Pinata IPFS Gateway]
end
subgraph "Database Layer"
I[Supabase PostgreSQL]
J[Row Level Security]
end
A --> B
B --> C
C --> D
C --> E
D --> F
E --> F
A --> H
H --> G
A --> I
I --> J
style A fill:#0ea5e9
style D fill:#f59e0b
style E fill:#f59e0b
style G fill:#8b5cf6
style I fill:#10b981
- Presentation Layer: User interfaces for students, institutions, and verifiers
- Application Layer: Business logic, authentication, and API routes
- Blockchain Layer: Smart contracts deployed on Stellar Network using Soroban for decentralized transaction processing
- Storage Layer: IPFS for decentralized metadata storage ensuring data persistence
- Database Layer: Supabase for fast queries and off-chain indexing with Row Level Security
Global Reach: Stellar Network's infrastructure is designed for global financial inclusion and accessibility
Cost-Efficiency: Minimal transaction fees on Stellar Network make the system economically viable for educational institutions worldwide
Security: Multi-layer approach ensures data integrity - blockchain for immutability, IPFS for decentralization, and Supabase for access control
Performance: Fast transaction settlement on Stellar Network provides excellent user experience
sequenceDiagram
participant Institution
participant Frontend
participant IPFS
participant Blockchain
participant Database
participant Student
Institution->>Frontend: Enter credential details
Frontend->>IPFS: Upload metadata + documents
IPFS-->>Frontend: Return IPFS hash
Frontend->>Blockchain: Mint NFT with IPFS hash
Blockchain-->>Frontend: Transaction confirmed
Frontend->>Database: Store credential record
Database-->>Frontend: Success
Frontend->>Student: Send NFT to wallet
Frontend-->>Institution: Credential issued successfully
sequenceDiagram
participant Verifier
participant Frontend
participant Database
participant IPFS
participant Blockchain
Verifier->>Frontend: Enter token ID or scan QR
Frontend->>Database: Query credential data
Database-->>Frontend: Return metadata
Frontend->>IPFS: Fetch detailed metadata
IPFS-->>Frontend: Return full data
Frontend->>Blockchain: Verify on-chain status
Blockchain-->>Frontend: Confirm validity
Frontend-->>Verifier: Display verification result
- Connect Wallet: Institution connects authorized wallet (Stellar account)
- Enter Student Details: Name, wallet address, credential type
- Add Academic Data: Degree, major, GPA, issue date
- Add Subject Marks: Subject name, marks obtained, maximum marks, grade
- Upload to IPFS: System uploads metadata to decentralized storage
- Record on Blockchain: Smart contract records credential on Stellar Network
- Database Record: System creates searchable database entry
- Confirmation: Student receives credential on Stellar blockchain
- Login: Authenticate with email or wallet
- Dashboard: View all issued credentials from Stellar
- Details: Click credential to see complete information stored on Stellar blockchain
- Share: Generate QR code or verification link
- Download: Export credential details or share blockchain proof from Stellar Expert
- Access: Navigate to public verification page (no login required)
- Input: Enter credential token ID or scan QR code
- Verification: System checks Stellar blockchain and IPFS
- Results: View complete credential details with blockchain proof
- Confirmation: Verify authenticity via Stellar Expert blockchain explorer link
Use npm for the frontend. This repository commits frontend/package-lock.json, and CI installs with npm ci.
From a fresh clone:
git clone https://github.com/Soumen1080/ACREDIA-STELLAR.git
cd ACREDIA-STELLAR\frontend
npm ci
Copy-Item .env.local.example .env.local
npm run devThen fill frontend\.env.local, run the Supabase SQL scripts listed below, and open http://localhost:3000.
TL;DR: Install prerequisites, clone the repo, run
npm ciinfrontend, copyfrontend/.env.local.example, run the two Supabase SQL scripts, and startnpm run dev. Deploy the contract only if you changed contract code or need a fresh contract ID.
Before you begin, ensure you have the following installed:
- Node.js (v20 recommended; v18 minimum) - Download
- npm (bundled with Node.js) - this repo includes
frontend/package-lock.json - Git - Download
- Stellar CLI - Install Guide
- Rust (for Soroban contracts) - Install
- Test XLM Tokens - Get from Stellar Testnet Faucet
- Clone the Repository
git clone https://github.com/Soumen1080/ACREDIA-STELLAR.git
cd ACREDIA-STELLAR- Install Frontend Dependencies
cd frontend
npm ci- Install Contract Build Toolchain
cd ../contracts
# Install the WASM32 build target (one-time setup)
rustup target add wasm32-unknown-unknown
# Install Stellar CLI if not already installed
cargo install --locked stellar-cli- Set Up Environment Variables
Copy the canonical frontend example:
cd ..\frontend
Copy-Item .env.local.example .env.localEdit frontend\.env.local and replace placeholder values:
# Smart Contract Addresses โ Stellar Testnet (deployed 2026-04-01)
# Single unified AcrediaCredential contract (replaces separate NFT + Registry)
NEXT_PUBLIC_CREDENTIAL_NFT_CONTRACT=CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF
NEXT_PUBLIC_CREDENTIAL_REGISTRY_CONTRACT=CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF
# Stellar Network Configuration
NEXT_PUBLIC_CHAIN_ID=testnet
NEXT_PUBLIC_NETWORK_NAME=testnet
NEXT_PUBLIC_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Admin access control
# Comma-separated list of emails that may access admin API routes.
# Admin accounts must be provisioned by a trusted Supabase/service-role process.
ADMIN_EMAIL_ALLOWLIST=admin@example.com
# Pinata IPFS (server-side only; set this in the frontend app environment)
PINATA_JWT=your_pinata_jwt_token
# Optional: custom Pinata gateway domain
# NEXT_PUBLIC_PINATA_GATEWAY=https://your-gateway.mypinata.cloudFor contract deployment secrets, copy the contract example only when you are deploying:
cd ..\contracts
Copy-Item .env.example .envThen edit contracts\.env:
STELLAR_NETWORK=testnet
STELLAR_SOURCE_ACCOUNT=deployer
STELLAR_CONTRACT_ID=Production warning: Keep
SUPABASE_SERVICE_ROLE_KEY,PINATA_JWT, and all Stellar secret keys server-only. Never put service-role keys, Pinata JWTs, or Stellar secret keys inNEXT_PUBLIC_*variables, browser code, screenshots, logs, or GitHub issues.
- Set Up Supabase Database
Run the canonical SQL setup listed in frontend/sql/README.md. For a fresh
Supabase project, run only these scripts in your Supabase SQL Editor:
-- Run these in order:
1. frontend/sql/database_schema.sql
2. frontend/sql/secure_rls_migration.sqldatabase_schema.sql creates tables, indexes, triggers, and enables RLS without
opening broad public policies. secure_rls_migration.sql is the canonical
production policy set and can be safely re-run after older deployments.
The older one-off SQL repair scripts are retained only as compatibility notices: they point back to the canonical setup flow and should not be run for new deployments.
The public testnet contract is already listed in frontend/.env.local.example. Skip this section unless you changed contracts/src/lib.rs, need an isolated test deployment, or are preparing a production deployment.
- Set Up Stellar Identity
# Generate a new Stellar account for deployment
stellar keys generate --network testnet deployer
# Fund the account with testnet XLM from Friendbot
stellar keys fund deployer --network testnet
# Confirm your address
stellar keys address deployer- Build & Deploy AcrediaCredential Contract
cd contracts
# Step 1: Build the WASM binary
cargo build --target wasm32-unknown-unknown --release
# Step 2: Deploy to Stellar Testnet
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/acredia_credential.wasm \
--source deployer \
--network testnet
# => Returns: CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF
# Step 3: Initialize the contract with your admin address
stellar contract invoke \
--id CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF \
--source deployer \
--network testnet \
-- initialize \
--owner $(stellar keys address deployer)
# Step 4: Authorize an institution to issue credentials
stellar contract invoke \
--id CCGDFDLPELTOWG5H5OA4MBR5OZWDP4XJI3S3TQZVZ7XTVP77EKOFORYF \
--source deployer \
--network testnet \
-- authorize_issuer \
--issuer <INSTITUTION_STELLAR_ADDRESS>For Mainnet deployment, replace --network testnet with --network public and use a funded mainnet account.
๐ Note: The contract is already deployed to testnet. You only need to re-deploy if you modify the contract code.
- Start the Development Server
cd frontend
npm run dev- Open in Browser
Navigate to http://localhost:3000
cd frontend
npm ci
npm run build
npm startBefore deploying to production:
- Use Stellar Public Network values only after contract review and a verified mainnet deployment.
- Rotate any secret that was pasted into chat, screenshots, logs, browser code, or an issue.
- Set server-only secrets (
SUPABASE_SERVICE_ROLE_KEY,PINATA_JWT, Stellar secret keys) only in the hosting provider's protected environment variables. - Confirm Supabase RLS is enabled and production policies come from
frontend/sql/secure_rls_migration.sql. - Verify contract IDs on Stellar Expert before pointing users at a production environment.
- Visit Pinata and sign up for free (no credit card required)
- Go to API Keys โ New Key
- Enable
pinFileToIPFSandpinJSONToIPFSpermissions - Copy the JWT token
- Add it to your frontend
.env.localasPINATA_JWT=...so only the server routes can use it.
Free tier: 1 GB storage, unlimited pins โ more than enough for development and testing.
- Create account at Supabase
- Create a new project
- Get your project URL and anon key from Settings > API
- Run the canonical SQL scripts in SQL Editor (see
frontend/sql/README.md):frontend/sql/database_schema.sqlfrontend/sql/secure_rls_migration.sql
The older repair scripts are kept for legacy deployments only. For a clean clone, use the two scripts above.
- Create Stellar account using Stellar CLI:
stellar keys generate --network testnet admin
- Fund your account with test XLM:
stellar keys fund admin --network testnet
- Get your public key:
stellar keys address admin - For testnet, fund from Stellar Testnet Faucet
-
Install Stellar Wallet (Options):
- Stellar Laboratory - Web-based
- Freighter Wallet - Browser extension (recommended)
- StellarTerm - Web interface
-
Create or Import Wallet:
- Generate new Stellar keypair or import existing
- Save your secret key securely (never share!)
-
Configure for Testnet:
- Network:
Stellar Testnet - Horizon API:
https://horizon-testnet.stellar.org - Soroban RPC:
https://soroban-testnet.stellar.org - Network Passphrase:
Test SDF Network ; September 2015
- Network:
-
Get Test XLM Tokens:
- Visit Stellar Testnet Faucet
- Click "Get Test Network Lumens"
- Select Account ID
- Enter your public key
- Request 10,000 test XLM
- Tokens arrive instantly
-
For Mainnet Deployment (Production):
- Network:
Stellar Public Network - Horizon API:
https://horizon.stellar.org - Soroban RPC:
https://soroban-mainnet.stellar.org - Network Passphrase:
Public Global Stellar Network ; September 2015 - Purchase XLM from exchange or use peer-to-peer transfers
- Network:
Authorizing Institutions
- Connect the contract owner wallet
- Navigate to Admin Dashboard
- Enter institution wallet address
- Click "Authorize Wallet"
- Confirm blockchain transaction
- Institution can now issue credentials
Issuing a Credential
- Login with authorized institution account
- Go to Dashboard > Issue Credential tab
- Fill in student details:
- Student Name
- Student Wallet Address
- Credential Type (Degree, Certificate, etc.)
- Degree/Major/GPA
- Issue Date
- Add subjects (click "+ Add Subject"):
- Subject Name
- Marks Obtained
- Maximum Marks
- Grade (optional)
- Click "Issue Credential"
- Confirm wallet transaction
- Wait for confirmation
- Student receives NFT in their wallet
Viewing Issued Credentials
- Go to Dashboard > Issued Credentials tab
- View all credentials issued by your institution
- See blockchain transaction hashes
- Access IPFS metadata links
Viewing Your Credentials
- Login with student account
- Dashboard displays all your credentials
- Click on any credential to see:
- Institution details
- Credential type and dates
- Subject-wise marks and grades
- Overall performance statistics
- Blockchain verification proof
Sharing Credentials
- Click "Share" on any credential
- Options:
- Generate QR Code
- Copy verification link
- Share token ID
- Recipients can verify without login
Verifying Credentials
- Go to verification page (no login required)
- Enter credential token ID OR scan QR code
- View complete credential details:
- Student information
- Issuing institution
- Academic records
- Subject-wise performance
- Blockchain proof
- Click blockchain link to verify on Stellar Expert
- Confirm credential is authentic and not revoked on Stellar Network
frontend/
โโโ public/
โ โโโ logo.png # Acredia logo
โ โโโ Acredia.png # Brand assets
โ โโโ screenshots/ # UI screenshots
โโโ src/
โ โโโ app/
โ โ โโโ page.tsx # Landing page
โ โ โโโ layout.tsx # Root layout with providers
โ โ โโโ globals.css # Global styles
โ โ โโโ about/
โ โ โ โโโ page.tsx # About page
โ โ โโโ admin/
โ โ โ โโโ page.tsx # Admin dashboard
โ โ โโโ api/
โ โ โ โโโ admin/
โ โ โ โโโ stats/route.ts # Statistics API
โ โ โ โโโ update-authorization/ # Authorization sync
โ โ โโโ auth/
โ โ โ โโโ login/ # Student/Institution login
โ โ โ โโโ register/ # User registration
โ โ โ โโโ admin-login/ # Admin authentication
โ โ โ โโโ admin-setup/ # Initial admin setup
โ โ โโโ dashboard/
โ โ โ โโโ page.tsx # User dashboard
โ โ โโโ verify/
โ โ โโโ page.tsx # Public verification page
โ โโโ components/
โ โ โโโ institution/
โ โ โ โโโ AuthorizeIssuer.tsx # Authorization UI
โ โ โ โโโ CredentialUploadForm.tsx # Issuance form
โ โ โ โโโ IssuedCredentialsList.tsx # Issued credentials
โ โ โโโ student/
โ โ โ โโโ StudentCredentialsList.tsx # Student's credentials
โ โ โ โโโ QRCodeModal.tsx # QR code display
โ โ โ โโโ CredentialDiagnostic.tsx # Debug component
โ โ โโโ verification/
โ โ โ โโโ (verification components)
โ โ โโโ shared/
โ โ โ โโโ (shared components)
โ โ โโโ ui/
โ โ โโโ button.tsx # Button component
โ โ โโโ card.tsx # Card component
โ โ โโโ input.tsx # Input component
โ โ โโโ form.tsx # Form components
โ โ โโโ (other UI primitives)
โ โโโ contexts/
โ โ โโโ AuthContext.tsx # Authentication context
โ โโโ hooks/
โ โ โโโ useAuth.ts # Authentication hook
โ โโโ lib/
โ โ โโโ contracts.ts # Smart contract interactions
โ โ โโโ credentialService.ts # Credential issuance service
โ โ โโโ ipfs.ts # IPFS upload utilities
โ โ โโโ supabase.ts # Supabase client
โ โ โโโ stellar.ts # Stellar/Soroban configuration
โ โ โโโ utils.ts # Utility functions
โ โโโ types/
โ โโโ index.ts # TypeScript type definitions
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript config
โโโ next.config.ts # Next.js configuration
โโโ tailwind.config.js # Tailwind CSS config
โโโ postcss.config.mjs # PostCSS config
โโโ components.json # Shadcn UI config
contracts/
โโโ src/
โ โโโ lib.rs # Soroban Smart Contract
โโโ Cargo.toml # Rust/Soroban dependencies
โโโ Makefile # Build and deployment scripts
โโโ target/ # Compiled WASM build output
credentials
โโโ id (uuid)
โโโ token_id (bigint) - NFT token ID
โโโ student_id (uuid) - Reference to students
โโโ institution_id (uuid) - Reference to institutions
โโโ ipfs_hash (text) - IPFS metadata hash
โโโ blockchain_hash (text) - Transaction hash
โโโ metadata (jsonb) - Credential details
โโโ metadata_schema_version (integer) - Canonical metadata schema version
โโโ hash_algorithm (text) - Hash algorithm identifier
โโโ issued_at (timestamp)
โโโ revoked (boolean)
โโโ revoked_at (timestamp)
โโโ student_wallet_address (text)
โโโ issuer_wallet_address (text)
students
โโโ id (uuid)
โโโ email (text)
โโโ name (text)
โโโ wallet_address (text)
โโโ created_at (timestamp)
institutions
โโโ id (uuid)
โโโ email (text)
โโโ name (text)
โโโ wallet_address (text)
โโโ verified (boolean)
โโโ created_at (timestamp)
verification_logs
โโโ id (uuid)
โโโ credential_id (uuid)
โโโ verified_at (timestamp)
โโโ verification_result (jsonb)
Credential hashes are derived from a versioned canonical payload, not directly from raw JSON.stringify(metadata).
- Current schema:
metadata_schema_version = 1 - Current algorithm:
hash_algorithm = sha256:canonical-json:v1 - Shared implementation:
frontend/src/lib/credentialHash.ts - Test vectors:
frontend/tests/credentialHash.test.ts
Schema v1 hashes only the credential meaning needed for verification: name, description, image, student wallet/name, credential type, degree, major, GPA, issue date, institution name, and normalized subjects. Optional fields are represented as null or empty arrays, numeric-like values are converted to strings where the UI treats them as text, and object keys are serialized in sorted canonical order.
Future metadata fields can be added to stored metadata or IPFS display metadata without changing old hashes. To make a new field part of the on-chain digest, add a new schema version and algorithm identifier, keep the v1 builder intact, add new fixed test vectors, store the new version on newly issued credentials, and keep verification dispatching by each row's stored metadata_schema_version and hash_algorithm.
- Rust & Soroban: Memory-safe and highly deterministic smart contracts
- Access Control: Only authorized issuers can mint credentials
- Owner Authorization: Contract owner controls authorization
- Soroban Security: Built-in protections against common smart contract vulnerabilities
- Row Level Security (RLS): Supabase database policies
- Wallet Authentication: Cryptographic signature verification
- Environment Variables: Sensitive data never committed
- HTTPS Only: All production traffic encrypted
- Public Verification: No authentication required for verification
- Student Control: Students own their credential NFTs
- Selective Disclosure: Share only what's necessary
- IPFS Storage: Decentralized, censorship-resistant
- No PII on Blockchain: Personal data only in IPFS/database
Acredia follows modern web design principles:
- Responsive: Works on desktop, tablet, and mobile
- Accessible: WCAG 2.1 compliant components
- Consistent: Unified design system with Tailwind CSS
- Intuitive: Clear user flows and interactions
- Professional: Gradient accents and modern aesthetics
- Fast: Optimized with Next.js App Router
# Contract tests (Rust based)
cd contracts
cargo test
# Build WASM
cargo build --target wasm32-unknown-unknown --release
# Frontend tests (if configured)
cd frontend
npm testBefore testing, ensure:
- Freighter Wallet is connected to Stellar Testnet
- You have sufficient test XLM tokens in your wallet
- Environment variables are properly configured
Network & Wallet
- Freighter Wallet connected to Stellar Testnet
- Test XLM tokens available in wallet
- Contract addresses correct in
.env.local
Credential Issuance
- Institution can issue credential on Stellar Network
- Transaction completes within 3-5 seconds
- Student receives NFT in wallet
- Metadata uploaded to IPFS successfully
- Database record created with correct chain data
- Subject-wise marks displayed correctly
- Gas fees are minimal (< $0.01)
Verification
- Public verification page loads
- Token ID search works
- QR code scanning works
- Stellar Expert blockchain link redirects correctly
- Subject table displays properly
- Transaction hash verifiable on Stellar Expert
Authorization
- Admin can authorize institutions
- Unauthorized wallets cannot issue
- Authorization status updates in database
- Smart contract development
- NFT credential issuance
- IPFS metadata storage
- Public verification page
- Subject-wise marks system
- Bulk credential issuance
- Advanced filtering and search
- Email notifications
- PDF certificate generation
- Stellar Network integration (Fast and low cost)
- Credential revocation UI
- Decentralized identity (DID) integration
- Mobile ins
- API for third-party integrations
- Analytics dashboard
- Cross-chain credential verification
- Institutional dashboards
- Batch operations
- Advanced reporting
- White-label solutions
- Compliance tools
- Stellar Mainnet production deployment
Problem: Freighter Wallet not connecting
- Solution: Ensure you're on Stellar Testnet and site permissions are granted
- Refresh the page and try connecting again
Problem: "Wrong Network" error
- Solution: Switch to Stellar Testnet in your wallet settings
Problem: Transaction failing
- Solution: Check you have enough test XLM tokens in your wallet
- Verify wallet is authorized to issue credentials (for institutions)
- Ensure your sequence number is correct
Problem: Contract deployment fails
- Solution: Verify your identity is funded on testnet (
stellar keys fund deployer --network testnet) - Ensure sufficient XLM balance for deployment
- Check Soroban SDK version compatibility in Cargo.toml
Problem: IPFS upload timeout / failed
- Ensure
PINATA_JWTis set in your frontend.env.local - Verify the JWT is valid at app.pinata.cloud
- Check your internet connection and try again
- Free tier is limited to 1 GB โ check your Pinata dashboard usage
Problem: Verification page shows "not found"
- Solution: Ensure RLS policies are enabled in Supabase (run SQL scripts)
- Check contract addresses in
.env.localare correct - Verify token ID exists on blockchain
Problem: Subjects not displaying
- Solution: Clear browser cache and reload page
- Ensure IPFS metadata contains subjects array
- Check IPFS gateway is accessible
This project is licensed under the MIT License. See the LICENSE file for details.
Built with amazing open-source technologies:
- Next.js - React framework
- Stellar Network - Decentralized network for global financial infrastructure
- Pinata - Immutable IPFS file storage APIs
- Supabase - Open-source Firebase alternative
- Soroban SDK - Native smart contracts platform for Stellar
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide Icons - Beautiful icon library
- IPFS - Decentralized storage network
For questions, feedback, or support:
- Open an issue on GitHub Issues
- Check existing issues for solutions
- Include setup steps, affected file paths, expected behavior, actual behavior, and labels such as
bug,docs,frontend,contracts, ordatabase.








