A web platform for certifying and revoking documents through smart contracts on Ethereum.
It includes a dashboard, notification panel, wallet integration, role management, and audit trail.
KrostChain allows users to securely manage the certification and revocation of documents on the Ethereum blockchain.
- Upload and certify documents
- View your certified documents and their history
- Receive notifications for updates and expirations
- Revoke documents with a reason
- Download certification proofs
- View all documents submitted by users
- Monitor the activity of verifiers and manage permissions
- Deploy and upgrade the smart contract if needed
All documents are hashed and timestamped, ensuring authenticity, traceability, and immutability through blockchain technology.
- βοΈ Backend: Java + Quarkus + REST
- π§ Smart Contract: Solidity + OpenZeppelin + Hardhat
- π Frontend: React + Tailwind + Ethers.js
- π§ͺ Test: Vitest + React Testing Library + TanStack Query
git clone https://github.com/antoniomarroffino/Blockchain-DocumentCertification.git
cd fanto-marroffinocd frontend
npm installcd backend
./mvnw installcd blockchain
npm installdocker run --name blockchainDocuments-mysql \
-e MYSQL_ROOT_PASSWORD=1234 \
-e MYSQL_DATABASE=blockchainDocuments \
-p 3306:3306 \
-d mysql:latestπ These credentials must match your backend
application.properties.
cd blockchain
npx hardhat nodenpx hardhat run scripts/deploy.ts --network localhostcd backend
mvn clean package
cd ./target/backend-api-client
npm i
npm link
cd ../..
./mvnw quarkus:devcd frontend
npm link @dti-isin/backend-api-client
npm run devThen open http://localhost:3000 in your browser.
- Start a local Hardhat node
- Deploy the smart contract to localhost
- Copy the deployed address and update
frontend/src/config/config.ts
- Edit
.envinside/contracts:
PRIVATE_KEY=<your Sepolia private key>
INFURA_API_KEY=...
ETHERSCAN_API_KEY=...- Deploy the contract:
npx hardhat run scripts/deploy.ts --network sepolia- Update the frontend config
- (Optional) Verify on Etherscan
npx hardhat verify --network sepolia <contractAddress>npx hardhat run scripts/upgrade.ts --network sepoliaπ Ensure
PROXY_ADDRESSin.envis correct
- Frontend uses
VITE_INFURA_API_KEYfromfrontend/.env - You can switch networks by editing
.envvariables
cd frontend
npm run testcd backend
./mvnw testcd contracts
npx hardhat testAntonio Marroffino
Luca FantΓ²
This project was developed for educational purposes as part of the Bachelor's degree in Computer Engineering at SUPSI.




