# Family Hub Naming Note

In the user interface, the active workspace is now shown as **Active Family Hub**. The backend still uses workspace IDs internally to preserve data isolation and compatibility.

# HomeSyncHub Multi-Workspace System

This build supports multiple private family workspaces inside one HomeSyncHub installation.

## Core isolation rule
Each workspace is its own private data scope. Calendar events, chores, rewards, lists, meal plans, custom menus, photos, settings, sync records, and activity history are stored against the active workspace ID. A normal family cannot see another family's workspace unless the account has joined that workspace using its join code.

## Roles

### Super Admin
Platform-wide control across every workspace. Super Admin can create workspaces, archive/restore workspaces, archive/restore users, archive/restore members/admins, switch into any active workspace, and recover soft-deleted data.

Bootstrap account:

```txt
Email: superadmin@homesynchub.local
Password: ChangeMe123!
```

Change this before public deployment.

### Admin
Workspace-level manager. Admin can manage members inside their active workspace, promote/demote Admin/Member roles in that workspace, archive/restore members in that workspace, manage workspace settings, and manage sync/reward/display settings.

### Member
Default role after registration. Member can use the app, manage normal content, join another workspace by code, switch between linked workspaces, and leave a workspace when it is not their last active workspace.

## Registration flow
New registration creates:

```txt
User account
Private workspace
Personal workspace join code
Default workspace role: Member
```

Joining another workspace later does not remove the user's original workspace.

## Join Workspace flow
A user enters a join code on the Workspaces page. The browser asks:

```txt
You are about to join a new workspace. Do you want to proceed?
```

If confirmed, the workspace is linked to the account and the original workspace remains available through the workspace switcher.

## Leave Workspace flow
Admin and Member accounts see Leave Workspace on the Workspaces page. The browser asks:

```txt
Are you sure you want to leave this workspace?
```

Safeguard: a user cannot leave their last active workspace.

## Delete and recovery system
Deletion is soft archive only. Archiving preserves all workspace data and allows recovery by Super Admin.

Soft archive covers:

```txt
Workspaces
Users
Workspace members
Workspace admins
Events
Chores
Rewards
Lists
Meals
Settings
Workspace history
```

## Notes
This is a PHP + JSON-storage PWA build. It is clean for local/XAMPP deployment and can later be upgraded to MySQL with the same workspace IDs and membership model.


## Family Hub Registration Update

This package includes the v6.2 Family Hub registration flow: create a new Family Hub or join an existing Family Hub during account setup, plus the profile-style Active Family Hub card and removal of the duplicate sidebar card.
