Alchemy reference architecture
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill alchemy-reference-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Implement reference architecture for Alchemy-powered Web3 applications. Use when designing dApp infrastructure, planning multi-chain deployments, or structuring a production blockchain application. Trigger: "alchemy architecture", "dApp architecture", "alchemy project structure", "web3 system design", "alchemy multi-chain design".
The file declares its own license as MIT. That is the authorβs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.4 KB, 982 tokens by cl100k_base, as published. Nobody here has run it
Alchemy Reference Architecture
System Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React/Next.js) β
β - Wallet connection (MetaMask, WalletConnect) β
β - Portfolio dashboard β
β - NFT gallery β
β - Transaction history β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β HTTPS (no API key exposed)
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β API Layer (Next.js/Express) β
β - /api/balance/:address β
β - /api/nfts/:owner β
β - /api/tokens/:address β
β - /api/transactions/:address β
β - /webhooks/alchemy (webhook receiver) β
βββββββββ¬βββββββββββ¬βββββββββββ¬ββββββββββββββββββββββββββββ
β β β
ββββββΌββββ βββββΌβββββ ββββΌβββββββ
βAlchemy β βAlchemy β βAlchemy β
βCore APIβ βNFT API β βNotify β
β(RPC) β β β β(Webhooksβ
ββββββββββ ββββββββββ βββββββββββ
ETH/Polygon/ARB/OP/Base
Project Structure
web3-dapp/
βββ src/
β βββ alchemy/
β β βββ client-factory.ts # Multi-chain Alchemy client factory
β β βββ cache.ts # Response caching with TTL
β β βββ throttler.ts # CU-aware rate limiter
β β βββ errors.ts # Error classification
β βββ portfolio/
β β βββ fetcher.ts # Wallet portfolio aggregator
β β βββ transactions.ts # Transaction history analyzer
β β βββ multi-chain.ts # Cross-chain balance aggregator
β βββ nft/
β β βββ collection.ts # NFT collection explorer
β β βββ batch-metadata.ts # Batch metadata fetcher
β β βββ verify-ownership.ts # NFT ownership verification
β βββ contracts/
β β βββ read-contract.ts # Smart contract read operations
β β βββ abis/ # Contract ABI files
β βββ webhooks/
β β βββ handler.ts # Webhook endpoint
β β βββ verify.ts # HMAC signature verification
β β βββ event-router.ts # Event type routing
β βββ security/
β β βββ validators.ts # Input validation (addresses, blocks)
β β βββ proxy.ts # API key proxy for frontend
β βββ api/ # API route handlers
βββ tests/
β βββ unit/ # Unit tests (mocked Alchemy)
β βββ fork/ # Mainnet fork tests (Hardhat)
β βββ integration/ # Sepolia integration tests
βββ contracts/ # Solidity contracts (if applicable)
βββ hardhat.config.ts # Hardhat + Alchemy fork config
βββ package.json
Key Design Decisions
| Decision | Choice | Rationale |
|---|---|---|
| SDK | alchemy-sdk | Official, typed, Enhanced + NFT APIs included |
| Multi-chain | Client factory pattern | Lazy initialization, shared API key |
| Caching | In-memory with TTL tiers | Block data = 12s, metadata = 24h |
| Rate limiting | Bottleneck with CU weights | Matches Alchemy CU budget model |
| Frontend access | API proxy | Never expose API key to browser |
| Real-time | WebSocket subscriptions | Lower cost than polling |
| Testing | Hardhat mainnet fork | Reproducible tests with real data |
Output
- Complete project structure for Alchemy-powered dApp
- Multi-chain architecture with client factory
- API proxy pattern keeping API key server-side
- Webhook integration for real-time event processing
Resources
Next Steps
Start with alchemy-install-auth, then follow skills through production deployment.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.