A full-stack blockchain education platform with Soroban smart contracts, Stellar blockchain integration, and modern React frontend.
Web3 Student Lab is a comprehensive learning platform that teaches blockchain development through hands-on courses. Students can enroll in courses, complete lessons, and earn verifiable certificates stored on the Stellar blockchain using Soroban smart contracts.
web3-student-lab/
├── frontend/ # Next.js 16 + React 19
├── backend/ # Node.js + Express + Prisma
├── contracts/ # Rust + Soroban Smart Contracts
├── docs/ # Documentation
└── docker-compose.yml # Container orchestration
Frontend:
- Next.js 16 (App Router)
- React 19
- TypeScript 5
- Tailwind CSS 4
- Axios
- @stellar/stellar-sdk
Backend:
- Node.js + Express
- TypeScript
- Prisma ORM
- PostgreSQL
- JWT Authentication
- bcryptjs
Smart Contracts:
- Rust
- Soroban SDK
- Stellar Blockchain
- Authentication (Login/Register)
- Student Dashboard
- Course Catalog
- Course Enrollment
- Certificate Verification
- Responsive Design
- Dark Mode
- API Integration
- Blockchain Integration (Soroban ready)
- RESTful API
- JWT Authentication
- User Management
- Course Management
- Enrollment System
- Certificate Management
- Database Schema
- Middleware
- Error Handling
- Certificate Contract (Rust)
- Issue Function
- Verify Function
- Deployment to Stellar (requires manual deployment)
- Integration with backend (placeholder functions)
- Node.js 18+ and npm
- PostgreSQL 14+
- Rust (for contract development)
- Git
# From project root
./setup.shThis script will:
- Install all dependencies
- Create environment files
- Set up the database
- Build the frontend
- Provide next steps
cd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env with your database credentials
# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate dev
# Start server
npm run devBackend runs on: http://localhost:8080
cd frontend
# Install dependencies
npm install
# Create .env.local file
cp .env.local.example .env.local
# Edit if needed (default works for local development)
# Start development server
npm run devFrontend runs on: http://localhost:3000
If you need to set up PostgreSQL:
# Using Docker (recommended)
docker-compose up -d postgres
# Or install locally and update DATABASE_URL in backend/.env-
Browse Courses
- Search and filter courses
- View detailed course information
- See instructor details
-
Enroll & Learn
- One-click enrollment
- Track progress
- Access course materials
-
Earn Certificates
- Complete courses to earn certificates
- Certificates stored on Stellar blockchain
- Verifiable by anyone, anywhere
-
Verify Credentials
- Public certificate verification
- Instant blockchain lookup
- Tamper-proof credentials
-
Course Management
- Create/update courses
- Manage instructors
- Set credit hours
-
Student Management
- View enrollments
- Track progress
- Issue certificates
-
Certificate Issuance
- Issue certificates on blockchain
- Bulk issuance support
- Verification dashboard
The platform uses JWT-based authentication:
- User registers with email/password
- Password hashed with bcrypt
- JWT token generated and returned
- Token stored in localStorage
- Token attached to all API requests
- Automatic token refresh on expiration
POST /api/auth/register- Register new studentPOST /api/auth/login- Student loginGET /api/auth/me- Get current user
GET /api/courses- List all coursesGET /api/courses/:id- Get course detailsPOST /api/courses- Create course (admin)PUT /api/courses/:id- Update courseDELETE /api/courses/:id- Delete course
GET /api/enrollments- List enrollmentsGET /api/enrollments/student/:id- Student's enrollmentsPOST /api/enrollments- Enroll in coursePUT /api/enrollments/:id- Update enrollmentDELETE /api/enrollments/:id- Cancel enrollment
GET /api/certificates- List all certificatesGET /api/certificates/:id- Get certificateGET /api/certificates/student/:id- Student's certificatesPOST /api/certificates- Issue certificatePUT /api/certificates/:id- Update certificateDELETE /api/certificates/:id- Revoke certificate
POST /api/feedback- Submit course feedbackGET /api/feedback/course/:id- Course feedbackGET /api/feedback/course/:id/summary- Feedback summary
GET /api/dashboard/stats- Platform statisticsGET /api/dashboard/student/:id- Student dashboard data
The Soroban smart contract stores certificates immutably on Stellar:
#[contractimpl]
impl CertificateContract {
pub fn issue(env: Env, symbol: Symbol, student: String, course_name: String) -> Certificate {
// Issues certificate to blockchain
}
pub fn get_certificate(env: Env, symbol: Symbol) -> Certificate {
// Retrieves certificate from blockchain
}
}cd contracts
# Build contract
cargo build --target wasm32-unknown-unknown --release
# Deploy to Stellar testnet
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/certificate_contract.wasm \
--source <your-account> \
--network testnetUpdate NEXT_PUBLIC_CERTIFICATE_CONTRACT_ID in frontend/.env.local after deployment.
cd backend
npm testcd frontend
npm test- Register account at
/auth/register - Login at
/auth/login - Browse courses at
/courses - Enroll in a course
- View dashboard at
/dashboard - Verify certificate at
/verify
model Student {
id String @id @default(cuid())
email String @unique
password String
firstName String
lastName String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
enrollments Enrollment[]
certificates Certificate[]
feedback Feedback[]
}
model Course {
id String @id @default(cuid())
title String
description String?
instructor String
credits Int @default(3)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
enrollments Enrollment[]
certificates Certificate[]
feedback Feedback[]
}
model Certificate {
id String @id @default(cuid())
studentId String
courseId String
issuedAt DateTime @default(now())
certificateHash String?
status String @default("pending")
student Student @relation(fields: [studentId], references: [id])
course Course @relation(fields: [courseId], references: [id])
}
model Enrollment {
id String @id @default(cuid())
studentId String
courseId String
enrolledAt DateTime @default(now())
status String @default("active")
student Student @relation(fields: [studentId], references: [id])
course Course @relation(fields: [courseId], references: [id])
@@unique([studentId, courseId])
}
model Feedback {
id String @id @default(cuid())
studentId String
courseId String
rating Int
review String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
student Student @relation(fields: [studentId], references: [id])
course Course @relation(fields: [courseId], references: [id])
@@unique([studentId, courseId])
}- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- API Health: http://localhost:8080/health
- API Docs: See
docs/API_SCHEMA.md
FRONTEND_IMPLEMENTATION_SUMMARY.md- Frontend detailsINTEGRATION_GUIDE.md- Full stack integrationdocs/API_SCHEMA.md- API response formatsdocs/ARCHITECTURE_DEEP_DIVE.md- System architectureSOROBAN_GUIDE.md- Smart contract development
- Prisma Studio:
npx prisma studio - Database migrations:
npx prisma migrate dev
- Build analyzer:
npm run build - Linting:
npm run lint
- Build:
cargo build --release - Test:
cargo test - Deploy:
soroban contract deploy
- Check PostgreSQL is running
- Verify DATABASE_URL in .env
- Run
npx prisma generate
- Clear
.nextfolder - Delete
node_modulesand reinstall - Check TypeScript version
- Ensure PostgreSQL is running
- Check database credentials
- Verify database exists
cd frontend
vercel deploy --prodSet environment variables in Vercel dashboard.
cd backend
# Connect to Railway or Heroku
# Deploy via Git or CLIUse managed PostgreSQL service for production.
- Video lesson player
- Quiz system
- Discussion forums
- Gamification (badges, points)
- Social features
- Admin dashboard
- Analytics dashboard
- Email notifications
- Multi-language support
- Mobile app (React Native)
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
MIT License - see LICENSE file
- Stellar Development Foundation for Soroban
- Next.js team for the amazing framework
- All contributors to this project
- Open an issue on GitHub
- Check documentation in
/docs - Contact: support@web3studentlab.com (placeholder)
Web3 Student Lab - Empowering the next generation of blockchain developers 🚀
Built with ❤️ using Next.js, Node.js, PostgreSQL, and Soroban