Skip to content

Use Workspace Slug Instead of ULID in Panel URLs #109

@ManukMinasyan

Description

@ManukMinasyan

Overview

Replace the tenant ULID with a human-readable slug in all panel URLs for better UX and shareability.

Current Behavior

  • URLs: https://app.relaticle.test/01aryz6p69z94kvqvfpf37va39/companies
  • Uses ULID (26 characters) which is not user-friendly

Desired Behavior

  • URLs: https://app.relaticle.test/acme-corp/companies
  • Uses workspace slug (human-readable, derived from name)

Changes Required

1. Database Migration

  • Add slug column to teams table
  • Add unique constraint on slug
  • Populate slugs for existing teams

2. Team Model

  • Add slug to $fillable
  • Implement slug generation (auto-generate from name)
  • Override getRouteKeyName() to return 'slug'

3. Slug Generation

  • Auto-generate on team creation
  • Handle uniqueness (append numbers if needed)
  • Consider using spatie/laravel-sluggable or custom implementation

4. Team Creation/Update

  • Generate slug when team is created
  • Optionally allow slug editing (with validation)

Files Affected

  • app/Models/Team.php
  • database/migrations/xxxx_add_slug_to_teams_table.php
  • database/factories/TeamFactory.php
  • Team creation forms (if slug should be editable)

Success Criteria

  • Slug column added to teams table
  • Existing teams have slugs generated
  • New teams auto-generate slugs from name
  • URLs use slug instead of ULID
  • Slug uniqueness enforced
  • Tests updated and passing

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uiUser interface and frontend

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions