Introduction to Stage 3
Full-stack Onchain Application. Wallets, frontend state machines, backends, databases, indexing, and real-time updates.
The questions this stage addresses
Contracts are only a small part of a system. A usable product must also answer:
- How does a user sign in, what does a signature authorize, and how is it revoked?
- What should the interface display during the seconds spent waiting for confirmation?
- Why do we need a backend and database if data already exists on-chain?
- What happens to data already written to your database after a chain reorganization?
The last question distinguishes this stage's levels of competence. An indexer that handles reorganizations correctly is very different from one that merely runs a demo.
Six chapters
What actually happens when you log in to a dApp?
What should the interface show during the seconds while a transaction awaits confirmation?
If the data is already on-chain, why do we need a backend?
How should on-chain data be stored in a database?
What happens to your data after a chain reorganization?
How can you push on-chain changes to users in real time?
After this stage
You can independently deliver a complete DApp: connect a wallet, submit transactions, index events, and refresh in real time.
Stage artifact: A full-stack DApp.
Study suggestions
- Implement all six states of T14's transaction state machine, including replacement and failure. Most tutorials implement only the success path.
- T17 has a strict acceptance condition: rerunning from any block height must produce exactly the same result. Meet it and you have surpassed most people claiming indexing experience.