@pixygon/social
v1.4.0
Published
Shared social features for Pixygon applications — friends, profiles, PixyGo, levels, achievements
Downloads
582
Maintainers
Readme
@pixygon/social
Shared social features for Pixygon apps — friends, skills, challenges, PixyGo encounters, profile components.
Install
npm install @pixygon/socialSetup
import { SocialProvider } from '@pixygon/social/components'
<SocialProvider config={{
appId: 'kartograf',
appName: 'Kartograf',
primaryColor: '#00ccff',
accentColor: '#ff6600',
baseUrl: 'https://api.pixygon.com/v1',
getToken: () => accessToken,
getUserId: () => userId,
}}>
<App />
</SocialProvider>Hooks
useSkillsSync()
Cross-app skill XP tracking. Auto-saves every 15s.
const { skillXp, totalXp, addSkillXp } = useSkillsSync()
addSkillXp('explorer', 50)useChallenges()
Challenge progress across all apps.
const { progress, updateProgress, getAppCounts } = useChallenges()
updateProgress('kart_walk_100m', currentDistance)useFriends()
Follow/follower system.
const { following, followers, toggleFollow } = useFriends()usePixyGo({ userPosition, isTracking })
PixyGo encounter collection system.
const { encounters, collection, processEncounters } = usePixyGo({ userPosition, isTracking })Components
import { ProfileLayout, SkillsGrid, FriendsList, ChallengesList, ProfileCard } from '@pixygon/social/components'ProfileLayout— Full tabbed profile page (skills, friends, challenges, PixyGo)SkillsGrid— Skill cards grouped by appFriendsList— Follow/follower with searchChallengesList— Challenge progress with tier filtersProfileCard— User card with level badge and XP bar
Utilities
import { getLevel, getLevelProgress, ALL_SKILLS, ALL_CHALLENGES, APP_NAMES, APP_COLORS } from '@pixygon/social'