Skip to content

NextTechLabAP/dPIN

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

132 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ dPIN Website Monitoring System

A decentralized website monitoring system leveraging dPIN (Decentralized Public Infrastructure Network) to ensure trustless uptime verification, real-time alerts, and transparency without relying on centralized authorities.

With dPIN, experience a truly decentralized, transparent, and reliable website monitoring system.

๐Ÿ“ธ Preview Images

Landing Page Features Pricing Validator Dashboard Monitor
Monitor Graph User Dashboard Validations Validator CLI Validator CLI 2
Preview of the dPIN Website Monitoring System Interface

๐Ÿ”ฅ Key Features

๐Ÿ”น No Single Point of Failure โ€“ Distributed monitoring across independent validators.

๐Ÿ”น Trustless Transparency โ€“ Website owners can prove uptime without a central entity.

๐Ÿ”น Crypto Incentives โ€“ Validators earn rewards for monitoring and reporting website health.

๐Ÿ”น Decentralized Monitoring โ€“ Multiple nodes check website status instead of a single company.

๐Ÿ”น Real-Time Alerts โ€“ Instant notifications for downtime or performance issues.

๐Ÿ”น Security & Privacy โ€“ No third-party access to website data.


๐Ÿ›‘ Problem Statement

Traditional website monitoring systems are centralized, opaque, and vulnerable to downtime, censorship, and manipulation. They rely on single providers, limiting transparency and control.


โœ… Solution

Our dPIN-based monitoring system decentralizes website uptime tracking by leveraging independent validators across a global network. Unlike traditional systems, which rely on a single authority, our solution ensures real-time, trustless, and tamper-proof monitoring without any central points of failure. Website owners can prove uptime transparently, while users receive instant alerts for downtime or performance issues. Validators are incentivized with crypto rewards, fostering a self-sustaining, censorship-resistant ecosystem that enhances reliability, security, and trust in website monitoring.

โœจ Website owners can verify uptime transparently.

โšก Users receive instant alerts for downtime or performance issues.

๐Ÿ’ฐ Validators are rewarded with crypto incentives, fostering a self-sustaining, censorship-resistant monitoring ecosystem.


๐Ÿ› ๏ธ Tech Stack

๐Ÿ›ก๏ธ Blockchain โ€“ Solana

๐ŸŒ dPIN (Decentralized Public Infrastructure Network) โ€“ Distributed monitoring

๐Ÿ”— Database โ€“ MongoDB

๐Ÿ–ฅ๏ธ Frontend โ€“ React.js, Radix UI, Tailwind CSS, ShadCN

๐Ÿ“ก Backend โ€“ Node.js, Express.js

๐Ÿ”’ Authentication โ€“ Clerk

โš™๏ธ Validator CLI โ€“ Commander.js, Chalk


โš™๏ธ Installation & Setup

# Clone the repository
git clone https://github.com/Lviffy/dPIN.git
cd dPIN

# Install backend dependencies
cd backend
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your specific configuration

# Run the backend server
node index.js

# Install frontend dependencies
cd ../frontend
npm install

# Set up frontend environment variables
cp .env.example .env
# Edit .env with your Clerk publishable key and other configs

# Run the frontend development server
npm run dev

# Open your browser at http://localhost:5173

๐Ÿ”‘ Getting API Keys

Before you can run the application, you'll need to obtain several API keys and credentials:

1. JWT Secret

  • This is used for authentication in the backend
  • Generate a secure random string:
    openssl rand -base64 32
    Or simply create a strong password-like string

2. Solana Wallet Keys (Admin)

  • Generate a Solana keypair for the admin account:
    # Install Solana CLI tools if you haven't already
    solana-keygen new
    • The output will show your public key and save your private key
    • Use these values for ADMIN_PUBLIC_KEY and ADMIN_PRIVATE_KEY

3. Solana RPC URL

  • Sign up for a free account at Alchemy
  • Create a new Solana app (can use Devnet for testing)
  • Copy the HTTP URL from your dashboard
  • Format: https://solana-devnet.g.alchemy.com/v2/YOUR_API_KEY

4. Clerk Authentication

  • Create an account at Clerk
  • Set up a new application
  • From your Clerk dashboard:
    • Get your CLERK_PUBLISHABLE_KEY (starts with pk_test_)
    • Get your CLERK_SECRET_KEY (starts with sk_test_)
    • Use the publishable key for both backend and frontend

5. Email Service (Nodemailer)

  • If using Gmail:
    1. Go to your Google Account โ†’ Security
    2. Enable 2-Step Verification if not already enabled
    3. Go to App passwords
    4. Create a new app password
    5. Use this password for PASS_NODEMAILER

After obtaining all keys, add them to your .env files in both backend and frontend directories.

๐Ÿง  Project Structure

dPIN/
โ”œโ”€โ”€ backend/               # Express.js server
โ”‚   โ”œโ”€โ”€ db/                # Database connection
โ”‚   โ”œโ”€โ”€ model/             # MongoDB schemas
โ”‚   โ”œโ”€โ”€ utils/             # Helper functions
โ”‚   โ””โ”€โ”€ index.js           # Main server file
โ”œโ”€โ”€ frontend/              # React.js application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/    # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/         # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ utils/         # Utility functions
โ”‚   โ”‚   โ””โ”€โ”€ App.jsx        # Main application component
โ”‚   โ””โ”€โ”€ public/            # Static assets
โ””โ”€โ”€ validator-cli/         # CLI tool for validators
    โ”œโ”€โ”€ src/               # Source code
    โ””โ”€โ”€ utils/             # CLI utilities

โ„น๏ธ Additional Information

๐Ÿ”น Minimum Validator Balance โ€“ To become a validator, your crypto wallet must have at least 0.05 SOL.

๐Ÿ”น Wallet Public Key โ€“ Needed for withdrawal of earned rewards.

๐Ÿ”น Key Generation โ€“ Automatically generates a pair of public & private keys for enhanced security.

๐Ÿ”น Decentralized Transactions โ€“ Ensures secure and anonymous payment processing.


โ“ Troubleshooting

If you face any issues, try these steps:

โš ๏ธ Issue: App not starting
๐Ÿ”น Solution: Ensure Node.js and npm are installed, and run npm install before starting the application.

โš ๏ธ Issue: Wallet not connecting
๐Ÿ”น Solution: Make sure Phantom or any compatible Solana wallet is installed and connected to the correct network.

โš ๏ธ Issue: No real-time alerts
๐Ÿ”น Solution: Check if notifications are enabled in browser settings.

โš ๏ธ Issue: Transaction failures
๐Ÿ”น Solution: Ensure your wallet has sufficient SOL for transactions.

โš ๏ธ Issue: Authentication problems
๐Ÿ”น Solution: Verify your Clerk API keys are correctly configured in your environment variables.


๐Ÿ“ API Endpoints

User Endpoints

  • POST /user - Create a new user
  • GET /dashboard-details - Get user dashboard information

Website Monitoring Endpoints

  • POST /website - Register a new website for monitoring
  • GET /website/:id - Get details for a specific website
  • DELETE /website/:id - Remove a website from monitoring
  • PUT /website-track/:id - Enable/disable monitoring for a website
  • GET /website-details:id - Get detailed metrics for a website

Validator Endpoints

  • POST /validator-login - Authenticate as a validator
  • GET /validator-details - Get validator activity and rewards information

๐Ÿ™Œ Team Members

  • Rohan Kumar Mohanta
  • Jayesh Krishna
  • Shivangi Sharma

๐Ÿค Contributing

We welcome contributions! Follow these steps:

1๏ธโƒฃ Fork the repo

2๏ธโƒฃ Create a new branch: git checkout -b feature-branch

3๏ธโƒฃ Commit your changes: git commit -m "Added new feature"

4๏ธโƒฃ Push to the branch: git push origin feature-branch

5๏ธโƒฃ Submit a Pull Request (PR)

๐Ÿ’ก Tip: Always write clear commit messages and follow best coding practices before submitting a PR!


๐Ÿ“œ If you found this useful, don't forget to โญ star this repo!

About

A decentralized website monitoring system leveraging dPIN (Decentralized Public Infrastructure Network) to ensure trustless uptime verification, real-time alerts, and transparency without relying on centralized authorities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 51.2%
  • JavaScript 47.2%
  • Other 1.6%