StarkEd is a decentralized learning and credential verification platform powered by Stellar blockchain. It enables secure, tamper-proof issuance and verification of educational credentials, certificates, and achievements using Soroban smart contracts.
- ๐ Decentralized Learning - Course creation and management on blockchain
- ๐ Credential Verification - Tamper-proof certificates and achievements
- ๐ Stellar Integration - Fast, low-cost transactions on Stellar
- ๐ผ Professional Profiles - On-chain learning history and skills
- ๐ Achievement System - NFT-based badges and milestones
- ๐ Learning Analytics - Progress tracking and insights
- ๐ Secure Storage - IPFS integration for content persistence
- ๐ฎ Holographic Storage - Advanced 3D data storage simulation
- ๐ Cross-Platform - Web and mobile applications
- Stellar - Fast, scalable Layer 1 blockchain
- Soroban - Smart contract platform for Stellar
- Stellar SDK - JavaScript/TypeScript integration
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- TailwindCSS - Utility-first CSS framework
- Stellar Wallets - Freighter, Albedo, and more
- IPFS - Decentralized content storage
- Node.js - Server-side JavaScript runtime
- Express.js - Fast, minimalist web framework
- PostgreSQL - Robust relational database
- Redis - High-performance caching
- Prisma - Modern database ORM
- JWT - Secure authentication
- IPFS HTTP Client - Decentralized storage integration
- Rust - Memory-safe smart contract language
- Soroban SDK - Stellar smart contract development
- Cairo Compatibility - Cross-platform contract support
- Node.js (v18+)
- npm or yarn
- PostgreSQL
- Redis
- Freighter or compatible Stellar wallet
# Clone the repository
git clone https://github.com/jobbykings/starked-education.git
cd starked-education
# Install dependencies
npm run install:all
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Start development
npm run dev# Start Stellar network (local)
stellar standalone start
# Deploy contracts
cd contracts
npm run deploy:local
# Start backend
cd ../backend
npm run dev
# Start frontend
cd ../frontend
npm run devstarked-education/
โโโ contracts/ # Soroban smart contracts (Rust)
โ โโโ src/
โ โ โโโ lib.rs # Main contract logic
โ โ โโโ test.rs # Contract tests
โ โโโ Cargo.toml # Rust dependencies
โโโ frontend/ # Next.js React application
โ โโโ src/
โ โ โโโ app/ # App Router pages
โ โ โโโ components/ # Reusable UI components
โ โ โโโ lib/ # Utility functions
โ โโโ public/ # Static assets
โ โโโ package.json # Frontend dependencies
โโโ backend/ # Node.js API server
โ โโโ src/
โ โ โโโ routes/ # API endpoints
โ โ โโโ models/ # Database models
โ โ โโโ middleware/ # Auth and validation
โ โ โโโ utils/ # Helper functions
โ โโโ package.json # Backend dependencies
โโโ docs/ # Project documentation
โโโ scripts/ # Deployment and utility scripts
โโโ .github/ # GitHub workflows and templates
โโโ workflows/ # CI/CD pipelines
โโโ ISSUE_TEMPLATE/ # Issue templates
The core Soroban contracts handle:
- CredentialRegistry - Stores and verifies educational credentials
- CourseManager - Manages course creation and enrollment
- AchievementIssuer - Handles NFT-based achievement badges
- ProfileManager - Manages on-chain learning profiles
Our smart contracts implement advanced storage optimization techniques to reduce gas costs and improve deployment efficiency:
- Bit Packing - Multiple boolean flags and small integers packed into single bytes
- Hash-Based Storage - Large strings and vectors stored as hashes to save space
- Separate Storage Tiers - Frequently vs infrequently accessed data separated
- Packed Timestamps - Creation and update timestamps combined in single U256
- Optimized Ratings - Rating values and review counts packed together
- Shared Utilities - Common storage patterns abstracted into reusable utilities
| Contract | Storage Slots (Before) | Storage Slots (After) | Reduction | Gas Savings |
|---|---|---|---|---|
| UserProfile | 10 | 6 | 40% | ~2,500 gas |
| CourseMetadata | 17 | 12 | 29% | ~3,200 gas |
| Credential | 9 | 7 | 22% | ~1,800 gas |
| Achievement | 7 | 5 | 28% | ~1,500 gas |
| Overall | 43 | 30 | 30% | ~9,000 gas |
// Before: Separate fields
pub struct UserProfile {
pub created_at: u64,
pub updated_at: u64,
pub is_verified: bool,
pub is_active: bool,
pub privacy_level: PrivacyLevel,
}
// After: Packed storage
pub struct UserProfile {
pub timestamps: PackedTimestamps, // 2 timestamps in 1 U256
pub flags: PackedUserFlags, // 5 flags in 1 byte
}Run gas usage benchmarks:
cd contracts
cargo test --release -- --nocapture test_gas_benchmarksGenerate detailed gas report:
soroban contract invoke \
--id <contract-id> \
--fn generate_gas_report \
--wasm target/wasm32-unknown-unknown/release/starked_education.wasmPOST /api/auth/register- User registrationPOST /api/auth/login- User authenticationPOST /api/auth/refresh- Token refresh
GET /api/courses- List available coursesPOST /api/courses- Create new courseGET /api/courses/:id- Course detailsPOST /api/courses/:id/enroll- Enroll in course
POST /api/credentials/issue- Issue new credentialGET /api/credentials/:id- Verify credentialGET /api/credentials/user/:address- User credentials
GET /api/profiles/:address- Learning profile
POST /api/content/upload- Upload file to IPFSPOST /api/content/upload/batch- Upload multiple filesGET /api/content/:cid- Retrieve content from IPFSGET /api/content/:cid/metadata- Get content metadataPOST /api/content/:cid/pin- Pin content to IPFSDELETE /api/content/:cid/pin- Unpin content from IPFSGET /api/content/health- Check IPFS service health
POST /api/holographic/encode- Encode content in holographic formatGET /api/holographic/decode/:hash- Decode holographic contentPOST /api/holographic/access/parallel- High-speed parallel accessGET /api/holographic/metrics- Storage density and performance metricsPOST /api/holographic/optimize- Optimize storage density
StarkEd integrates with IPFS (InterPlanetary File System) for decentralized content storage, providing:
- File Upload & Storage - Upload educational content to IPFS with metadata
- Content Retrieval - Retrieve content in multiple formats (buffer, base64, stream)
- Progress Tracking - Real-time upload progress with WebSocket support
- Authentication - JWT-based auth with role-based permissions
- Caching - In-memory caching for improved performance
- Error Handling - Comprehensive error handling with retry mechanisms
import ipfsClient from './lib/ipfs';
// Upload a file
const result = await ipfsClient.uploadFile(file, {
metadata: { course: 'math101' },
onProgress: (progress) => console.log(`${progress.progress}%`)
});
// Retrieve content
const content = await ipfsClient.getContent(result.cid, 'base64');See backend/.env.example for IPFS configuration options.
For detailed documentation, see IPFS_INTEGRATION_README.md.
StarkEd includes an advanced holographic storage abstraction layer that simulates 3D spatial data storage:
- 3D Spatial Encoding - Data mapped to interference patterns in 3D space
- High-Speed Parallel Access - Simultaneous retrieval up to 15,000 MB/s
- Holographic Compression - Wavelet-based compression (2-3x ratio)
- Storage Density Optimization - Automatic optimization achieving 80-90% density
- Hardware-Ready API - Designed for future physical holographic hardware integration
// Encode educational content
const result = await fetch('/api/holographic/encode', {
method: 'POST',
body: JSON.stringify({
contentId: 'course-101',
data: Buffer.from(content).toString('base64')
})
});
// Parallel access for multiple resources
const materials = await fetch('/api/holographic/access/parallel', {
method: 'POST',
body: JSON.stringify({ hashes: [hash1, hash2, hash3] })
});For detailed documentation, see HOLOGRAPHIC_STORAGE_README.md.
GET /api/gas/benchmarks- View gas usage benchmarksGET /api/gas/report- Generate optimization reportGET /api/gas/compare- Compare old vs new storage patterns
- Earn Verifiable Certificates - Complete courses, earn blockchain-verified credentials
- Build On-Chain Portfolio - Showcase learning history and achievements
- Lifelong Learning Records - Persistent, portable academic records
- Create Blockchain Courses - Deploy courses with smart contract integration
- Issue Digital Certificates - Automate credential issuance
- Track Student Progress - Monitor engagement and completion
- Verify Credentials Instantly - Eliminate fraud with on-chain verification
- Reduce Administrative Overhead - Automate certificate management
- Global Credential Recognition - Cross-border verification
We welcome contributions! Please see our Contributing Guide for details.
Thanks to all our contributors! See the CONTRIBUTORS.md file for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Version: 0.1.0 (Alpha)
- Network: Stellar Testnet
- Status: Under Development
- Roadmap: View Project Board
- Gas Optimization: โ 30% storage reduction achieved
- Holographic Storage: โ Software abstraction layer implemented
- Latest Update: Holographic storage system with 3D spatial encoding
- โ 30% overall storage reduction across all contracts
- โ Bit packing implementation for boolean flags and small integers
- โ Hash-based storage for large data structures
- โ Separate storage tiers for access pattern optimization
- โ Comprehensive benchmarking suite implemented
- โ Shared storage utilities for code reuse and consistency
- Deployment Gas: Reduced by ~9,000 gas per contract deployment
- Transaction Gas: 15-25% reduction in average transaction costs
- Storage Efficiency: 30% fewer storage slots used
- Code Maintainability: Improved with shared utilities and patterns
โญ Star this repository to support decentralized education on Stellar!