18 lines
1.2 KiB
Markdown
18 lines
1.2 KiB
Markdown
# 0064 Channels live at /channels/username
|
|
|
|
Status: Accepted · Area: architecture · Date: 2026-10-16 · Decided by: user
|
|
|
|
## Context
|
|
The public channel URL was `/@username`, rewritten onto `channels/[username]` because an `@…` folder is a parallel-route slot, with `/channels/…` redirected back to `/@…`. The user chose to stop handling «@» in the path.
|
|
|
|
## Decision
|
|
- A channel and its pages live at `/channels/username` (`/posts/[id]`, `/track-record`), the canonical URL. Build links only with `ROUTES.channel`, `ROUTES.post` and `ROUTES.trackRecord`.
|
|
- `next.config.ts` in bull and bear permanently redirects `/@:username/:path*` to `/channels/:username/:path*`, keeping the query (`?code=`). This is the only place «@» is read.
|
|
- A username segment is never stripped of a leading «@»: `/channels/@user` and `/checkout/@user` are 404.
|
|
|
|
## Alternatives
|
|
- Keep `/@username` with the rewrite: shorter to type and share, but two spellings of each channel to keep in step.
|
|
|
|
## Consequences
|
|
Search engines move the old URLs over through the 308. The back end still builds `/@username` links (SMS, notifications, admin invite URLs); they work through the redirect until changed there. Records 0044, 0055 and 0059 still name the old form.
|