Skip to content

nishant-uxs/labeval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LabEval β€” Blockchain-based Lab Assignment Assessment Platform

A decentralized application (dApp) for lab assignment assessment built on Ethereum blockchain with AI-powered grading and IPFS storage.

Ethereum License: MIT

Quick Start

cd lab_eval_blockchain/ChainAssess
cp .env.example .env   # fill in your API keys
npm install
npm run dev

See lab_eval_blockchain/ChainAssess/README.md for full documentation.

πŸ“– Overview

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

✨ Key Features

πŸ” Secure & Transparent

  • Wallet-based authentication via MetaMask
  • All transactions recorded on Ethereum Sepolia testnet
  • Role-based access control (Admin, Teacher, Student)
  • Immutable grade records on blockchain

πŸ€– AI-Powered Intelligence

  • Automatic grading suggestions using Google Gemini AI
  • Multi-format document support (PDF, DOCX, TXT)
  • Intelligent text extraction and analysis
  • Customizable grading criteria

πŸ“š Complete Assignment Management

  • Batch/class management system
  • Assignment creation and distribution
  • Student submission tracking
  • IPFS-based file storage

⚑ User-Friendly

  • 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

πŸš€ Quick Start

Prerequisites

Installation

# 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 dev

The app will be available at http://localhost:5000

Environment Variables

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_here

Getting API Keys:

πŸ—οΈ Technology Stack

Frontend

  • React 19 with TypeScript
  • Vite for fast builds
  • TailwindCSS + shadcn/ui for styling
  • MetaMask SDK for wallet integration
  • ethers.js v6 for blockchain interaction

Backend

  • Express.js with TypeScript
  • Google Gemini AI for grading
  • Pinata SDK for IPFS storage
  • PDF/DOCX/TXT parsers for document processing

Blockchain

  • Ethereum Sepolia Testnet
  • Solidity smart contracts
  • OpenZeppelin libraries
  • Hardhat development environment

Smart Contracts (Already Deployed)

Contract Address Purpose
AccessControl 0xFB7c09E0d25577401cB98C9b29B0465243A97E5F Role management
BatchManagement 0xddD637Fd04a8b14470Bcf3b78c683c1a87C99aB8 Student batches
AssignmentSubmission 0xf39A62a69222ad7F51217AFedd46178e7926039d Assignment lifecycle

πŸ“‹ How It Works

For Teachers

  1. Connect Wallet β†’ Connect MetaMask (must have AUTHORITY_ROLE)
  2. Create Batch β†’ Set up a new class/batch
  3. Add Students β†’ Add student wallet addresses (no registration needed!)
  4. Create Assignment β†’ Upload assignment files to IPFS
  5. Review Submissions β†’ View submissions with AI grading suggestions
  6. Award Grades β†’ Accept AI suggestions or provide custom grades

For Students

  1. Connect Wallet β†’ Connect MetaMask wallet
  2. View Assignments β†’ See assignments from enrolled batches
  3. Submit Work β†’ Upload submission files to IPFS
  4. Track Progress β†’ View grades on blockchain

πŸ“ Project Structure

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

πŸ” Security Features

  • βœ… 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

🌐 Live Demo & Resources

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Authors

Nishant

Adarsh

πŸ™ Acknowledgments

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors