URL Patterns & Routing

Goal

Understand all URL patterns, subdomains, handles, decks, embeds, and routing in Coachable Cards.


Quick Start

Main patterns:

  • {deck}.c.cards → Deck subdomain
  • {handle}.c.cards → User identity subdomain
  • c.cards/app/decks → Deck browser
  • c.cards/shared/{id} → Shared card

URL Patterns

Deck Subdomains

Any subdomain that's not a special system subdomain becomes a deck:

{deck-name}.c.cards

Examples:

  • leadership.c.cards → Leadership deck
  • habits.c.cards → Habits deck
  • 10x.c.cards → 10x deck
  • mydeck.c.cards → Custom deck

Routes:

  • {deck}.c.cards/ → Main deck view
  • {deck}.c.cards/c → Cinema mode
  • {deck}.c.cards/b → Blackout mode
  • {deck}.c.cards/{card-index} → Specific card

Identity Subdomains (Handles)

User identity pages:

{handle}.c.cards

Examples:

  • marklatimer.c.cards → Mark's identity page
  • brynne.c.cards → Brynne's identity page

Routes:

  • {handle}.c.cards/ → Identity overview
  • {handle}.c.cards/{deck} → User's deck

System Subdomains

Special subdomains for platform features:

app.c.cards          → Deck browser
create.c.cards        → Deck builder
admin.c.cards         → Admin panel
menu.c.cards          → Navigation menu
help.c.cards          → Help center
circle.c.cards        → Card Circles booking
super.c.cards         → Super C (ritual system)

Main Domain Routes

Routes on the main domain (c.cards or coachable.cards):

/                    → Homepage
/app                 → App interface
/app/decks           → Deck browser
/create              → Deck builder
/shared/{id}         → Shared card
/admin               → Admin panel
/docs                → Documentation

Card Routes

Direct card access:

/{deck}/c/{index}    → Specific card in cinema mode
/{deck}/b/{index}    → Specific card in blackout mode
/shared/{card-id}    → Shared card link

Subdomain Routing

How It Works

  1. Middleware detects subdomain from Host header
  2. Routes rewrite to appropriate pathname
  3. Pages render based on pathname

Special Subdomains List

These subdomains are handled specially (not treated as decks):

app, admin, www, api, super, cal, qr, a, pod, proposal,
jamgamble, tareckmoawad, hlts, marklatimer, scalebetter,
brynnetillman, adamwbarney, brynne, emilestudham,
stevesapato, jasonpadgett, dantrommater, create, decks,
subs, menu, help, rules, ritual, history, settings, faq,
builder, uplaunch, csv, training, onboarding, delivery,
hub, impact, circle, program, login, dev, saaspass,
passcards, r, ac, dlm, pdr, ldr, fdr, v, vcs, path

Deck Subdomain Pattern

Any subdomain NOT in the special list becomes a deck:

{any-subdomain}.c.cards → /{deck-name}

Handles & Identity

Handle Format

Handles follow this pattern:

[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?

Rules:

  • 1-63 characters
  • Lowercase letters, numbers, hyphens
  • Cannot start or end with hyphen

Examples:

  • marklatimer
  • brynne-tillman
  • user123
  • -invalid
  • user-

Identity Routes

{handle}.c.cards           → Identity page
{handle}.c.cards/{deck}     → User's deck
@{handle}                   → Universal namespace (routes to handle)

Embeds

iframe Embed

<iframe 
  src="https://{deck}.c.cards/{deck-slug}" 
  width="100%" 
  height="600" 
  frameborder="0"
  allowtransparency="true">
</iframe>

Direct Link Embed

<a href="https://{deck}.c.cards/{deck-slug}" target="_blank">
  View Deck
</a>

Shared Card Embed

<iframe 
  src="https://c.cards/shared/{card-id}" 
  width="400" 
  height="500" 
  frameborder="0">
</iframe>

Common Gotchas

1. Subdomain vs Path

Wrong:

https://c.cards/leadership  → This might work, but not the canonical URL

Right:

https://leadership.c.cards   → Deck subdomain (canonical)

2. Case Sensitivity

Subdomains and handles are case-insensitive, but paths are case-sensitive:

leadership.c.cards     ✅
LEADERSHIP.c.cards     ✅ (normalized)
/leadership            ✅
/Leadership            ❌ (might not work)

3. Special Characters

Subdomains: Only lowercase letters, numbers, hyphens
Handles: Same rules
Slugs: Same rules

Invalid:

my-deck!.c.cards       ❌ (exclamation mark)
user@name.c.cards      ❌ (at symbol)
deck with spaces.c.cards ❌ (spaces)

4. Trailing Slashes

Most routes work with or without trailing slashes:

leadership.c.cards/    ✅
leadership.c.cards     ✅

But some API routes are strict:

/api/create/deck        ✅
/api/create/deck/       ❌ (might fail)

5. Query Parameters

Query parameters are preserved:

leadership.c.cards?ref=twitter     ✅
leadership.c.cards/c?autoplay=true ✅

Checklist

  • [ ] Understand deck subdomain pattern
  • [ ] Know special subdomains list
  • [ ] Understand handle format rules
  • [ ] Know difference between subdomain and path routing
  • [ ] Test embed URLs
  • [ ] Verify case sensitivity rules

Next Steps


Having routing issues?Troubleshooting Guide