A beginner-friendly, educational template for learning full-stack decentralized application (dApp) development. This template focuses on teaching the fundamentals of Web3 development using simple, understandable patterns.
This template is designed to help developers understand:
- Smart contract development and deployment workflow
- Web3 frontend integration basics
- Blockchain interaction patterns
- Development environment setup and tooling
The project intentionally uses vanilla TypeScript for the frontend to keep the focus on core Web3 concepts rather than framework-specific implementations.
├── packages/
│ ├── frontend/ # Vanilla TypeScript Web3 frontend
│ └── hardhat_espace/ # Smart contract tutorial contracts
├── .devcontainer/ # Development container configuration
└── package.json # Root package configuration
- 📚 Educational Smart Contracts with Detailed Comments
- 🌐 Vanilla TypeScript Frontend (No Framework Overhead)
- 🔗 Web3 Integration Examples with Wagmi
- 🏗️ Step-by-Step Contract Deployment
- 📦 Organized Monorepo Structure
- 🐳 Ready-to-Use Development Environment
- Node.js
- PNPM
- Docker (for development container)
- tmux (for development workflow)
- Install dependencies:
pnpm install- Start the development environment:
pnpm devThis will start:
- Frontend development server (top pane)
- Local blockchain node (bottom pane)
- Stop the development environment:
pnpm dev:stoppnpm dev- Start both frontend and blockchain node in tmux split panespnpm dev:stop- Stop all development processespnpm clean- Clean all build artifacts and dependenciespnpm frontend- Run only the frontend development serverpnpm node- Run only the blockchain node
This is an educational template based on the concept "learn through examples". Follow these steps to get hands-on experience with the full development workflow before diving into the code:
-
Open in devcontainer (locally, codespace will be enable soon)
- The devcontainer will automatically run
pnpm installto add all required libraries
- The devcontainer will automatically run
-
Start the development environment:
pnpm dev
This opens both frontend and hardhat environments in a split console using tmux
-
Open a new terminal and navigate to the hardhat package:
cd packages/hardhat_espace/ -
Test deployment with a dry run:
hh ignition deploy ignition/modules/BasicConceptsModule.ts
This deploys contracts temporarily to validate deployment logic
-
Execute the actual deployment:
hh ignition deploy ignition/modules/BasicConceptsModule.ts --network confluxESpaceLocal
-
Navigate to the frontend directory:
cd ../frontend -
Generate contract interfaces:
pnpm generate-abi
This extracts information from the hardhat deployment for frontend interaction
-
Access the frontend:
- Open http://localhost:5173/
- Connect your wallet
- In the first terminal (running
pnpm dev):- Press 'f' to access the funding interface
- Enter your wallet address and desired amount
- Follow the instructions to receive test funds
Now that everything is set up, you can:
-
Study the smart contracts in
packages/hardhat_espace/contracts/- Each contract demonstrates specific Solidity concepts
- Follow the progression from basic to advanced concepts
-
Explore the frontend in
packages/frontend/- See how Web3 interactions are implemented
- Learn contract integration patterns
- Understand TypeScript type generation
-
Understand the deployment process
- Review deployment configurations
- Learn about network management
- See how frontend and contracts connect
Additional sections and detailed explanations will be added soon.
ISC