A Next.js web application designed to validate and inspect Web DID (Decentralized Identifier) addresses seamlessly.
Live Demo: A running version is available at https://uniformid.1edtech.org
- Validate DID documents from various DID methods
- Inspect DID services and public keys
- Visual representation of DID structure
- Support for Web DID and other DID methods
- Modern, responsive UI built with Next.js and Tailwind CSS
- Node.js 18 or later
- npm, yarn, or pnpm
- Navigate to the validator directory:
cd validator- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open your browser and navigate to http://localhost:3000
The application will automatically reload when you make changes to the code.
- Build the application:
npm run build
# or
yarn build
# or
pnpm build- Start the production server:
npm start
# or
yarn start
# or
pnpm start- Enter a DID: Paste a DID (e.g.,
did:web:example.com:user:bob) into the input field - Validate: Click the validate button to resolve and inspect the DID document
- View Results: The application will display:
- DID document structure
- Public keys and verification methods
- Services and endpoints
- Validation status
Since Web DIDs require HTTPS/TLS for proper resolution, the development server includes experimental HTTPS support. For local development with other DID methods, HTTP is sufficient.
If you need to test Web DIDs locally:
- Start your DID registrar service (see registrar/README.md)
- Use ngrok to create a secure tunnel:
ngrok http 3000 - Create DIDs using the ngrok domain
- Use the validator to inspect those DIDs
validator/
├── src/
│ ├── app/ # Next.js app directory
│ │ ├── page.tsx # Main page component
│ │ ├── layout.tsx # Root layout
│ │ └── serviceCards/ # Service card components
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── public/ # Static assets
└── package.json # Dependencies and scripts
The validator supports multiple DID methods through the did-resolver library. To add support for additional DID methods:
- Install the appropriate resolver package
- Update the resolver configuration in the application
- Test with sample DIDs
The application uses Tailwind CSS for styling. Custom styles can be added to src/app/globals.css.
- DID resolution fails: Ensure the DID is properly formatted and the resolver supports the DID method
- HTTPS errors: For Web DIDs, ensure the domain has a valid SSL certificate
- Port conflicts: Change the port by setting the
PORTenvironment variable
Enable debug logging by setting the NODE_ENV environment variable to development.
The validator can be integrated with the UniformID Registrar API for comprehensive DID management workflows. See the Postman collection in the postman/ directory for API examples.
For issues, questions, or contributions, please reach out to 1EdTech or create an issue in the repository.