Skip to main content

HomeRoom

Location: src/components/HomeRoom.jsx

Overview

HomeRoom is the personal space for each user, accessible at /room/:username. It replaces the traditional profile page with a modular, customizable room. The room owner can add, remove, and reorder modules (about, photos, links, featured posts, MeBook, guestbook, posts, friends, Spotify, custom), and apply room-level styling (colors, fonts, backgrounds).

Visitors who are blocked see a ProfileBlockedState. The owner sees editing controls. Non-owners see a read-only view with friend, message, and report actions.

Relevant Invariants

  • Invariant #10: "Expressive Freedom Is Spatially Contained" -- Deep customization is confined to the user own HomeRoom.
  • Invariant #7: "Human-Scale Social Contexts" -- The friends module and guestbook keep interactions personal.
  • Invariant #14: "Privacy Is Infrastructure" -- Block state is checked before any content renders.

Props

PropTypeRequiredDefaultDescription
sessionobjectYes--Supabase auth session

URL Parameters

ParameterDescription
:usernameThe username of the room owner, resolved from the profiles table

Module Types

ModuleComponentDescription
aboutAboutModuleBio and personal info
photosPhotosModulePhoto gallery
linksLinksModuleExternal links collection
featured_postsFeaturedPostsModulePinned/featured posts
mebookMeBookModulePersonal Q&A / journal
guestbookGuestbookModuleVisitor messages
postsPostsModuleUser recent posts
friendsFriendsModuleFriends list display
spotifySpotifyModuleSpotify embed
customCustomModuleUser-defined custom content