A decentralized application (dApp) for lab assignment assessment built on Ethereum blockchain with AI-powered grading and IPFS storage.
cd lab_eval_blockchain/ChainAssess
cp .env.example .env # fill in your API keys
npm install
npm run devSee lab_eval_blockchain/ChainAssess/README.md for full documentation.
LabEval is a comprehensive blockchain-based platform that revolutionizes lab assignment assessment by combining:
- Decentralized Storage via IPFS (Pinata)
- Smart Contract automation on Ethereum
- AI-Powered Grading using Google Gemini
- Wallet-based authentication via MetaMask
- All transactions recorded on Ethereum Sepolia testnet
- Role-based access control (Admin, Teacher, Student)
- Immutable grade records on blockchain
- Automatic grading suggestions using Google Gemini AI
- Multi-format document support (PDF, DOCX, TXT)
- Intelligent text extraction and analysis
- Customizable grading criteria
- Batch/class management system
- Assignment creation and distribution
- Student submission tracking
- IPFS-based file storage
- No student registration required
- Teachers can add students directly by wallet address
- Clean, modern UI built with React and TailwindCSS
- Real-time blockchain transaction updates
- Node.js 18 or higher
- MetaMask browser extension
- Sepolia ETH for gas fees (Get free testnet ETH)
# Clone the repository
git clone https://github.com/nishant-uxs/labeval.git
cd labeval/lab_eval_blockchain/ChainAssess
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Edit .env and add your API keys
# Run the application
npm run devThe app will be available at http://localhost:5000
Create a .env file in the ChainAssess directory:
# Blockchain Configuration
ALCHEMY_API_KEY=your_alchemy_api_key_here
PRIVATE_KEY=your_wallet_private_key_here
# IPFS Storage (Pinata)
PINATA_API_KEY=your_pinata_api_key_here
PINATA_SECRET_KEY=your_pinata_secret_key_here
# AI Grading (Optional but recommended)
GEMINI_API_KEY=your_google_gemini_api_key_hereGetting API Keys:
- Alchemy: Sign up at Alchemy and create a Sepolia app
- Pinata: Get API keys from Pinata
- Gemini: Get API key from Google AI Studio
- React 19 with TypeScript
- Vite for fast builds
- TailwindCSS + shadcn/ui for styling
- MetaMask SDK for wallet integration
- ethers.js v6 for blockchain interaction
- Express.js with TypeScript
- Google Gemini AI for grading
- Pinata SDK for IPFS storage
- PDF/DOCX/TXT parsers for document processing
- Ethereum Sepolia Testnet
- Solidity smart contracts
- OpenZeppelin libraries
- Hardhat development environment
| Contract | Address | Purpose |
|---|---|---|
| AccessControl | 0xFB7c09E0d25577401cB98C9b29B0465243A97E5F |
Role management |
| BatchManagement | 0xddD637Fd04a8b14470Bcf3b78c683c1a87C99aB8 |
Student batches |
| AssignmentSubmission | 0xf39A62a69222ad7F51217AFedd46178e7926039d |
Assignment lifecycle |
- Connect Wallet β Connect MetaMask (must have AUTHORITY_ROLE)
- Create Batch β Set up a new class/batch
- Add Students β Add student wallet addresses (no registration needed!)
- Create Assignment β Upload assignment files to IPFS
- Review Submissions β View submissions with AI grading suggestions
- Award Grades β Accept AI suggestions or provide custom grades
- Connect Wallet β Connect MetaMask wallet
- View Assignments β See assignments from enrolled batches
- Submit Work β Upload submission files to IPFS
- Track Progress β View grades on blockchain
labeval/
βββ lab_eval_blockchain/
βββ ChainAssess/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # UI components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Contract configs
β β βββ pages/ # Application pages
βββ server/ # Express backend
β βββ index.ts # Server entry
β βββ blockchain-service.ts
β βββ ipfs-service.ts
β βββ ai-grading-service.ts
βββ contracts/ # Solidity contracts
β βββ AccessControl.sol
β βββ BatchManagement.sol
β βββ AssignmentSubmission.sol
βββ scripts/ # Deployment scripts
βββ package.json
βββ README.md # Detailed documentation
- β
Environment Variables - All sensitive data in
.env - β Role-Based Access - Smart contract enforced permissions
- β MetaMask Signing - All transactions require user approval
- β Input Validation - Server-side and client-side validation
- β IPFS Immutability - Files cannot be modified after upload
- Sepolia Etherscan: View Contracts
- Sepolia Faucet: Get Test ETH
- Alchemy Dashboard: Manage API
- Pinata Dashboard: Manage IPFS
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Nishant
- GitHub: @nishant-uxs
Adarsh
- GitHub: @adrshagr
- OpenZeppelin for secure smart contract libraries
- Ethereum Foundation for blockchain infrastructure
- Google for Gemini AI API
- Pinata for IPFS infrastructure
- Alchemy for blockchain node services
Built with β€οΈ using Ethereum, React, AI, and IPFS
Making contract assessment transparent, secure, and intelligent.