35 lines
1.3 KiB
Markdown
35 lines
1.3 KiB
Markdown
|
|
# Explorer Routing Conventions
|
||
|
|
|
||
|
|
This frontend intentionally uses one canonical public route per explorer surface.
|
||
|
|
|
||
|
|
## Canonical Paths
|
||
|
|
|
||
|
|
- Collections are plural: `/blocks`, `/transactions`, `/addresses`, `/tokens`, `/operations`
|
||
|
|
- Dynamic page segments are named for the identifier they accept:
|
||
|
|
- `/blocks/[number]`
|
||
|
|
- `/transactions/[hash]`
|
||
|
|
- `/addresses/[address]`
|
||
|
|
- `/tokens/[address]`
|
||
|
|
- Search is first-class and canonical at `/search`
|
||
|
|
|
||
|
|
## Legacy Aliases
|
||
|
|
|
||
|
|
- `/more` is a compatibility alias only.
|
||
|
|
- The canonical route is `/operations`.
|
||
|
|
- New links, UI copy, docs, and static assets should point to `/operations`.
|
||
|
|
|
||
|
|
## Navigation Rules
|
||
|
|
|
||
|
|
- Use named buckets instead of vague overflow labels.
|
||
|
|
- Prefer `Explore`, `Data`, and `Operations` over catch-all labels like `More`.
|
||
|
|
- If a route appears in the navbar, use the same label everywhere else unless there is a strong product reason not to.
|
||
|
|
|
||
|
|
## Router Guardrail
|
||
|
|
|
||
|
|
The canonical public router is `src/pages`.
|
||
|
|
|
||
|
|
- New public routes should be added in `src/pages` unless there is a compelling architectural reason not to.
|
||
|
|
- `src/app/globals.css` remains the shared stylesheet source and is imported from `src/pages/_app.tsx`.
|
||
|
|
- New route aliases should be handled centrally in `next.config.js` redirects.
|
||
|
|
- Avoid introducing duplicate public routes that expose the same content under different names.
|