https://github.com/depapp/zk-job-board
https://github.com/depapp/zk-job-board
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/depapp/zk-job-board
- Owner: depapp
- License: apache-2.0
- Created: 2025-09-05T12:46:11.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-06T02:06:58.000Z (11 months ago)
- Last Synced: 2025-09-06T04:08:31.293Z (11 months ago)
- Language: TypeScript
- Size: 113 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZK Job Board - Midnight Network Challenge Submission
A privacy-preserving job board where applicants prove they meet job requirements without revealing their personal attributes, built using Midnight Network's Compact language and MidnightJS.
## Full Explanation on DEV.to Article
- https://dev.to/depapp/privacy-first-job-applications-with-midnight-network-ing
## π― Overview
The ZK Job Board enables:
- **Employers** to post jobs with specific requirements (skills, experience, region)
- **Applicants** to prove they meet requirements without revealing their actual credentials
- **Privacy-first** interactions using zero-knowledge proofs
- **Anti-spam** protection via nullifiers (prevents double applications)
### Key Features
- β
**Zero-Knowledge Proofs**: Applicants prove eligibility without exposing personal data
- π **Privacy by Design**: Only proof validity is revealed, not underlying attributes
- π¨ **Accessible UI**: WCAG-compliant interface with clear privacy indicators
- π **Midnight Integration**: Uses Compact circuits and MidnightJS for ZK functionality
- π **Apache 2.0 Licensed**: Fully open-source
## π Quick Start
### Prerequisites
- Node.js 18+ and npm
- Git
- Modern web browser (Chrome, Firefox, Safari, Edge)
### Installation
```bash
# Clone the repository
git clone https://github.com/depapp/zk-job-board.git
cd zk-job-board
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your Midnight testnet configuration
# Compile ZK circuits
npm run compile-circuits
# Deploy verifier contract (testnet)
npm run deploy-verifier
# Start development server
npm run dev
```
Visit `http://localhost:5173` to see the application.
## ποΈ Architecture
```
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Employer ββββββΆβ Job Policy ββββββΆβ On-Chain β
β UI β β Creation β β Storage β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Applicant ββββββΆβ ZK Proof Gen ββββββΆβ Verifier β
β UI β β (Midnight) β β Contract β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
```
### Components
1. **Compact Circuits** (`circuits/`): Define the ZK logic for attribute verification
2. **Smart Contracts** (`contracts/`): On-chain verifier for proof validation
3. **React UI** (`app/`): User interface for employers and applicants
4. **MidnightJS Integration** (`app/lib/midnight.ts`): Proof generation and verification
## π How It Works
### For Employers
1. Create a job posting with requirements:
- Required skills (e.g., TypeScript, React, ZK)
- Minimum experience level
- Allowed regions
2. Job policy is hashed and stored on-chain
3. Applicants can view requirements and apply
### For Applicants
1. Generate mock credentials (skills, experience, region)
2. Create a ZK proof that you meet job requirements
3. Submit proof without revealing actual attributes
4. System verifies proof and prevents double applications
### Privacy Guarantees
- β
Skills are proven as a subset match without revealing all skills
- β
Experience is proven as >= minimum without revealing exact years
- β
Region membership is proven without revealing specific location
- β
Nullifiers prevent double applications while maintaining unlinkability across jobs
## π§ͺ Testing
```bash
# Run unit tests
npm test
# Run e2e tests
npm run test:e2e
# Test circuit constraints
npm run test:circuits
```
## π Project Structure
```
zk-job-board/
βββ circuits/ # Compact ZK circuits
β βββ job_eligibility.cmp
β βββ params.toml
βββ contracts/ # Smart contracts
β βββ JobEligibilityVerifier.ts
βββ app/ # React application
β βββ src/
β β βββ routes/ # Page components
β β βββ components/ # Reusable UI components
β β βββ lib/ # Core logic & Midnight integration
β β βββ state/ # State management
β βββ index.html
βββ scripts/ # Build and deployment scripts
βββ tests/ # Test suites
βββ docs/ # Documentation
βββ config/ # Configuration files
```
## π Security & Privacy
- All credentials are **mocked** - no real personal data is used
- Proofs are generated client-side - sensitive data never leaves your device
- Nullifiers prevent replay attacks while maintaining privacy
- Open-source for full transparency
## π License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.