Routing
Stellar Explorer uses the Next.js App Router with a nested dynamic segment pattern.
URL Pattern
Section titled “URL Pattern”Every page follows this structure:
/[locale]/[network]/(explorer)/[page]/[...params]For example: /en/public/tx/abc123 breaks down as:
| Segment | Value | Purpose |
|---|---|---|
[locale] | en | Language (en, es, pt, fr, de, zh, ja, ko, it) |
[network] | public | Network (public, testnet, futurenet) |
(explorer) | — | Route group (not in URL) |
[page] | tx | Page type |
[...params] | abc123 | Transaction hash |
Route Group: (explorer)
Section titled “Route Group: (explorer)”The (explorer) route group organizes all main explorer pages without adding a URL segment. Pages include:
transactions/andtx/[hash]ledgers/andledger/[sequence]accounts/andaccount/[id]assets/contracts/andcontract/[id]search/watchlist/
File Structure
Section titled “File Structure”src/app/ [locale]/ [network]/ (explorer)/ transactions/page.tsx tx/[hash]/page.tsx ledgers/page.tsx accounts/page.tsx ...Source: src/app/