Skip to content

Feature: User-defined short slugs for project URLs #6435

Description

@dmetzner

Research Summary

Currently project URLs use UUIDs: share.catrob.at/project/3d49a458-4421-42e9-9fdc-804dfb6ad342 (36 chars in the path). This is long and not user-friendly for sharing.

Options Evaluated

Approach Example Pros Cons
Auto-generated Base62 /project/A1B2C3D4 Short, unique Not meaningful, another random string
Auto-increment integer /project/12345 Short, sequential Exposes total project count, enumerable
User-defined slug /project/my-cool-game Short AND meaningful Requires uniqueness check, optional
Separate short domain app.catrob.at/A1B2C3 Very short Needs DNS setup, maintenance

Recommendation: User-Defined Slugs

Let users optionally claim a custom slug for their projects, like GitHub repo names.

Implementation plan:

  1. Add optional slug column (VARCHAR 50, unique, nullable) to Program entity
  2. Add slug validation: alphanumeric + hyphens, 3-50 chars, unique
  3. Controller checks if {id} param is UUID or slug, looks up accordingly
  4. UI: "Custom URL" field in project settings dialog (same pattern as visibility toggle)
  5. Old UUID links always work (never break backwards compatibility)
  6. Default: no slug (URL stays as UUID until user sets one)

Route change:

// Existing route works for both UUID and slug:
#[Route(path: '/project/{id}', name: 'program')]
// Controller:
$project = $this->findByIdOrSlug($id);

Effort: ~1-2 days (entity + migration + settings UI + validation)

Why not auto-generated short IDs?

Auto-generated short IDs (Base62 of UUID) would be A1B2C3D4E5 — shorter but still meaningless. A user-chosen slug like my-cool-game is both short AND tells you what the project is.

Acceptance Criteria

  • Users can set an optional custom slug for their projects
  • share.catrob.at/project/my-slug loads the correct project
  • share.catrob.at/project/{uuid} still works (backwards compatible)
  • Slugs are unique, alphanumeric + hyphens, 3-50 characters
  • Share button uses the slug URL when available

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUX team should take a look at itpriority:lowLow priority backlog

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions