-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
π USER & AUTHUser accounts, authentication (email & OAuth), profiles, and account security.User accounts, authentication (email & OAuth), profiles, and account security.
Description
Currently, users are identified only by their account information (e.g., email).
To improve personalization and discovery, we will add unique usernames that can be displayed on profiles, posts, comments, and leaderboards.
β Tasks
-
Database & Schema
- Update
Usermodel in Prisma to includeusernamefield (unique, indexed). - Run Prisma migration for the new field.
- Add validation (only alphanumeric + underscore, 3β20 chars).
- Update
-
Authentication & Registration
- Update signup flow to include username input.
- Ensure username uniqueness is enforced at registration.
- Add fallback username generator for OAuth (Google/GitHub).
-
Profile & Settings
- Display username on profile, posts, comments, and leaderboard.
- Add option to update username in Profile Settings (with restrictions, e.g., max 1 change per 30 days).
- Add friendly error messages for duplicate or invalid usernames.
-
Routing & SEO
- Update profile URLs to use
/@usernameformat. - Redirect old profile URLs (if any) to the new format.
- Update profile URLs to use
-
Testing
- Add unit tests for username validation.
- Add integration tests for signup and profile update flow.
- Test OAuth signup with auto-generated username.
π― Acceptance Criteria
- Users can choose a unique username during signup.
- Usernames are displayed consistently across the platform.
- Profile URLs follow the
/@usernameformat. - Validation and uniqueness checks work reliably.
Metadata
Metadata
Assignees
Labels
π USER & AUTHUser accounts, authentication (email & OAuth), profiles, and account security.User accounts, authentication (email & OAuth), profiles, and account security.