Skip to main content

House & Room System

Status: ✅ Core Features Complete
Last Updated: 2026-01-19

Overview​

Complete house and room customization system with room unlocking, themes, furniture placement, and room upgrades. Rooms provide a visual representation of user progression and can be upgraded using crafted materials.

Implementation Details​

Room Management​

  • ✅ Database schema (UserRoom model with roomType, themeId, unlocked, unlockedAt, upgradeLevel)
  • ✅ HouseService with methods: getRooms, getOrCreateRoom, unlockRoom, setTheme, placeFurniture, removeFurniture, applyRoomUpgrade
  • ✅ Room types: WORKSPACE, GYM, KITCHEN, LIBRARY, MEDITATION_SPACE, BEDROOM, TROPHY_ROOM, MAGIC_ROOM
  • ✅ Comprehensive backend tests (9 service tests, all passing)

Room Upgrades​

  • ✅ Upgrade level system (0 = basic, 1 = basic upgrade, 2 = advanced upgrade)
  • ✅ Room upgrade craftables (room_upgrade_basic, room_upgrade_advanced) consume materials and coins
  • ✅ applyRoomUpgrade method consumes inventory items and upgrades rooms
  • ✅ Prevents downgrades (room must be below target upgrade level)
  • ✅ Frontend UI in RoomDetailPage showing upgrade level, available upgrades, and apply functionality
  • ✅ Comprehensive test coverage (9 test cases covering all scenarios)

Furniture Placement​

  • ✅ Place furniture items in rooms (UserInventoryItem.roomId links to UserRoom)
  • ✅ Remove furniture from rooms
  • ✅ Furniture display in room detail view

Frontend​

  • ✅ CharacterPage House tab with room grid view
  • ✅ RoomDetailPage with room info, furniture display, upgrade UI
  • ✅ Room icons and names for all room types
  • ✅ Visual indicators for upgrade levels

API Endpoints​

  • GET /gamification/house/rooms - Get all rooms for user
  • GET /gamification/house/rooms/:roomType - Get or create specific room
  • POST /gamification/house/rooms/:roomType/unlock - Unlock room
  • PATCH /gamification/house/rooms/theme - Set room theme
  • POST /gamification/house/furniture/place - Place furniture in room
  • POST /gamification/house/furniture/remove - Remove furniture from room
  • POST /gamification/house/rooms/:roomType/upgrade - Apply room upgrade

Frontend Pages​

  • Character Page → House Tab (/gamification/character with tab=house)
  • Room Detail Page (/gamification/house/rooms/:roomType)