FEAT: Social Sharing & Deep-Linked Challenge Invitations
Type: Feature Request
Context / Problem Statement:
Currently, Grit is a siloed experience. Users have no native way to celebrate their "Grit" with their social circles or invite friends to follow their exact custom protocols. This lack of social proof and frictionless onboarding for new users limits the platform's community growth and viral potential.
User Story:
As a disciplined user, I want to share my completion stats and specific challenge configurations so that I can showcase my progress and invite others to join me in the same protocol with zero setup friction.
Proposed Solution:
Implement a two-pronged social strategy:
- Results Sharing: A
useShare utility hook that leverages the Web Share API for native mobile sharing and a Clipboard Fallback for desktop users.
- Challenge Cloning: A URL serialization utility to encode
ChallengeRules (Workouts, Diet, Water, etc.) into a Base64-encoded string or URL parameters, allowing the /app/setup page to act as a dynamic landing page that auto-fills based on the link.
Acceptance Criteria (AC):
Technical Implementation Details:
- Utilities: Create
src/utils/serialization.ts to handle serializeRules() and deserializeRules().
- Hooks: Create
src/hooks/useShare.ts to wrap the navigator.share API and navigator.clipboard fallback.
- Routing: Update the
SetupPage (/app/setup) to use useSearchParams to detect an incoming rules or invite parameter.
Definition of Done (DoD):
FEAT: Social Sharing & Deep-Linked Challenge Invitations
Type: Feature Request
Context / Problem Statement:
Currently, Grit is a siloed experience. Users have no native way to celebrate their "Grit" with their social circles or invite friends to follow their exact custom protocols. This lack of social proof and frictionless onboarding for new users limits the platform's community growth and viral potential.
User Story:
As a disciplined user, I want to share my completion stats and specific challenge configurations so that I can showcase my progress and invite others to join me in the same protocol with zero setup friction.
Proposed Solution:
Implement a two-pronged social strategy:
useShareutility hook that leverages the Web Share API for native mobile sharing and a Clipboard Fallback for desktop users.ChallengeRules(Workouts, Diet, Water, etc.) into a Base64-encoded string or URL parameters, allowing the/app/setuppage to act as a dynamic landing page that auto-fills based on the link.Acceptance Criteria (AC):
CompletionModalfooter.Technical Implementation Details:
src/utils/serialization.tsto handleserializeRules()anddeserializeRules().src/hooks/useShare.tsto wrap the navigator.share API and navigator.clipboard fallback.SetupPage(/app/setup) to useuseSearchParamsto detect an incomingrulesorinviteparameter.Definition of Done (DoD):