|
Akash Bhardwaj Oodles

Akash Bhardwaj (Frontend-Associate Consultant - Frontend Development)

Experience:1+ yrs

Akash Bhardwaj, a proficient Frontend Developer, excels in various technologies such as JavaScript, HTML5, CSS, and ReactJS. His portfolio includes diverse projects. Committed to continuous skill enhancement, Akash diligently keeps pace with the latest industry trends and advancements to consistently deliver optimal outcomes.

Akash Bhardwaj Oodles
Akash Bhardwaj
(Associate Consultant - Frontend Development)

Akash Bhardwaj, a proficient Frontend Developer, excels in various technologies such as JavaScript, HTML5, CSS, and ReactJS. His portfolio includes diverse projects. Committed to continuous skill enhancement, Akash diligently keeps pace with the latest industry trends and advancements to consistently deliver optimal outcomes.

LanguageLanguages

DotENGLISH

Fluent

DotHindi

Fluent

Skills
Skills

DotBootstrap

80%

DotHTML, CSS

60%

DotReactJS

80%

DotMern Stack

80%

DotJavascript

60%

DotEthers.js

80%

DotNext.js

80%
ExpWork Experience / Trainings / Internship

Mar 2024-Present

Assistant Consultant-Frontend Development

Gurugram


Oodles Technologies

Gurugram

Mar 2024-Present

Jan 2023-Mar 2023

Web Developer Intern

Remote


ITJOBXS

Remote

Jan 2023-Mar 2023

EducationEducation

2019-2023

Dot

Bangalore College of Engineering and Technology

Bachelor of Engineering -Computer Science Engineering

Top Blog Posts
Build a Crypto Payment Gateway Using Solana Pay and React

Accepting cryptocurrency payments is becoming increasingly popular for businesses, and Solana Pay makes it fast, secure, and affordable. Whether you're building a payment gateway or exploring DeFi development services, this dev blog guide will show you how to create your own crypto payment gateway using React and Solana Pay.

 

Explore | A Guide to Meme Coin Development on Solana

 

What is Solana Pay?

 

Solana Pay is a payment protocol that allows businesses to accept cryptocurrency directly from customers. It's:

 

Fast: Transactions are completed in seconds.

Affordable: Almost zero transaction fees.

Easy to Integrate: With ready-made tools and SDKs, it's developer-friendly.

 

Prerequisites

 

Before we get started, ensure you have:

 

A Solana Wallet, such as Phantom.

Node.js and npm installed.

Basic knowledge of React and JavaScript.

 

Also Read |  Distinctive Features for Solana Wallet Development

 

Step 1: Set Up Your Project

 

Create a React app:

 

npx create-react-app solana-pay-gateway
cd solana-pay-gateway

 

Install necessary libraries:

 

npm install @solana/web3.js @solana/pay @solana/wallet-adapter-react @solana/wallet-adapter-react-ui @solana/wallet-adapter-wallets

 

This installs tools for connecting to Solana and managing wallets.

 

Step 2: Add Wallet Connection

 

To accept payments, users need to connect their Solana wallet.

 

Import the wallet libraries in App.js:

 

import {
  ConnectionProvider,
  WalletProvider,
  WalletModalProvider,
} from "@solana/wallet-adapter-react-ui";
import { PhantomWalletAdapter } from "@solana/wallet-adapter-wallets";

 

Set up the wallet connection:

 

const wallets = [new PhantomWalletAdapter()];

function App() {
  return (
    <ConnectionProvider endpoint="https://api.mainnet-beta.solana.com">
      <WalletProvider wallets={wallets}>
        <WalletModalProvider>
          <div className="App">
            <h1>Solana Pay Gateway</h1>
            <WalletConnectButton />
          </div>
        </WalletModalProvider>
      </WalletProvider>
    </ConnectionProvider>
  );
}

export default App;

 

This adds a Connect Wallet button to your app. When clicked, users can link their Phantom wallet to the app.

 

Step 3: Generate a Payment Request

 

Next, we'll generate a payment link or QR code that customers can use to pay.

 

Import Solana Pay tools in App.js:

 

import { createQR, encodeURL } from "@solana/pay";
import { Keypair, PublicKey } from "@solana/web3.js";
import BigNumber from "bignumber.js"; // Install with `npm install bignumber.js`

 

Create a function to generate a payment request:

 

const generatePaymentRequest = () => {
  const recipient = new PublicKey("Your-Solana-Wallet-Address"); // Replace with your address
  const amount = new BigNumber(1); // Payment amount in SOL
  const reference = Keypair.generate().publicKey;

  const paymentURL = encodeURL({
    recipient,
    amount,
    reference,
    label: "Your Business Name",
    message: "Thank you for your payment!",
  });

  const qrCode = createQR(paymentURL, { size: 256 });
  qrCode.append(document.getElementById("qr-code-container"));
};

 

Add a button and a container for the QR code in your app:

 

<button onClick={generatePaymentRequest}>Generate Payment QR Code</button>
<div id="qr-code-container"></div>

 

When the button is clicked, it generates a QR code customers can scan to pay in SOL.

 

Explore |  Compressed NFTs (cNFTs) | Solana's Cost-Effective NFT standard

 

Step 4: Confirm Payments

 

After a payment is made, you'll want to verify it on the blockchain.

 

Set up a connection to Solana:

 

import { Connection } from "@solana/web3.js";

const connection = new Connection("https://api.mainnet-beta.solana.com");

 

Create a function to check for a payment:

 

const checkPaymentStatus = async (reference) => {
  const signatureInfo = await connection.getSignaturesForAddress(reference);

  if (signatureInfo.length > 0) {
    alert("Payment received!");
  } else {
    alert("Payment not found. Please try again.");
  }
};

 

Call this function with the payment reference key after generating the QR code.

 

Step 5: Test Your App

 

Start the app:

 

npm start

 

Connect your Phantom wallet using the Connect Wallet button.

 

Click the Generate Payment QR Code button.

 

Scan the QR code with your wallet and complete a test payment.

 

Verify the payment by calling checkPaymentStatus.

 

Also, Check | DeFi in Real Estate | Exploring New Horizons and Potentials

 

Conclusion

 

Solana Pay is revolutionizing crypto payments by making them fast, affordable, and easy to integrate. Whether you're a developer or a business owner, building a payment gateway with Solana Pay opens doors to the Web3 economy. Need Help with Your Project?

 

Looking to build advanced blockchain applications or integrate Solana Pay? Our expert crypto developers can help you create seamless and secure payment gateways tailored to your business needs. Contact us today to bring your Web3 vision to life!

Category: Blockchain
How ShadCN is better than AndD

In the world of web development, selecting the right UI framework is crucial for building efficient, maintainable, and visually appealing applications. For a long time, Ant Design (AntD) has been a go-to choice for developers due to its robust component library, ease of use, and extensive documentation. However, ShadCN, is gaining attention for its innovative approach to design and development in this field. This blog post explores how ShadCN stands out compared to Ant Design, with examples. For information about blockchain and cryptocurrency, visit our blockchain development services

 

What is Ant Design?

 

Ant Design, developed by Alibaba, is a React UI library that offers a wide range of pre-designed components. It's well-known for its comprehensive documentation, large community, and extensive ecosystem. AntD provides a ready-to-use solution for large applications, making it popular among developers looking for a mature, stable framework. 

 

What is ShadCN?

 

ShadCN is a relatively new UI library designed with a focus on modern web standards, modularity, and customization. Unlike Ant Design, ShadCN is not just a collection of UI components but a framework that emphasizes building highly customizable and lightweight UI components using modern CSS like Tailwind CSS.

 

Customization and Theming

 

Ant Design 

 

AntD offers theming options, but the framework's preset design language limits them. To customize themes in AntD, you often need to override CSS variables or write your own styles. This can sometimes result in design inconsistencies. 

 

ShadCN 

 

ShadCN, on the other hand, is designed to be customized. It uses Tailwind CSS, a CSS framework that lets developers add styles right in their JSX. This means you can style things more and flexibly making it simpler to create custom themes without fighting against existing styles.

 

Example

 

// Ant Design: Custom Button with Theme
<Button style={{ backgroundColor: '#4CAF50', borderColor: '#4CAF50', color: '#fff' }}>
 Custom AntD Button
</Button>

// ShadCN: Custom Button with Tailwind
<button className="bg-green-500 border-green-500 text-white py-2 px-4 rounded">
Custom ShadCN Button
</button>

 

In this example, ShadCN's use of Tailwind classes makes it easy to apply custom styles directly within the component, This approach helps avoid clashes with existing styles.

 

Performance

 

Ant Design

 

AntD is known for its extensive component library, but this can also be a shortcoming in implementation. Adding AntD to your implementation means importing a number of styles and components, some of which you may not use. This increases the size of the bundle and can lengthen the load time.

 

ShadCN

 

ShadCN promotes a more modular approach, where only the necessary components and processes are part of the project. This makes bundle size smaller and more efficient, especially for larger applications. Using the Tailwind utility classes further reduces the need for additional CSS, allowing for faster rendering times.

 

Flexibility in Design

 

Ant Design

 

AntD provides a consistent design language that is great for maintaining equality across applications. However, sometimes these conventions can be limiting, especially for developers looking to implement unique or non-standard designs.

 

ShadCN

 

ShadCN provides great design flexibility by allowing developers to easily create custom components. Using this first approach means it's not limited to pre-defined methods or objects, and gives you the freedom to create a truly unique user interface.

 

Example

 

// Ant Design: Standard Card Component
<Card title="AntD Card" style={{ width: 300 }}>
 <p>Card content</p>
</Card>

// ShadCN: Custom Card Component
<div className="p-4 max-w-sm bg-white rounded-lg shadow-md">
 <h2 className="text-xl font-bold">ShadCN Card</h2>
 <p>Card content</p>
</div>

 

With ShadCN, the design and structure of components like cards are fully in your control, allowing for more creative and customized layouts.

 

Learning Curve and Community Support

 

Ant Design

 

AntD has a large community. Its extensive documentation and ready-to-use features make it easy for new developers to get started quickly. But the learning curve can still be overwhelming for those unfamiliar with its structure or customization methods.

 

ShadCN

 

ShadCN, while relatively new, benefits from being built on top of Tailwind CSS, which has a large and growing community. Tailwind's usability-first approach is intuitive once understood, and the flexibility it offers can make development more appealing for those who prefer a manual approach to styling. 

 

Integration with Modern Development Practices

 

Ant Design

 

AntD is a powerful tool, but its design and layout reflect old web development paradigms. While it supports React and other modern JavaScript frameworks, integration with more recent practices, such as CSS-in-JS or utility-first CSS, can be difficult.

 

ShadCN

 

ShadCN is designed with modern development practices in mind. It seamlessly integrates with Tailwind CSS, which is widely regarded as the most modern and efficient way to develop applications. Additionally, ShadCN's modular approach makes it easy to integrate into modern JavaScript libraries/frameworks, including React and Next.js.

 

Conclusion

 

Both ShadCN and Ant Design have their merits, but ShadCN shines in areas where modern web development practices and optimization are a priority. While Ant Design is still a solid choice for developers looking for a mature, robust UI design with a comprehensive component library, ShadCN offers a simple, lightweight, and modern alternative for Tailwind CSS they provide the tools ShadCN developers need to create unique, functional, and highly customizable user interfaces. If you are working on a project that requires high performance, a modern approach to CSS, and the flexibility to design custom UI components, then ShadCN might just be right for you. On the other hand , if you need a tested system with detailed documentation and community support, Ant Design remains one is a strong. 

Ultimately, choosing between ShadCN and Ant Design depends on the specific needs of your project, your team's knowledge of the framework, and your long-term vision for application design and deployment. If you are looking to hire blockchain developers to develop your project, explore our diverse talent pool.

Category: Blockchain
Banner

Don't just hire talent,
But build your dream team

Our experience in providing the best talents in accordance with diverse industry demands sets us apart from the rest. Hire a dedicated team of experts to build & scale your project, achieve delivery excellence, and maximize your returns. Rest assured, we will help you start and launch your project, your way – with full trust and transparency!