Skip to content

feat: implement public credential verification portal (Issue #376) - #483

Merged
Penielka merged 2 commits into
AetherEdu:mainfrom
Peolite001:feature/issue-376-verify-portal
Aug 25, 2026
Merged

feat: implement public credential verification portal (Issue #376)#483
Penielka merged 2 commits into
AetherEdu:mainfrom
Peolite001:feature/issue-376-verify-portal

Conversation

@Peolite001

Copy link
Copy Markdown
Contributor

Description

Closes #376

This PR introduces a public, login-free portal where anyone can verify an issued credential by its ID/hash. It provides an external-facing surface for employers, institutions, and learners to prove a credential is genuine.

Changes Made

  • Smart Contract (contracts/src/credential_registry.rs & contracts/src/lib.rs): Added a get_credential_read_only helper to allow queries without triggering expiration state mutations.
  • Backend Route (backend/src/routes/verify.ts): Implemented a new public /api/v1/verify/:hash endpoint that resolves credentials via the Soroban contract and properly surfaces error states (e.g., Revoked, Expired).
  • Backend Tests (backend/src/tests/verify.test.ts): Added comprehensive E2E tests for the verification endpoint to validate behavior against valid, revoked, and unknown credentials.
  • Frontend Portal (frontend/src/app/verify/[hash]/page.tsx): Built a clean, responsive page to display credential details.
  • Frontend Components (frontend/src/components/verify/):
    • CredentialDisplay.tsx: Renders credential metadata and dynamically displays a prominent status badge.
    • QRCodeDisplay.tsx: Generates a shareable QR code pointing to the specific credential portal link.

Acceptance Criteria Met

  • A public /verify/:hash page renders credential details without authentication
  • QR code and deep-link sharing for every credential
  • A public API endpoint returns the canonical credential state from the contract
  • Revoked/invalid credentials render an explicit "invalid" state with reason
  • Portal is indexable, responsive, and passes the accessibility audit
  • End-to-end tests cover valid, revoked, and unknown hashes

How to Test

  1. Start the local backend and frontend servers.
  2. Ensure you have the AETHERMINT_CONTRACT_ID available in your backend env.
  3. Run the backend tests: npm test verify.test.ts
  4. Navigate to http://localhost:3000/verify/1 (replace 1 with a valid mock or real credential ID) to view the portal.
  5. Ensure the QR code scans correctly and points to the live URL.

@Penielka
Penielka merged commit 7576dd1 into AetherEdu:main Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Public credential verification portal

2 participants