Server Side API AI

An essential walkthrough to securing external API calls: Building a server-side proxy in Next.js. Understand the security risks of client-side API calls and learn to build a secure server-side proxy in Next.js. Use API routes and environment variables to safely interact with third-party services without exposing secrets.

1. Introduction
A practical guide to building a Next.js NFT marketplace: Setup and core concepts. Learn to navigate and enhance an existing dynamic site codebase, moving beyond static development. Implement essential features like data indexing for displaying on-chain events and frontend compliance checks using external APIs. Duration: 5min
2. Setup
An essential walkthrough to setting up your NFT marketplace project. Get your TypeScript NFT marketplace running by cloning the starter code, exploring its structure, and launching the local dev environment. Learn to configure WalletConnect, perform initial contract interactions, and identify frontend data query limitations. Duration: 10min
3. Event Indexing
A technical overview to displaying recent NFT listings: The need for event indexing. Discover the limitations and high costs associated with querying smart contract storage directly for ordered data like recent listings. Explore how event indexing offers an efficient off-chain alternative by processing emitted events to maintain queryable state for your frontend. Duration: 7min
4. rindexer Indexing
An introductory walkthrough to understanding and using rindexer for EVM event indexing. Discover `rindexer`, a high-performance Rust toolset for indexing smart contract events using simple YAML configuration. Learn to set up, configure, and run `rindexer` to efficiently track EVM events and improve dApp data retrieval performance. Duration: 18min
5. Checking For Events
A hands-on walkthrough to checking for events: Indexing smart contract interactions locally. See how an indexer detects and stores smart contract events within a local Anvil blockchain environment. Understand and resolve common state synchronization issues that occur when restarting the local chain. Duration: 5min
6. Graphql
A practical guide to connecting indexed blockchain data to your frontend. Learn how to leverage rindexer's GraphQL API to fetch indexed blockchain events for your Next.js application. Master schema exploration, query crafting, proxy setups, and type-safe data fetching techniques. Duration: 13min
7. Usequery
A practical guide to fetching and displaying active NFT listings with `useQuery`. Learn to replace `useEffect`/`useState` with `useQuery` for fetching NFT data via GraphQL and build a custom hook. Efficiently filter out bought/cancelled items using Sets and `useMemo` to display only currently active listings. Duration: 12min
8. Checking For Buy Events
A hands-on walkthrough of testing the NFT purchase flow and event indexing. Follow the complete NFT purchase cycle, including UI steps, wallet interactions, and potential failures. Discover the crucial role of the event indexer in processing blockchain events (`ItemBought`) to update the marketplace state. Duration: 2min
9. Review
An essential walkthrough to indexing smart contract events for NFT marketplaces. Overcome the limitations of Solidity mappings by leveraging events and an off-chain indexer (`rindexer`). See how to configure indexing and use GraphQL to efficiently display currently active NFT listings in your dApp. Duration: 4min
10. Circle Developer Console
An essential lesson to web3 dApp compliance with Circle. Discover the necessity of screening user wallets at the website level for regulatory compliance, even with decentralized contracts. Get started with Circle's Compliance Engine, obtaining API keys and planning a secure backend integration. Duration: 3min
11. Sample Compliance API Call
A practical guide to screening blockchain addresses with Circle's Compliance API. Learn how to use Circle's Compliance API endpoint to check blockchain addresses against configured rules and watchlists. Covers API key setup, constructing cURL requests, and interpreting APPROVED/DENIED responses for compliant applications. Duration: 6min
12. Server Side API AI
An essential walkthrough to securing external API calls: Building a server-side proxy in Next.js. Understand the security risks of client-side API calls and learn to build a secure server-side proxy in Next.js. Use API routes and environment variables to safely interact with third-party services without exposing secrets. Duration: 9min
13. Compliance API In A Component
A robust pattern to Implementing frontend wallet compliance checks via a backend API. Implement a secure pattern in Next.js/React for wallet compliance by delegating checks to a backend API. Keep API keys safe and control application access based on verification status. Duration: 6min
14. Course Completed
A secure approach to integrating Circle Compliance: A secure backend approach. Learn why using a backend API route is crucial for securely integrating Circle Compliance in Next.js, protecting your API key. Understand the server-side logic involved and the implications for deploying dynamic applications versus static sites. Duration: 4min

Course Overview

About the course

What you'll learn

How to build full-stack web3 applications on ZKsync

JavaScript/TypeScript: viem, wagmi, synpress

Nodejs and pnpm

rindexer

Circle Compliance Engine and USDC

Fleek site hosting and CLI

How to build a static and dynamic React/Next.js site

How to leverage AI to code faster and more securely

Course Description

Who is this course for?

  • Software engineers
  • Frontend developers
  • Backend developers
  • web3 developers
  • Smart contract security researchers

Potential Careers

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

DeFi Developer

$75,000 - $200,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Security researcher

$49,999 - $120,000 (avg. salary)

Meet your instructors

Patrick Collins

Patrick Collins

Founder at Cyfrin

Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.

Last updated on May 15, 2025