A client-agnostic ECP (Ethereum Comment Protocol) linker with OpenGraph support.
calink is a web application that provides shareable links for ECP comments with rich OpenGraph metadata and client-agnostic viewing. It allows users to view ECP comments in a clean, responsive interface while providing links to open the comment in their preferred ECP client.
- 🔗 Client-Agnostic: View ECP comments without being tied to a specific client
- 📱 OpenGraph Support: Rich social media previews with comment content and author info
- 🎭 Custom Clients: Support for custom client integration via URL parameters
View an individual ECP comment with:
clientTitle- Custom client nameclientLogo- Custom client logo URLclientUrl- Custom client URL to open the comment
Example with custom client:
/c/0x123...?clientTitle=MyApp&clientLogo=https://example.com/logo.png&clientUrl=https://myapp.com/comment/0x123...
- Node.js 18+ or Bun
- Git
- Clone the repository:
git clone <repository-url>
cd calink- Install dependencies:
bun install
# or
npm install- Run the development server:
bun dev
# or
npm run dev- Open http://localhost:3000 in your browser.
bun run build
bun start
# or
npm run build
npm startsrc/
├── app/
│ ├── c/[id]/
│ │ ├── page.tsx # Comment page component
│ │ └── opengraph-image.tsx # Dynamic OpenGraph images
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/
│ └── ui/ # Reusable UI components
├── lib/
│ ├── clients.ts # Client configurations
│ └── utils.ts # Utility functions
└── types/
└── blockies.d.ts # Type definitions
To add support for a new ECP client, update the clients array in src/lib/clients.ts:
{
title: "New Client",
id: "newclient",
logo: "/clients/newclient.png",
getLink({ chainId, commentId }) {
return `https://newclient.com/comment/${commentId}`;
},
}The dynamic OpenGraph images are generated in src/app/c/[id]/opengraph-image.tsx. Modify this file to customize how comment previews appear on social media.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
[Add your license information here]