Hooks
CommonPlace uses 42 custom hooks for data fetching, state management, and feature logic. All hooks are in src/hooks/.
Friendship & Social
| Hook | Purpose |
|---|---|
| useFriendship | Full friendship lifecycle (send, accept, decline, cancel, remove) |
| useFriends | Friends list with search, filtering, and selection |
| useBlock | Block state, blocked users list, interaction permissions |
| useSharedCircles | Circles shared between two users, block status within circles |
| useSteppedBack | Temporary private breaks from friends |
| useRelationshipTypes | Custom relationship type CRUD |
| useRelationshipEdges | Relationship edges between users |
| useRelationshipEncryption | Client-side encryption for relationship data |
Circles
| Hook | Purpose |
|---|---|
| useCircles | Circle list, single circle CRUD, members, posts |
| useCircleCharter | Circle charter toggle definitions and management |
| useCircleFeedState | Per-circle feed state, new post counts |
| useShareToCircle | Share-to-circle modal workflow with W.E.L. prompts |
Posts & Feed
| Hook | Purpose |
|---|---|
| useIntentStyles | Intent style customization (global and per-user) |
| usePostPresets | Post style presets |
| useBuildOn | "Build On" post creation with dialogue chains |
| useAutoSave | Auto-save drafts with debouncing |
| useDrafts | Draft CRUD with pinning and auto-save |
Messaging
| Hook | Purpose |
|---|---|
| useConversation | Conversation management and participants |
| useMessageReactions | Message emoji reactions |
| useSteppedAway | "Stepped away" status for conversations |
Notifications
| Hook | Purpose |
|---|---|
| useNotifications | Full notification management with optimistic UI |
| useShareNotifications | Batch share notification processing |
MeBook
| Hook | Purpose |
|---|---|
| useMeBookQuestion | MeBook questionnaire interaction |
Security & Rate Limiting
| Hook | Purpose |
|---|---|
| useRateLimit | Rate limit checking, recording, and status |
| useAccountTier | Account tier state and tier-aware rate limiting |
| useDataRetention | Retention settings, post archiving, GDPR export |
| useReport | Report submission with rate limiting |
| usePrivacyCurtain | Privacy curtain with idle detection |
Admin
| Hook | Purpose |
|---|---|
| useAdmin | Admin role checking and permissions |
| useAdminUsers | User search, detail views, moderation actions |
| useAuditLog | Audit log viewing and CSV export |
| useDashboardMetrics | Admin dashboard metrics |
UI & Utility
| Hook | Purpose |
|---|---|
| useClickOutside | Detect clicks outside a referenced element |
| useEscapeKey | Listen for Escape key presses |
| useFocusTrap | Keyboard focus trap for accessible modals |
| useLocalStorage | Persistent state in localStorage |
| useIsMobile | Mobile/tablet/desktop breakpoint detection |
| useIdleDetection | User idle detection with configurable timeout |
| useDrag | Drag and resize interactions |
| useThemeSwitcher | Theme cycling (default, neon, forest, circus) |
Other
| Hook | Purpose |
|---|---|
| useUserLookup | Exact username lookup with rate limiting |
| useInviteLinks | Invite link management and lookup |
Last updated: 2026-02-07