Feature Request / Bug
Route: /student/profile/public/:id
Example URL: https://www.internhack.xyz/student/profile/public/1
Problem
The shareable profile URL currently uses the numeric user ID (e.g. /public/1). This is:
- Not user-friendly or shareable in a professional context
- Exposes internal database IDs
- Hard to remember or share verbally
Proposed Solution
Replace the numeric ID in the URL with a URL-safe version of the user's name or a unique username slug.
Option A — Name slug (e.g. /public/sachin-chaurasiya):
- Generate a URL-safe slug from
user.name (lowercase, spaces to hyphens)
- Add a
profileSlug field to the user table with a unique index
- Fall back to
name-id (e.g. sachin-chaurasiya-42) if the name slug is already taken
Option B — Username field:
- Add a
username field that students can set manually from their profile settings
- Validate uniqueness and URL safety on save
Acceptance Criteria
Feature Request / Bug
Route:
/student/profile/public/:idExample URL:
https://www.internhack.xyz/student/profile/public/1Problem
The shareable profile URL currently uses the numeric user ID (e.g.
/public/1). This is:Proposed Solution
Replace the numeric ID in the URL with a URL-safe version of the user's name or a unique username slug.
Option A — Name slug (e.g.
/public/sachin-chaurasiya):user.name(lowercase, spaces to hyphens)profileSlugfield to theusertable with a unique indexname-id(e.g.sachin-chaurasiya-42) if the name slug is already takenOption B — Username field:
usernamefield that students can set manually from their profile settingsAcceptance Criteria
StudentProfilePage.tsxgenerates the slug-based URL