https://github.com/nitish2773/certifysecure
π CertifySecure is a blockchain-powered Flutter app that ensures tamper-proof student certification using facial recognition, SHA-256 hashing, and Firebase authentication. It provides a secure and efficient way for educational institutions and recruiters to verify certificates with trust, reducing fraud and streamlining the validation process. π
https://github.com/nitish2773/certifysecure
android-studio blockchain-technology dart face-recognition firebase flutter infura-api metamask nodejs opencv2 python remix-ide sepoliatestnetwork smart-contracts solidity
Last synced: about 2 months ago
JSON representation
π CertifySecure is a blockchain-powered Flutter app that ensures tamper-proof student certification using facial recognition, SHA-256 hashing, and Firebase authentication. It provides a secure and efficient way for educational institutions and recruiters to verify certificates with trust, reducing fraud and streamlining the validation process. π
- Host: GitHub
- URL: https://github.com/nitish2773/certifysecure
- Owner: Nitish2773
- License: mit
- Created: 2025-02-11T10:28:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T10:41:17.000Z (3 months ago)
- Last Synced: 2025-04-05T18:13:25.524Z (about 2 months ago)
- Topics: android-studio, blockchain-technology, dart, face-recognition, firebase, flutter, infura-api, metamask, nodejs, opencv2, python, remix-ide, sepoliatestnetwork, smart-contracts, solidity
- Language: Dart
- Homepage:
- Size: 18.3 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CertifySecure: Blockchain-Integrated Student Certificate Validation App with Flutter
---# π **Table of Contents**
### π **Project Setup & Configuration**
1οΈβ£ **[Project Overview](#)**
2οΈβ£ **[VS Code & Android Studio Setup](#)**
3οΈβ£ **[Frontend: Flutter & Dart Configuration](#)**
4οΈβ£ **[Android & iOS Setup](#)**
5οΈβ£ **[Pubspec.yaml Dependencies](#)**### π¨ **UI & User Experience**
6οΈβ£ **[Major Screens & UI Implementations](#)**### π **Blockchain & Security**
7οΈβ£ **[Blockchain & SHA-256 Hashing](#)**
8οΈβ£ **[Blockchain Technologies](#)**
9οΈβ£ **[Immutable Data & Blockchain Verification](#)**### π₯ **Backend & Database**
π **[Firebase Backend Setup](#)**
1οΈβ£1οΈβ£ **[CSV-based User Registration](#)**
1οΈβ£2οΈβ£ **[Firebase Authentication & Storage](#)**### βοΈ **App Logic & Functionality**
1οΈβ£3οΈβ£ **[Complete App Workflow](#)**
1οΈβ£4οΈβ£ **[Verification Process & Tamper-Proof Certification](#)**
1οΈβ£5οΈβ£ **[Facial Recognition for Student Authentication](#)**
1οΈβ£6οΈβ£ **[User Roles & Permissions](#)**### π **Project Management & Deployment**
1οΈβ£7οΈβ£ **[Project Structure Breakdown](#)**
1οΈβ£8οΈβ£ **[Git Cloning & Usage](#)**
1οΈβ£9οΈβ£ **[Deployment Guide](#)**### πΈ **Media & Documentation**
2οΈβ£0οΈβ£ **[Screenshots & Video Demo](#)**### π **Additional Information**
2οΈβ£1οΈβ£ **[Contact Details](#)**
2οΈβ£2οΈβ£ **[Conference Presentation Details](#)**
2οΈβ£3οΈβ£ **[Future Enhancements](#)**---
# π **1. Project Overview**
**CertifySecure** is an innovative application that provides a **tamper-proof certification system** for students, ensuring security and authenticity through **blockchain technology**, **facial recognition**, and **Firebase authentication**.
### π₯ **Key Features:**
β **π Blockchain-Powered Certificate Storage:** Immutable certificate hashes stored on Ethereum blockchain.
β **π€ Facial Recognition for Secure Login:** Flask-based biometric authentication for added security.
β **βοΈ Secure File Storage on Firebase:** Ensures original certificates are safely stored in the cloud.
β **π Real-Time Verification for Recruiters:** Instant validation of certificate authenticity.
β **π Multi-Platform Support:** Runs seamlessly on **Android, iOS, Web, and Desktop**.
β **π CSV-Based Bulk Registration:** Enables fast mass user onboarding.---
# π οΈ **2. VS Code & Android Studio Setup**
### **π VS Code Configuration**
**πΉ Essential Plugins:**
π **Flutter & Dart** β For Flutter app development.
π **Solidity** β For smart contract development.**πΉ Recommended Settings:** *(Modify `settings.json` to ensure a smooth dev experience.)*
```json
{
"editor.formatOnSave": true,
"dart.previewFlutterUiGuides": true,
"dart.openDevTools": "flutter"
}
```---
### **π Android Studio Configuration**
**πΉ Required Plugins:**
π **Flutter & Dart SDKs** β Enable Flutter development.**πΉ Device Setup:**
π **Enable Developer Mode & USB Debugging:** On a physical Android device, enable **USB debugging** via Developer Options.
π **Set Up Emulator:** Open **AVD Manager** β Create a virtual device β Choose appropriate API level & specs.---
# π¨ **3. Frontend: Flutter & Dart Configuration**
### π§ **Install Flutter SDK (>=3.4.3)**
Follow the **[official Flutter installation guide](https://flutter.dev/docs/get-started/install)** based on your OS.### π **Run Essential Commands**
Before starting, verify your setup:```bash
flutter doctor
flutter pub get
flutter run
```### β‘ **Why Dart?**
β **Blazing-Fast Performance:** Compiles to native code for smooth execution.
β **Productivity Boost:** Hot reload for instant UI updates.
β **Cross-Platform Support:** Single codebase for **Android, iOS, Web, and Desktop**.---
# **4. Android & iOS Setup**### **π± Android**
- π οΈ **Configure `android/app/build.gradle`**: Set up signing keys, version codes, and required permissions.
- π **Enable MultiDex**: If needed, enable MultiDex for compatibility with numerous dependencies.### **π iOS**
- π» **Run `pod install` in the `ios/` directory** to install CocoaPods dependencies.
- π **Configure Xcode with `GoogleService-Info.plist`** for Firebase integration.
- π± **Ensure devices/emulators are connected and properly configured** before running the app.---
## **5. `pubspec.yaml` Dependencies**### **π₯ Authentication & Firebase**
- `firebase_core`, `firebase_auth` β Handles Firebase initialization & user authentication.### **π Security & Encryption**
- `crypto`, `encrypt`, `pointycastle` β Provides SHA-256 hashing & AES encryption functionalities.### **βοΈ Blockchain Integration**
- `web3dart`, `walletconnect_dart` β Enables Ethereum blockchain interactions & wallet connections.### **π€ Face Recognition & Camera**
- `google_mlkit_face_detection`, `camera` β Manages face detection & image capture.### **π Networking & File Handling**
- `dio`, `http`, `file_picker` β Handles API requests & file uploads.### **π¨ UI Enhancements**
- `animate_do`, `cupertino_icons` β Enhances animations & iconography.---
# **6. Major Screens & UI Implementations**### **π Splash Screen & Role Selection**
- **Description:** Initial welcome screen displaying app branding & user role selection.
- **Files:** `splash_screen.dart`, `role_selection_screen.dart`
![]()
![]()
### **π Login Screens (All Roles)**
- **Description:** Dedicated login interfaces for students, teachers, and recruiters.
- **Files:** `login.dart`, `face_recognition_screen.dart`, `teacher_login.dart`, `company_login.dart`
![]()
![]()
![]()
![]()
![]()
### **π Student Dashboard**
- **Description:** Displays certificate statuses, upload options, and student profile details.
- **Files:** `student_dashboard.dart`, `home_screen.dart`, `profile_screen.dart`
![]()
![]()
### **π€ Certificate Upload & View Screens**
- **Description:** Enables students to upload & view their certificates with verification status.
- **Files:** `upload_certificate_screen.dart`, `view_certificates_screen.dart`
![]()
![]()
### **π Teacher Dashboard**
- **Description:** Allows teachers to verify certificates and manage pending verifications.
- **Files:** `teacher_dashboard.dart`, `teacher_home_screen.dart`, `teacher_profile_screen.dart`,`pending_certificate_screen.dart`
![]()
![]()
![]()
![]()
![]()
![]()
### **π’ Company/Recruiter Dashboard**
- **Description:** Enables recruiters to scan QR codes and verify certificates.
- **Files:** Located under the `company/` folder.
![]()
![]()
![]()
---
# **7. Blockchain & SHA-256 Hashing**### **π SHA-256 Hash Generation**
Certificates are hashed to generate a unique SHA-256 fingerprint.```dart
import 'dart:io';
import 'package:crypto/crypto.dart';
import 'dart:convert';class CertificateHasher {
static Future generateHash(File certificate) async {
final bytes = await certificate.readAsBytes();
final hash = sha256.convert(bytes);
return hash.toString();
}
}
```### **βοΈ Blockchain Storage (Smart Contract in Solidity)**
The certificate hash is stored on the Ethereum blockchain for authenticity verification.```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;contract CertificateRegistry {
struct Certificate {
string studentId;
string hash;
uint256 timestamp;
}mapping(string => Certificate) private certificates;
function storeCertificateHash(string memory studentId, string memory hash) public {
certificates[studentId] = Certificate(studentId, hash, block.timestamp);
}function getCertificateHash(string memory studentId) public view returns (string memory) {
return certificates[studentId].hash;
}
}
```### **π‘ Blockchain Service (Dart Integration)**
Handles communication with the Ethereum blockchain via `web3dart`.```dart
import 'package:web3dart/web3dart.dart';
import 'package:http/http.dart';class BlockchainService {
final String rpcUrl = "https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID";
late Web3Client client;BlockchainService() {
client = Web3Client(rpcUrl, Client());
}Future getCertificateHash(String studentId) async {
// Call smart contract function
final result = await client.call(
contract: myContract,
function: getHashFunction,
params: [studentId],
);
return result.first.toString();
}
}
```---
# 8. Blockchain Technologies**π οΈ Remix IDE:**
- π **Purpose:** A browser-based IDE for developing, deploying, and testing smart contracts written in Solidity.
- π§ **Usage:** Utilized for writing and deploying the `certificate_registry.sol` smart contract.**π¦ MetaMask:**
- π **Purpose:** A browser extension and mobile app that enables users to interact with the Ethereum blockchain securely.
- π **Usage:** Manages Ethereum accounts and facilitates transaction signing.**π Sepolia Test Network:**
- βοΈ **Purpose:** A test network for Ethereum, allowing developers to test smart contracts without using real Ether.
- π¬ **Usage:** Provides a safe environment for smart contract deployment and testing.**π Infura:**
- π‘ **Purpose:** Offers scalable Ethereum infrastructure and APIs.
- β‘ **Usage:** Connects the app to the Ethereum network for seamless blockchain interactions.**π» Solidity:**
- π **Purpose:** A programming language used to write Ethereum smart contracts.
- π¨ **Usage:** Develops the smart contract responsible for storing certificate hashes.---
# 9. Immutable Data & Blockchain Verification
**π Immutable Data:**
- Once a certificate hash is stored on the blockchain, it **cannot** be modified or deleted, ensuring data integrity and security.**β Verification Process:**
- **Step 1:** Teachers verify certificates by generating a fresh SHA-256 hash of the uploaded document.
- **Step 2:** The generated hash is compared against the hash stored on the blockchain.
- **Step 3:** If the hashes match, the certificate is verified; otherwise, tampering is detected.---
# 10. Firebase Backend Setup
**π₯ Firestore Database:**
- π **Purpose:** Stores user data, certificate metadata, and verification statuses.
- π **Collections:** `users`, `certificates`**βοΈ Firebase Storage:**
- ποΈ **Purpose:** Securely stores original certificate files.**π Firebase Authentication:**
- π **Purpose:** Manages user sign-up, login, and authentication through various methods.**π« Firebase App Check:**
- π‘οΈ **Purpose:** Ensures only verified app instances can access backend resources, enhancing security.---
# 11. CSV-based User Registration
**π Bulk Registration:**
- Users can be onboarded in bulk using a CSV file, streamlining the registration process.**π οΈ Automation Script:**
- π **Script:** The `import_users.js` file in `firebase-admin-server/` reads the CSV, validates data, and registers users in Firebase Authentication and Firestore.**π Example CSV Format:**
```csv
type,email,uid,password,role,name,imagePath,department,branch,course,year,semester
student,[email protected],UID123,pass123,student,Student Name,/path/to/image.jpg,CSE,Computer Science,BTECH,3,6
teacher,[email protected],UID456,pass456,teacher,Teacher Name,,,,,,
company,[email protected],UID789,pass789,company,Company HR,,,,,,
```**π Registration Process:**
1οΈβ£ **Read CSV File:** Extract user details from the uploaded CSV.
2οΈβ£ **Validate Data:** Ensure all required fields are present and correctly formatted.
3οΈβ£ **Register Users:** Add users to Firebase Authentication and Firestore.---
# 12. Firebase Authentication & Storage
**π Firebase Authentication:**
- β **Supports:** Email/Password, Google Sign-In, and biometric login (facial recognition).
- π **Security Rules:** Ensure only authorized users can access or modify data.**ποΈ Firestore Database:**
- π **Purpose:** Stores user profiles, certificate data, and verification logs securely.**βοΈ Firebase Storage:**
- π **Purpose:** Provides secure storage for original certificate files, preventing unauthorized access.**π« Firebase App Check:**
- π **Purpose:** Ensures only verified app instances can interact with backend resources, minimizing security risks.---
# π 13. Complete App Workflow
### π Student Registration & Authentication
- **Process:** Students register and log in using Firebase Authentication.
- **Security:** Facial recognition ensures secure authentication and prevents impersonation.### π€ Certificate Upload & Hashing
- **Process:** Students upload certificates.
- **Hashing:** A SHA-256 hash is generated for each certificate file.### βοΈ Blockchain Storage
- **Process:** The certificate hash is stored immutably on the Ethereum blockchain via a smart contract.### π©βπ« Teacher Verification
- **Process:** Teachers review and verify certificates.
- **Update:** Verified certificates are recorded in Firestore for easy access.---
# π 14. Verification & Tamper-Proof Certification
### π Tamper-Proof Mechanism
- **Immutable Data:** Blockchain ensures that once stored, data cannot be modified.
- **Tampering Detection:** Any alteration in a certificate results in a different hash, flagging potential fraud.### π©βπ« Teacherβs Role
- **Authenticity Check:** Teachers verify certificates before approval.
- **Trust:** Blockchain-stored hashes provide cryptographic proof of authenticity.---
# π€ 15. Facial Recognition for Secure Authentication
### π§ Face Recognition Service
- **Implementation:** OpenCV-powered Flask microservice.
- **Repository:** [Face Recognition Service Repository](https://github.com/Nitish2773/face-recognition-app)### π Purpose
- **Enhanced Security:** Only verified students can log in and upload certificates.
- **Prevention:** Eliminates fraudulent login attempts.---
# π‘οΈ 16. User Roles & Permissions
| Role | Permissions |
|----------|------------|
| π Student | Upload certificates, View own records, Request verification |
| π©βπ« Teacher | Verify certificates, Approve/Reject uploads, Manage records |
| π’ Company | Validate certificate authenticity, Access verification history |---
# π 17. Project Structure Breakdown
```
certify_secure_app/
βββ .idea/ # π οΈ IntelliJ & Android Studio settings
βββ .vscode/ # π VS Code workspace settings and recommended extensions
βββ android/ # π€ Android-specific configuration files
β βββ gradle/ # π¨ Gradle build scripts and configurations
β βββ app/ # π± Main Android application code, resources, manifests
β βββ build.gradle # π οΈ Android Gradle configuration file
β βββ other Android config files
βββ assets/ # πΌοΈ Static assets (images, icons, fonts)
β βββ images/ # π· Application images (logos, splash screens, etc.)
βββ build/ # βοΈ Compiled build artifacts (auto-generated)
βββ firebase-admin-server/ # π₯ Firebase Admin SDK scripts for batch operations
β βββ node_modules/ # π¦ Node.js dependencies
β βββ import_users.js # π CSV user import script
β βββ package.json # π Node.js dependency definitions
β βββ package-lock.json # π Locked dependency versions
βββ ios/ # π iOS-specific configuration files (Xcode projects, etc.)
βββ lib/ # π» Flutter application source code
β βββ CertifySecure/ # π― Main application folder
β β βββ contracts/ # π Solidity smart contracts for blockchain integration
β β β βββ certificate_registry.sol # π Smart contract for certificate hashing
β β βββ models/ # ποΈ Data models
β β β βββ certificate_model.dart # π Dart model for certificate data
β β βββ Screen/ # π¨ UI Screens (organized by role/function)
β β β βββ common/ # π Shared UI components
β β β βββ company/ # π’ Screens for recruiter/company users
β β β βββ login/ # π Authentication screens
β β β β βββ face_recognition_screen.dart # π€ Face recognition login
β β β β βββ login.dart # π² Standard login screen
β β β βββ main/ # π Main entry/home screens
β β β βββ student/ # π Student-specific screens
β β β βββ teacher/ # π©βπ« Teacher-specific screens
β β βββ Services/ # π§ Backend services
β β β βββ blockchain_service.dart # βοΈ Blockchain interactions
β β β βββ storage_utils.dart # βοΈ Firebase Storage utility functions
β β βββ utils/ # π οΈ Utility functions
β β βββ Widgets/ # π· Reusable UI components
β βββ main.dart # π App entry point
βββ test/ # π§ͺ Unit & widget tests
βββ .gitignore # π« Files/directories ignored by Git
βββ analysis_options.yaml # π Linting and code analysis rules
βββ pubspec.lock # π Locked dependency versions
βββ pubspec.yaml # π Flutter dependency & asset declarations
βββ README.md # π Project documentation (this file)
```---
# π 18. Git Cloning & Usage
### π₯ Clone the Repository
```bash
git clone https://github.com/your-org/certifysecure.git
cd certify_secure_app
```### π¦ Install Dependencies
```bash
flutter pub get
```### βΆοΈ Run the App
```bash
flutter run
```---
# **19. Deployment Guide**
### **π± Flutter App Deployment**
#### **Android Build:**
Generate an APK for Android devices:
```bash
flutter build apk
```#### **π iOS Build:**
Prepare the app for iOS deployment:
```bash
flutter build ios
```#### **βοΈ Web Deployment:**
Deploy the web version using Firebase:
```bash
firebase deploy
```---
### **βοΈ Smart Contract Deployment**
#### **Deploy `certificate_registry.sol`**
- Use **Remix IDE** to deploy the smart contract on the **Sepolia Test Network**.
- Verify contract deployment using **Etherscan**.#### **Update `blockchain_service.dart`**
Ensure the deployed contract address is updated in the blockchain service file for accurate interactions.---
### **π» Backend Deployment on Render**
Create a `render.yaml` file for deployment:
```yaml
services:
- type: web
name: certifysecure-api
env: python
buildCommand: pip install -r requirements.txt
startCommand: python main.py
```Deploy using GitHub integration or manual deployment through Render's web dashboard.
---
# **20. Screenshots & Video Demo**
### **πΉ Firebase Console**


### **πΉ Blockchain & Wallets**




### **πΉ Render Deployment Dashboard**
---
# **πΉ Video Demo**
---
# **21. Contact Details**
- **π Project Lead:** Sri Nitish Kamisetti
- **π§ Email:** [email protected]
- **π LinkedIn:** [Profile](https://www.linkedin.com/in/sri-nitish-kamisetti/)
- **π» GitHub:** [Profile](https://github.com/Nitish2773)---
# **22. Conference Presentation Details**
### **π€ Presentation Title:**
*CertifySecure: Blockchain-Integrated Student Certificate Validation App with Flutter*### **ποΈ Conference Details:**
- **Event:** International Conference on Innovative Product Design and Intelligent Manufacturing Systems (ICIPDIMS 2024)
- **Organizer:** AITAM College
- **Date:** December 4, 2024
- **Mode:** Remote Presentation
- **Certificate:** π [Click Here](https://drive.google.com/file/d/1wjfLMJcodYK7NAS0Rg8w0qX_KXTNdkxS/view?usp=sharing) to access the Certificate.### **π Abstract:**
In the education sector, students receive certificates upon completion of their studies. Traditional certificate validation methods require manual verification, which can be tampered with. **CertifySecure** leverages **blockchain technology** to ensure certificates remain **immutable and verifiable**. By integrating **facial recognition authentication**, the project prevents impersonation while enhancing security. The app is developed using **Flutter and Firebase**, with **Ethereum blockchain** storing certificate hashes for tamper-proof verification.### **π Keywords:**
Certificate Verification | Facial Recognition | Secure Authentication | Blockchain | Flutter | Remix IDE | MetaMask### **π Presentation Slides:**
π [Click Here](https://docs.google.com/presentation/d/1m_h0iNQmb39QIWQBq8qdor8nygsJoeC0/edit?usp=sharing&ouid=114377696364244652161&rtpof=true&sd=true) to access the slides.π [Click Here](https://docs.google.com/presentation/d/1Dp3E1cK2XKTBE0il7poBV5V3tGkq3ojU/edit?usp=sharing&ouid=114377696364244652161&rtpof=true&sd=true) to access the slides.
---
# **23. Future Enhancements**
### **π QR Code Verification:**
- **Planned Implementation:** QR code scanning to validate certificates instantly.
- **Purpose:** Recruiters can scan a QR code linked to a certificate for on-the-spot verification.### **π Enhanced Security Features:**
- Strengthening authentication methods.
- Exploring AI-powered anomaly detection for fraudulent certificate submissions.---