This project is a blockchain-based degree management system that allows authorized providers to add and manage degrees. The system uses a smart contract deployed on the blockchain to ensure the integrity and authenticity of the degree records.
Make sure you have the following installed on your machine:
- Install
pnpm
if you haven't already:npm install -g pnpm
- Clone the repository and install dependencies:
git clone https://github.com/your-username/blockchain-degree-management.git cd blockchain-degree-management pnpm install
Create a .env.local
file in the root directory and add the following variables:
# .env.local
PINATA_JWT=your_pinata_jwt
NEXT_PUBLIC_GATEWAY_URL=your_gateway_url
NEXT_PUBLIC_API_URL=your_api_url
CONTRACT_ADDRESS=your_contract_address
CONTRACT_ADDRESS_2=your_contract_address_2
Replace your_*
values with actual configuration details.
pnpm dev
Open http://localhost:3000 in your browser.
Build and start the project:
pnpm build
pnpm start
1️⃣ Connect Wallet: Click "Connect Wallet" to authenticate with your blockchain wallet.
2️⃣ Authorize Provider (Admin Only): Enter provider address and click "Authorize Provider".
3️⃣ Add Degree:
- Enter degree details
- Upload the degree file
- Click "Add Degree"
4️⃣ Search Degree:
- Enter degree ID
- Click "Search Degree" to fetch degree details
- Fetch Students:
GET ${process.env.NEXT_PUBLIC_API_URL}/student
- Fetch Degree Records:
GET ${process.env.NEXT_PUBLIC_API_URL}/degree/{degreeId}
- Upload File to Pinata:
POST https://api.pinata.cloud/pinning/pinFileToIPFS
- Update ABI: Replace contents of
contractABI.json
with the new ABI.// ./src/app/(dashboard)/degree/contractABI.json { "abi": [ // ...new ABI content... ] }
- Update Contract Address: Modify
degree.tsx
.// ./src/app/(dashboard)/degree/degree.tsx const contractAddress = process.env.CONTRACT_ADDRESS;
The awsLambda/index.mjs
file contains the code for the AWS Lambda function that interacts with the DynamoDB table to manage student records. The Lambda function supports the following operations:
- Get Student by ID: Fetch a student record by its ID.
- Get All Students: Fetch all student records.
- Add/Update Student: Add a new student record or update an existing one.
- Delete Student: Delete a student record by its ID.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.