A comprehensive blockchain-based job marketplace that implements both traditional O(nΒ²) matching and advanced AI-powered matching using Llama 3.2 with Marlin Oyster CVM for secure, verifiable AI computations. The platform connects job seekers with employers through intelligent analysis and cryptographic verification.
- Smart Contract-Based: Decentralized job postings and candidate profiles on Ethereum
- Dual Matching Algorithms: Traditional rule-based O(nΒ²) and AI-powered intelligent matching
- Wallet Integration: Seamless MetaMask connectivity for secure transactions
- Modern UI: Next.js TypeScript frontend with responsive Tailwind CSS design
- Llama 3.2 Integration: Advanced language model for intelligent candidate-job analysis
- Marlin Oyster CVM: Secure, verifiable AI computations with cryptographic proofs
- Enclave Verification: On-chain verification of AI responses using smart contracts
- Detailed Analysis: Comprehensive reasoning and candidate evaluation beyond simple scoring
- Job Detail Pages: Individual job viewing with complete information
- Skill Extraction: AI-powered skill extraction from job descriptions and resumes
- Real-time Verification: Live verification of AI responses with signature validation
- Attestation System: Cryptographic attestation for AI computation integrity
- Header Extraction: Oyster signature and timestamp capture for verification
AI-Job-Matching-DApp/
βββ Contracts/
β βββ JobMarketplace.sol # Main contract with O(nΒ²) matching
β βββ LlamaResponseVerify.sol # Enclave verification contract
βββ app/
β βββ api/
β β βββ ai-candidates/ # AI matching endpoint
β β βββ attestation/ # Attestation API
β β βββ generate/ # LLM generation API
β β βββ oyster/ # Direct Oyster API proxy
β βββ components/
β β βββ Header.tsx # Navigation component
β βββ deploy/ # Verification testing page
β βββ jobs/
β β βββ page.tsx # Job listing page
β β βββ [id]/page.tsx # Individual job details
β βββ matches/ # Dual algorithm matching page
β βββ post-job/ # Job posting interface
β βββ register-seeker/ # Job seeker registration
β βββ setup/ # Contract setup page
β βββ utils/
β βββ contractHelper.ts # Contract interaction utilities
β βββ llmService.ts # AI and verification services
β βββ web3.ts # Ethereum integration
βββ public/ # Static assets
- Node.js (v16+)
- npm or yarn
- MetaMask extension installed in your browser
- Navigate to the frontend directory:
cd AI-job-Matching-dApp/- Install dependencies:
npm install- Run the development server:
npm run dev-
Open your browser and navigate to
http://localhost:3000 -
On first use, go to
app/utils/web3.ts, Enter the deployed contract addresses, create.envfile according to the example and connect your MetaMask wallet.
- Connect Wallet: Connect your Ethereum wallet (MetaMask)
- Post Jobs: Navigate to "Post a Job" and fill in details
- Job title, description, and requirements
- Required skills (with AI-powered skill extraction)
- Location and salary information
- Browse Applications: View candidate matches through the AI matching system
- Track Verification: See cryptographic proofs of AI analysis integrity
- Connect Wallet: Connect your Ethereum wallet (MetaMask)
- Create Profile: Navigate to "Register as Job Seeker"
- Personal information and skills
- AI-powered skill extraction from resume text
- Location and salary expectations
- Browse Jobs: View all available positions with detailed job pages
- Get Matched: Benefit from both traditional and AI-powered matching
- Browse All Jobs: Navigate to "Browse Jobs" to see all active positions
- View Details: Click "View Details" on any job for comprehensive information
- Smart Filtering: Jobs are automatically filtered to show only active positions
- Real-time Updates: Job information is fetched directly from the blockchain
- Navigate to Matches: Go to "View Matches" page
- Choose Algorithm:
- Traditional O(nΒ²): Fast, rule-based matching with on-chain storage
- AI-Powered: Intelligent analysis with Llama 3.2 and cryptographic verification
- AI Matching Process:
- System calls Llama 3.2 model via Marlin Oyster CVM
- Captures Oyster signatures and timestamps
- Performs enclave attestation for public key verification
- Verifies AI responses on-chain using smart contracts
- View Results:
- Traditional matches show scores and basic reasoning
- AI matches include detailed evaluation and verification status
- Verification Status: See cryptographic proof of AI computation integrity
- Deploy Page: Navigate to "Deploy on Oyster" for verification testing
- Test Known Values: Uses hardcoded working values to verify contract functionality
- Debug Tools: Comprehensive logging for troubleshooting verification issues
- Compares each job with each candidate systematically
- Calculates scores based on:
- Skills matching (50% of total score) - exact string matching
- Location matching (30% of score) - exact location match
- Salary matching (20% of score) - salary range compatibility
- Fast and deterministic results
- Stored on-chain in smart contract
- Uses Llama 3.2 LLM running on Marlin Oyster CVM
- Intelligently analyzes job descriptions and candidate profiles
- Considers context, synonyms, and semantic relationships
- Provides detailed reasoning for each match
- Offers comprehensive candidate evaluations on demand
- Scores candidates holistically beyond simple rule matching
- NEW: Cryptographic verification of AI responses
- NEW: On-chain verification using enclave signatures
- AI Computation: Llama 3.2 processes job-candidate matching in secure enclave
- Signature Capture: Oyster headers (signature + timestamp) are captured from AI responses
- Attestation: System performs cryptographic attestation to get enclave public key
- Receipt Creation: ABI-encoded receipt data combines prompt, response, and context
- On-Chain Verification: Smart contract verifies the signature using the enclave public key
- Oyster Headers:
x-oyster-signatureandx-oyster-timestampfrom AI responses - Receipt Data: ABI-encoded data containing model, prompt, context, response, and tokenization
- Enclave Public Key: Retrieved through attestation process
- Smart Contract:
LlamaResponseVerify.solcontract performs cryptographic verification
- Main Functions: Job posting, candidate registration, O(nΒ²) matching
- Matching Algorithm:
calculateMatches()function implements traditional scoring - Score Calculation: Skills (50%), location (30%), salary (20%)
- Data Storage: On-chain storage of jobs, candidates, and match results
- Verification Function:
verifyEnclaveResponse()validates AI computation signatures - Cryptographic Verification: Uses ECDSA signature verification
- Receipt Validation: Validates ABI-encoded receipt data format
- Integration: Works with Marlin Oyster CVM verification system
- Framework: Next.js 15 with App Router and TypeScript
- Styling: Tailwind CSS for responsive design
- Blockchain: ethers.js for Ethereum integration
- State Management: React hooks for component state
- API Routes: Server-side API endpoints for AI and verification services
- Copy
env.exampleto.env.local - Set
NEXT_PUBLIC_LLAMA_INSTANCE_IPto your Llama instance IP - Ensure Marlin Oyster CVM is properly configured
- Deploy both JobMarketplace and EnclaveResponseVerifier contracts
- Skill Extraction: Extract skills from job descriptions and resumes
- AI-Powered Matching: Intelligent candidate-job matching with reasoning
- Detailed Evaluation: Comprehensive analysis beyond simple scoring
- Cryptographic Verification: On-chain verification of AI computations
- Oyster Integration: Secure and verifiable AI computations
Basic LLM Query:
curl http://{{instance-ip}}:5000/api/generate -d '{
"model": "llama3.2",
"prompt":"What is Ethereum?"
}'AI Candidate Matching:
// Via frontend API with verification
const result = await fetch('/api/ai-candidates', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jobs: jobsArray, candidates: candidatesArray })
});
// Result includes matches and verification data
const { matches, verificationData } = await result.json();Enclave Verification:
// Verify AI response on-chain
const verified = await verifyEnclaveResponse(
receiptData, // ABI-encoded receipt
timestamp, // Oyster timestamp
signature, // Oyster signature
enclavePublicKey // From attestation
);- Deploy
JobMarketplace.solto your target network - Deploy
LlamaResponseVerify.solfor enclave verification - Update contract addresses in
web3.ts - Set up Marlin Oyster CVM instance
- Configure environment variables
- Build the Next.js application:
npm run build - Deploy to your preferred hosting platform
- Ensure MetaMask connectivity for users
NEXT_PUBLIC_LLAMA_INSTANCE_IP=your-llama-instance-ip
NEXT_PUBLIC_CONTRACT_ADDRESS=your-contract-address
NEXT_PUBLIC_VERIFIER_CONTRACT=your-verifier-address- Ensure MetaMask is connected to the correct network
- Contract addresses must match deployed instances
- RPC endpoints should be properly configured
- Dual Algorithm Approach: Traditional + AI matching for comprehensive coverage
- Cryptographic Verification: On-chain verification of AI computations
- Marlin Oyster Integration: Secure enclave computations with proof generation
- Comprehensive Analysis: Beyond simple scoring to detailed candidate evaluation
- Real-time Verification: Live verification of AI responses with signature validation
- Modular Architecture: Separate contracts for core functionality and verification