{"id":26233639,"url":"https://github.com/docknetwork/prettyvc","last_synced_at":"2025-04-22T12:10:47.158Z","repository":{"id":39988635,"uuid":"427071292","full_name":"docknetwork/prettyvc","owner":"docknetwork","description":"Rendering pretty verifiable credentials (experimental)","archived":false,"fork":false,"pushed_at":"2024-12-19T20:01:01.000Z","size":1077,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-17T11:38:04.039Z","etag":null,"topics":["credentials","verifiable","verifiable-credentials"],"latest_commit_sha":null,"homepage":"https://docknetwork.github.io/prettyvc/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docknetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-11T16:35:50.000Z","updated_at":"2025-01-29T06:24:12.000Z","dependencies_parsed_at":"2024-10-03T12:33:18.656Z","dependency_job_id":"5731bfd0-9a60-4951-b678-ee09cade2911","html_url":"https://github.com/docknetwork/prettyvc","commit_stats":{"total_commits":99,"total_committers":4,"mean_commits":24.75,"dds":"0.11111111111111116","last_synced_commit":"fe7f4cd0c36a2b07f1fd648911dae6b06dc68a1c"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fprettyvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fprettyvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fprettyvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docknetwork%2Fprettyvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docknetwork","download_url":"https://codeload.github.com/docknetwork/prettyvc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237832,"owners_count":21397401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["credentials","verifiable","verifiable-credentials"],"created_at":"2025-03-13T01:16:56.536Z","updated_at":"2025-04-22T12:10:47.135Z","avatar_url":"https://github.com/docknetwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrettyVC - Render pretty verifiable credentials\n\nThis library aims to solve the problem of presenting verifiable credentials to the user in a a pretty, readable and informative way. It takes a credential's JSON and makes several guesses as to what content to show based on type, document property names and more. You can check out a demo at [https://docknetwork.github.io/prettyvc/](https://docknetwork.github.io/prettyvc/)\n\nPlease feel free to submit example credential JSON and templates, the more we have the more robust the library can become.\n\n## Features\n- Renderer agnostic (React, SSR, headless)\n- Works well with html-pdf and html-to-image\n- Easily customizable CSS\n- Multiple templates and template deduction\n- Generates identicon images if none can be found\n- Generates QR codes of the credential ID URI\n\n## Usage\n\nInstall through your favorite package manager:\n\n`yarn add @docknetwork/prettyvc` or `npm install @docknetwork/prettyvc`\n\nOnce installed, basic usage is simple:\n```\nimport { getVCHTML } from '@docknetwork/prettyvc';\n\nconst options = { generateQR: true };\nconst vcHTML = await getVCHTML(credentialJSON, options);\n// append vcHTML in your body\n```\n\nIf using a framework like NextJS or webpack, you must either build your own CSS rules or import the templates:\n```\nimport '@docknetwork/prettyvc/styles/card.css';\nimport '@docknetwork/prettyvc/styles/diploma.css';\n```\n\nIf using NodeJS/SSR and dont wish to serve CSS files, you will need to use a package such as [juice](https://github.com/Automattic/juice) to embed CSS styles into style tags.\n\n`getVCHTML` will return the credential HTML with CSS classes, you must write your own wrapper for whatever purpose you need. In the NextJS example we have a simple wrapper that supplies a font size to scale the credential.\n\nSee the NextJS/React [example here](./demo).\n\nIf you wish to get just the data and do the rendering yourself instead of injecting sanitized HTML (if you are using React Native for example), you can use the method `getVCData`:\n```\nimport { getVCData } from '@docknetwork/prettyvc';\n\nconst options = { generateQR: true };\nconst vcData = await getVCData(credentialJSON, options);\nconsole.log('vcData', vcData);\n```\n\n## Todo\n- Add tests going through each credential and ensure it outputs the correct fields we'd expect to see as a human\n- Demo script for creating PDF credentials\n- Report template that renders tables (see CMTR example)\n- Document options\n- Add more credentials\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocknetwork%2Fprettyvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocknetwork%2Fprettyvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocknetwork%2Fprettyvc/lists"}