A demonstration application showcasing how to build a full-stack dApp on the Casper Network. The dApp allows users to send tips with CSPR tokens to a developer to show their appreciation. The tips are stored in a smart contract and indexed by CSPR.cloud. The dApp also provides a list of all tips sent so far.
We also provide a comprehensive, step-by-step tutorial that teaches you how to build this entire dApp from scratch.
β Start the Tutorial: From Idea to dApp in Minutes
β¦or continue reading this page to set up your local environment and try the demo firsthand.
This demo demonstrates:
- Authentication & Wallet Integration: Using CSPR.click, a Web3 authentication layer that integrates with all Casper ecosystem wallets
- Blockchain Data Indexing: Using CSPR.cloud, an enterprise-grade middleware platform that provides access to indexed and enriched blockchain data with real-time streaming
- Smart Contract Development: Writing contracts with Odra framework
- Event Handling: Listening to and indexing smart contract events
This demo uses several tools from the Casper Ecosystem β a collection of developer tools that eliminate boilerplate and accelerate Casper dApp development.
| Product | Purpose | When to Use | Documentation |
|---|---|---|---|
| CSPR.click | Wallet connection & transaction signing | Every dApp needs this for user authentication and transaction submission | docs.cspr.click |
| CSPR.cloud | Event indexing & blockchain API | When you need to query blockchain data efficiently or display historical events | docs.cspr.cloud |
| CSPR.design | React UI component library | For building ecosystem-aligned user interfaces | cspr.design |
| CSPR.build | Developer console | Managing API keys, monitoring usage, and configuring services | console.cspr.build |
| Odra Framework | Smart contract framework | Writing Casper smart contracts in Rust with high-level abstractions | odra.dev/docs |
| Casper JS SDK | JavaScript SDK | Building transactions and interacting with the blockchain from JavaScript/TypeScript | npm: casper-js-sdk |
π Try it live: donation-demo.casper.network
Before you begin, ensure you have:
- Docker and Docker Compose installed
- CSPR.build account for API access keys
- Node.js and npm (for local development)
The fastest way to run the complete application:
- Configure environment variables:
cp server/.env.example server/.envThe default values work for testnet deployment with Docker.
- Launch all services:
docker compose -f infra/local/docker-compose.yaml --project-name tip-barista up -dThis starts the database, event listener, API server, and web client.
Create a free account at CSPR.build to obtain:
- CSPR.click application id (for wallet authentication)
- CSPR.cloud access keys (for blockchain data indexing)
You have two options:
Option A: Use the deployed contract (recommended for testing)
- Package hash:
c447e9d334a710bc3e0a47cbea854c269e41637d7b9aa9d37a745596f651ed7a - View on Testnet Explorer
- Already configured in default settings
Option B: Deploy your own contract
- Follow the smart contract deployment guide
- Update configuration with your new package hash
The server includes an event listener and REST API.
Requirements:
- MySQL database (use Docker Compose for local development)
- CSPR.cloud API credentials
Setup:
- See detailed instructions in server/README.md
- Configure database connection and API keys
- Start the event listener to index smart contract events
- Launch the API server
Setup:
- Follow instructions in client/README.md
- Configure CSPR.click credentials
- Point to your API server endpoint
- Run the development server
ββββββββββββββββββββββββ
β Casper Network β
βββββββββββββ¬βββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β β β
β β β
βββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββ
β CSPR.click β β CSPR.cloud β β CSPR.cloud β
β (Wallet Auth) β β (API + Events)β β Streaming API β
βββββββββββββββββββ βββββββββ¬ββββββββ ββββββββ¬ββββββββββ
β β β
β β β
β β β
βββββββββββββββ β β
β Web Client β β β
βββββββββββββββ β β
β β β
β β β
β β β
βββββββββββββββ β β
β API Server β <ββββββββββββ β
βββββββββββββββ β
β β
β β
β β
βββββββββββββββ ββββββββββββββββββ β
β MySQL DB β<βββββββ β Event Listener β<βββββ
βββββββββββββββ ββββββββββββββββββ
.
βββ tutorial/ # π Step-by-step tutorial
βββ client/ # React frontend application
βββ server/ # Backend API and event listener
βββ smart-contract/ # Odra smart contract source
βββ infra/ # Dockerfiles and Docker Compose configuration
Casper is a Proof of Stake enterprise blockchain designed to help enterprises build blockchain-enabled products and services, featuring upgradeable smart contracts, developer-friendly features, and lower transaction costs than most Layer-1 blockchain offerings. Key features include:
- Upgradeable Smart Contracts: Modify contracts post-deployment without complex migrations
- Developer-Friendly: Supports Rust and other mainstream languages via WebAssembly
- Enterprise-Ready: Multi-signature transactions and weighted key permissions at protocol level
- Predictable Costs: Stable gas fees during high network activity
- Casper Network - Official website
- CSPR.build Console - Developer tools access
- CSPR.cloud Documentation - API reference
- Testnet Explorer - View transactions and contracts
- Odra Framework - Smart contract development
- CSPR.click Documentation - Unified SDK that simplifies Web3 application onboarding
- CSPR Design System - CSPR.suite UI components library for React applications
Join Casper Developers Telegram channel to connect with other developers.
