Next.js + Foundry + Thirdweb ready - Your complete Web3 dApp starter template with smart contracts and wallet connectivity.
π Secure - Enterprise-grade security with Thirdweb
π Fast - Built with Next.js 15 and Turbopack
β½ Gasless - Account abstraction with gas sponsoring
π Multi-chain - Support for 50+ blockchain networks
β‘ Modern Stack - TypeScript, Tailwind CSS, Motion animations
quickdapp/
βββ app/ # Next.js App Router
β βββ api/ai-chat/ # AI chat API endpoint
β βββ globals.css # Global styles with Tailwind
β βββ layout.tsx # Root layout with metadata
β βββ page.tsx # Main landing page
βββ components/
β βββ ui/ # Reusable UI components
β β βββ HeroSection.tsx # Hero with typewriter effect
β β βββ SetupWarning.tsx # Configuration instructions
β β βββ DemoSocialCreator.tsx # Video, social links, creator info
β β βββ Navbar.tsx # Fixed navigation bar
β β βββ BackgroundParticles.tsx # Animated background
β β βββ ClaimAirdrop.tsx # Airdrop claiming interface
β βββ AiBot.tsx # AI Bot component
β βββ AIChat.tsx # AI Chat interface
β βββ ConnectWallet.tsx # Multi-chain wallet connector
βββ lib/
β βββ client.ts # Thirdweb client configuration
β βββ contracts.ts # Smart contract addresses and instances
βββ contracts/ # Foundry smart contracts
β βββ src/ # Solidity source files
β βββ test/ # Contract tests
β βββ script/ # Deployment scripts
β βββ .env.example # Contracts environment variables
β βββ foundry.toml # Foundry configuration
βββ public/ # Static assets
βββ .env.example # Frontend environment variables template
- Node.js (v18 or higher)
- npm or yarn or pnpm
- Foundry - Install here
- Thirdweb Account - Get API keys
-
Clone the repository
git clone https://github.com/moayaan1911/quickdapp.git cd quickdapp -
Install dependencies
npm install
-
Set up environment variables
Frontend (.env.local):
cp .env.example .env.local
Edit
.env.localand add your Thirdweb credentials:NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_client_id_here THIRDWEB_SECRET_KEY=your_secret_key_here
Contracts (.env):
cd contracts cp .env.example .env cd ..
Edit
contracts/.envand add your deployment credentials (RPC URLs, private keys, etc.) -
Build smart contracts
cd contracts forge build cd ..
-
Start development server
npm run dev
Visit http://localhost:3000 to see your dApp! π
QuickDapp includes custom scripts for streamlined development:
Build everything - Compiles smart contracts and builds Next.js app
npm run quickdapp-buildEquivalent to: forge build + next build
Start development - Compiles contracts and starts dev server
npm run quickdapp-devEquivalent to: forge compile + next dev --turbopack
Run all tests - Tests contracts and lints frontend code
npm run quickdapp-testEquivalent to: forge test + next lint
Clean build artifacts - Removes all build files
npm run quickdapp-cleanEquivalent to: forge clean + removes .next and out directories
- Visit Thirdweb Dashboard
- Create a new project
- Copy your Client ID and Secret Key
- Add them to your
.env.localfile
The contracts/ directory contains a complete Foundry setup:
src/- Your Solidity contractstest/- Contract unit testsscript/- Deployment scriptsfoundry.toml- Foundry configuration
QuickDapp includes seamless contract integration through lib/contracts.ts:
- Contract Addresses - Centralized management of deployed contract addresses
- Contract Instances - Pre-configured Thirdweb contract instances
- Multi-chain Support - Easy switching between different networks
- Type Safety - Full TypeScript support for contract interactions
Example usage:
import { simpleUSDContract } from "@/lib/contracts";
import { prepareContractCall, sendTransaction } from "thirdweb";
const transaction = prepareContractCall({
contract: simpleUSDContract,
method: "function claimAirdrop()",
params: [],
});QuickDapp supports 50+ blockchain networks out of the box:
- Mainnets: Ethereum, Polygon, BSC, Arbitrum, Optimism, Base, Avalanche
- Testnets: Sepolia, Mumbai, BSC Testnet, Arbitrum Sepolia, Base Sepolia
- Layer 2s: Polygon zkEVM, Linea, Scroll, Mantle
Add more chains in components/ConnectWallet.tsx.
QuickDapp includes a powerful AI Bot and Chat system powered by Thirdweb AI:
- Smart Integration - Seamlessly integrates with your dApp
- Context-Aware - Understands wallet connections and chain info
- Real-time Responses - Instant AI-powered assistance
- Interactive Chat - Full-featured chat interface with message history
- Multi-chain Support - Works across all supported blockchain networks
- Wallet Integration - Automatically includes user's wallet context
- Error Handling - Graceful handling of API errors and configuration issues
- π Blockchain Queries - Check balances, transaction history, token info
- π DeFi Operations - Help with swaps, liquidity, and protocol interactions
- π Smart Contracts - Assistance with contract deployment and interaction
- πΌοΈ NFT Operations - Support for minting, transfers, and NFT analysis
- π‘ Web3 Education - Explanations of blockchain concepts and best practices
- Typewriter animation for "QuickDapp" title
- Tech stack badges highlighting key technologies
- Gradient text effects and smooth animations
- 50+ blockchain networks with automatic switching
- Dynamic theming based on connection status
- Account abstraction with gas sponsoring
- ENS support for readable addresses
- Conditional visibility - Only appears when wallet is connected
- Smart contract integration - Directly calls contract functions
- Transaction handling - Secure transaction preparation and execution
- Status feedback - Loading, success, and error states with animations
- One-click claiming - Simple interface for token airdrops
- GitHub repository linking
- Creator support via Buy Me Coffee
- Professional profile with contact information
- Demo video showcase
Create components in components/ui/ directory:
// components/ui/MyComponent.tsx
"use client";
import { motion } from "motion/react";
export default function MyComponent() {
return (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="p-4">
{/* Your component content */}
</motion.div>
);
}- Create contract in
contracts/src/ - Write tests in
contracts/test/ - Compile with
forge build - Test with
forge test - Deploy with
forge script
Required environment variables:
# Thirdweb Configuration
NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_client_id_here
THIRDWEB_SECRET_KEY=your_secret_key_here- β‘ Next.js 15 - React framework with App Router
- π¨ Tailwind CSS - Utility-first CSS framework
- β¨ Motion - Animation library (Framer Motion v12)
- π· TypeScript - Type-safe JavaScript
- π― React Icons - Comprehensive icon library
- π Thirdweb v5 - Web3 development platform
- β‘ Ethers.js v6 - Ethereum JavaScript library
- π Multi-chain - 50+ blockchain networks
- βοΈ Foundry - Fast Solidity development framework
- π Solidity - Smart contract programming language
- π§ͺ Forge - Testing and deployment tools
- π¦ npm/yarn/pnpm - Package management
- π§ ESLint - Code linting and formatting
- ποΈ Turbopack - Fast bundler for development
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you found this helpful, please give it a β on GitHub and consider buying me a coffee!