A modern SvelteKit template for building EVM-compatible dApps with professional wallet connections powered by AppKit (Reown/WalletConnect).
Clone the template
git clone https://github.com/0xLaurenzo/svelte-evm-template.git
cd svelte-evm-template
Install dependencies
npm install
Set up environment
cp .env.example .env
Get your WalletConnect Project ID from cloud.walletconnect.com and add it to .env
:
VITE_WALLETCONNECT_PROJECT_ID=your_project_id_here
Start development
npm run dev
Chains are configured in src/lib/wallet/appkit.ts
. To add a new EVM chain:
viem/chains
networks
array in the AppKit configurationimport { newChain } from 'viem/chains'
export const wagmiAdapter = new WagmiAdapter({
projectId,
networks: [
mainnet,
sepolia,
// ... existing chains
newChain // Add your new chain here
]
})
AppKit automatically handles the chain switching UI - no additional configuration needed!
src/
├── lib/
│ ├── components/
│ │ ├── Navbar.svelte # Navigation with wallet button
│ │ └── WalletButton.svelte # AppKit wallet connection
│ ├── constants/
│ │ ├── app.ts # App metadata
│ │ └── keys.ts # API keys configuration
│ └── wallet/
│ ├── appkit.ts # AppKit configuration
│ └── index.ts # Wallet exports
└── routes/
├── +layout.svelte # Root layout
└── +page.svelte # Home page
For detailed setup instructions and architecture information, see CLAUDE.md.