Skip to content

feat(avatar): Postie avatar creator + surface across app#113

Open
code418 wants to merge 1 commit into
masterfrom
feat/postie-avatars
Open

feat(avatar): Postie avatar creator + surface across app#113
code418 wants to merge 1 commit into
masterfrom
feat/postie-avatars

Conversation

@code418
Copy link
Copy Markdown
Owner

@code418 code418 commented Apr 26, 2026

Summary

  • New Your Postie screen lets players build a Postman James-style avatar from swappable parts (skin, head, hair, eyes, nose, facial hair, hat, glasses, background) — accessed from Settings → "Your postie".
  • Saved config persists to users/{uid}.avatar and is rendered everywhere a player appears: friends list, both leaderboard tabs (global + friends-only), user profile header, settings header. Falls back to initials when no avatar is set.
  • Cloud Functions (startScoring, updateDisplayName, newDayScoreboard) embed the avatar map into leaderboard entries so the global tab renders avatars without an N+1 user-doc read.
  • Firestore rules extended to permit a user to write only their own avatar map (size-capped at 20 keys).

Implements the Royal Mail Avatar Workshop design from the Claude Design handoff bundle.

Test plan

  • flutter analyze — clean
  • flutter test — 98 passing
  • npm test (functions) — 227 passing
  • flutter build web — succeeds
  • Manual: open Settings → Your postie → cycle parts → Save → confirm avatar shows in Friends list, both Leaderboard tabs, and Profile header
  • Manual: open creator a second time → confirm saved state loads
  • Manual: claim a postbox → confirm leaderboard entry now carries avatar
  • Deploy: firebase deploy --only firestore:rules,functions

🤖 Generated with Claude Code

…eaderboards, and profile

Players can now build a Postman James-style avatar from swappable parts
(skin, head, hair, eyes, nose, facial hair, hat, glasses, background).
The saved config persists to users/{uid}.avatar and is rendered wherever
players appear: friends list, leaderboards (global + friends-only),
profile header, and settings header. Falls back to initials when no
avatar is set.

Cloud Functions embed the avatar map in leaderboard entries so the
global tab renders avatars without an N+1 read; Firestore rules permit
the user to write only their own avatar map (size-capped).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant