Skip to content

πŸš€ 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. πŸ”’

License

Notifications You must be signed in to change notification settings

Nitish2773/CertifySecure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.)

{
    "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 based on your OS.

πŸ” Run Essential Commands

Before starting, verify your setup:

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.

import 'dart:io';
import 'package:crypto/crypto.dart';
import 'dart:convert';

class CertificateHasher {
  static Future<String> 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.

// 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.

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<String> 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:

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

πŸ”‘ 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

git clone https://github.com/your-org/certifysecure.git
cd certify_secure_app

πŸ“¦ Install Dependencies

flutter pub get

▢️ Run the App

flutter run

19. Deployment Guide

πŸ“± Flutter App Deployment

Android Build:

Generate an APK for Android devices:

flutter build apk

🍎 iOS Build:

Prepare the app for iOS deployment:

flutter build ios

☁️ Web Deployment:

Deploy the web version using Firebase:

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:

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

Firebase Auth
Firebase Storage
Firebase Firestore Database

πŸ”Ή Blockchain & Wallets

Remix IDE
Remix IDE
MetaMask Wallet
Infura Dashboard
Infura Dashboard

πŸ”Ή Render Deployment Dashboard

Render Dashboard


πŸ“Ή Video Demo

Video Demo

(Click the image to watch the full demo video.)


21. Contact Details


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 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 to access the slides.

πŸ“Ž Click Here 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.

About

πŸš€ 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. πŸ”’

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages