Internship Completion Verification

What it does:
Records and verifies internship completion for students, providing tamper-proof, verifiable proof of experience on-chain.

Why it matters:
Eliminates fraudulent claims, allows employers or educational institutions to instantly verify internships, and gives students secure proof of professional experience.

How it works:

  • Internship providers (companies) are registered as authorized issuers

  • Students submit internship completion claims after finishing their internship

  • Authorized companies verify and approve completion on-chain

  • Smart contract mints a record or links to an NFT representing the verified internship

  • Students can share verification with employers, schools, or professional platforms

  • All verification history is immutably recorded and auditable

  • Can integrate with Academic Record NFT or Student Reputation DAO for holistic profile

      // SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
 * @title InternshipVerification
 * @author Nam
 * @notice Verifies and records internship completions for students
 */
contract InternshipVerification {

    address public admin;
    uint256 public recordCount;

    struct Record {
        address student;
        address company;
        string metadataHash; // IPFS or encrypted proof of completion
        bool verified;
    }

    mapping(uint256 => Record) public records;
    mapping(address => bool) public authorizedCompanies;

    // -------------------- EVENTS --------------------

    event CompanyAuthorized(address indexed company);
    event InternshipVerified(uint256 indexed recordId, address indexed student, address indexed company);

    // -------------------- CONSTRUCTOR --------------------

    constructor() {
        admin = msg.sender;
    }

    // -------------------- COMPANY MANAGEMENT --------------------

    function authorizeCompany(address _company) external {
        require(msg.sender == admin, "Not admin");
        require(_company != address(0), "Invalid company");
        authorizedCompanies[_company] = true;
        emit CompanyAuthorized(_company);
    }

    // -------------------- INTERNSHIP RECORD MANAGEMENT --------------------

    function submitInternship(address _student, string calldata _metadataHash) external {
        require(authorizedCompanies[msg.sender], "Not authorized company");
        require(_student != address(0), "Invalid student");

        recordCount += 1;
        records[recordCount] = Record({
            student: _student,
            company: msg.sender,
            metadataHash: _metadataHash,
            verified: true
        });

        emit InternshipVerified(recordCount, _student, msg.sender);
    }

    function verifyRecord(uint256 _recordId) external view returns (
        address student,
        address company,
        string memory metadataHash,
        bool verified
    ) {
        Record memory r = records[_recordId];
        return (r.student, r.company, r.metadataHash, r.verified);
    }
}