- IbcFan
- eigenvibes
PolyLens is a web3 application designed to monitor and analyze packet latency for Polymer channels, which are crucial for inter-chain communication. By providing a user-friendly interface, PolyLens enables developers to gain insights into the performance of their Polymer channels and set up alerts when latency exceeds specified thresholds.
To run PolyLens locally, follow these steps:
-
Clone the repository:
git clone https://github.com/IbcFan/polylens.git
-
Install dependencies:
cd polylens npm install
-
Set up environment variables:
- Copy the
.env.example
file and rename it to.env
. - Fill out the required environment variables (e.g., API keys, database connection strings).
- For Clerk and Mailgun, you can sign up for a free account and obtain the required credentials.
- For Prisma, you can set up a local database or use a cloud-based solution like Supabase.
- Copy the
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
. -
For email alerts to work, you need to set up a domain in Mailgun and verify it via DNS records.
-
Additionally, a cron service needs to be set up to periodically trigger an api to send emails. Locally it can be done using a simple curl command:
curl http://localhost:3000/api/alerts
- Next.js: React framework for building server-side rendered and static web applications.
- tRPC: Library for building typesafe APIs with TypeScript.
- Prisma: Modern database toolkit for TypeScript and Node.js.
- Clerk: User authentication and management solution.
- Tailwind CSS: Utility-first CSS framework for rapid UI development.
- Recharts: Composable charting library built on React components.
- Mailgun: Email service for sending latency alerts.
- Vercel: Cloud platform for Next.js sites and serverless functions.
During the development of PolyLens, we encountered a few challenges:
- Integrating with the Polymer ecosystem and understanding the intricacies of inter-chain communication.
- Optimizing the performance of the latency graph to handle large datasets efficiently.
- Ensuring a smooth user experience across different devices and screen sizes.
- Creating a helpful UX for summarizing and understanding latency data.
We overcame these challenges by conducting thorough research, seeking guidance from the Polymer community, and iteratively refining our implementation based on user feedback.
Through the development of PolyLens, our team gained valuable insights:
- The importance of monitoring and analyzing latency in inter-chain communication for a seamless user experience.
- The power of leveraging modern web technologies to build intuitive and responsive user interfaces.
- The significance of collaborating effectively as a team and leveraging each member's strengths.
We have identified several areas for future enhancements to PolyLens:
- Integrating with additional blockchain networks to expand the supported ecosystems.
- Implementing advanced anomaly detection techniques to proactively identify latency issues.
- Enhancing the alerting system with more notification channels (e.g., Slack, Discord, Telegram, etc.).
- Improving latency metrics and trend measurements for more accurate insights.
- Providing more fine-grained control over alerts to cater to specific user requirements.
PolyLens is released under the MIT License.
Thank you to the creators of IBC App Solidity Template for making it easy to send packets thru the testnet!