Stores the local userβs identity for BLE broadcast and UI display.
{
"id": "uuid", // Locally generated unique user ID
"name": "string",
"role": "string",
"company": "string",
"avatar_uri": "string (optional)",
"social_links": {
"linkedin": "string",
"twitter": "string",
"email": "string"
},
"interest_tags": ["string"], // Optional (v1.1+)
"qr_code": "string", // Base64 (v1.1+)
"last_updated": "timestamp"
}
Stores information about a nearby discovered device.
{
"peer_id": "uuid",
"name": "string",
"role": "string",
"company": "string",
"avatar_uri": "string",
"interest_tags": ["string"], // Optional (v1.1+)
"rssi": "number", // Signal strength for proximity estimation (v1.1+)
"discovered_at": "timestamp",
"expires_at": "timestamp",
"session_id": "uuid", // Link to discovery session
"contact_saved": "boolean"
}
Logs the ephemeral peer discovery session (optional for MVP, default to local only).
{
"session_id": "uuid",
"started_at": "timestamp",
"ended_at": "timestamp",
"mode": "string", // e.g. "default" | "event"
"room_code": "string", // v1.1+ Event Mode
"session_name": "string", // v1.1+ Event Mode
"peer_ids": ["uuid"]
}
Optional local history of people discovered.
{
"log_id": "uuid",
"peer_id": "uuid",
"session_id": "uuid",
"saved": "boolean", // Did user tap save?
"notes": "string", // Optional: custom notes or tags
"interaction_type": "string", // e.g. "viewed" | "saved" | "shared"
"timestamp": "timestamp"
}
Locally suggested openers based on tags or shared interests.
{
"starter_id": "uuid",
"context_tags": ["string"], // e.g. ["developer", "ai", "web3"]
"text": "string",
"displayed_count": "integer",
"created_at": "timestamp"
}
Local preferences for broadcast and scan behaviors.
{
"scan_interval": "integer", // in seconds
"advertising_enabled": "boolean",
"notifications_enabled": "boolean",
"auto_expire_timeout": "integer", // in minutes
"privacy_mode": "boolean",
"default_discovery_mode": "string" // e.g. "default" | "event"
}
- Use AsyncStorage or MMKV for high-performance local storage.
PeerDeviceandDiscoverySessioncan be cleared on app close or persisted short-term.UserProfileandSettingsshould be persistent across sessions.ConnectionLogcan be pruned periodically to save space.
Supabase JSON format:
{
"table": "user_profile",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "social_links", "type": "jsonb" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "qr_code", "type": "text" },
{ "name": "last_updated", "type": "timestamp with time zone" }
]
}
{
"table": "peer_device",
"columns": [
{ "name": "peer_id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "rssi", "type": "integer" },
{ "name": "discovered_at", "type": "timestamp with time zone" },
{ "name": "expires_at", "type": "timestamp with time zone" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "contact_saved", "type": "boolean" }
]
}
{
"table": "discovery_session",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "started_at", "type": "timestamp with time zone" },
{ "name": "ended_at", "type": "timestamp with time zone" },
{ "name": "mode", "type": "text" },
{ "name": "room_code", "type": "text" },
{ "name": "session_name", "type": "text" }
]
}
{
"table": "connection_log",
"columns": [
{ "name": "log_id", "type": "uuid", "primary_key": true },
{ "name": "peer_id", "type": "uuid", "references": "peer_device.peer_id" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "saved", "type": "boolean" },
{ "name": "notes", "type": "text" },
{ "name": "interaction_type", "type": "text" },
{ "name": "timestamp", "type": "timestamp with time zone" }
]
}
{
"table": "conversation_starter",
"columns": [
{ "name": "starter_id", "type": "uuid", "primary_key": true },
{ "name": "context_tags", "type": "text[]" },
{ "name": "text", "type": "text" },
{ "name": "displayed_count", "type": "integer" },
{ "name": "created_at", "type": "timestamp with time zone" }
]
}
{
"table": "settings",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "scan_interval", "type": "integer" },
{ "name": "advertising_enabled", "type": "boolean" },
{ "name": "notifications_enabled", "type": "boolean" },
{ "name": "auto_expire_timeout", "type": "integer" },
{ "name": "privacy_mode", "type": "boolean" },
{ "name": "default_discovery_mode", "type": "text" }
]
}
Would you like me to generate SQL import scripts for Supabase next?
Here is the BeaconAI Data Model in Supabase JSON format, designed to match your React Native app's local-first architecture, with Post-MVP stretch features included. This format can be directly used to set up tables in Supabase.
{
"table": "user_profile",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "social_links", "type": "jsonb" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "qr_code", "type": "text" },
{ "name": "last_updated", "type": "timestamp with time zone" }
]
}
{
"table": "peer_device",
"columns": [
{ "name": "peer_id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "rssi", "type": "integer" },
{ "name": "discovered_at", "type": "timestamp with time zone" },
{ "name": "expires_at", "type": "timestamp with time zone" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "contact_saved", "type": "boolean" }
]
}
{
"table": "discovery_session",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "started_at", "type": "timestamp with time zone" },
{ "name": "ended_at", "type": "timestamp with time zone" },
{ "name": "mode", "type": "text" },
{ "name": "room_code", "type": "text" },
{ "name": "session_name", "type": "text" }
]
}
{
"table": "connection_log",
"columns": [
{ "name": "log_id", "type": "uuid", "primary_key": true },
{ "name": "peer_id", "type": "uuid", "references": "peer_device.peer_id" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "saved", "type": "boolean" },
{ "name": "notes", "type": "text" },
{ "name": "interaction_type", "type": "text" },
{ "name": "timestamp", "type": "timestamp with time zone" }
]
}
{
"table": "conversation_starter",
"columns": [
{ "name": "starter_id", "type": "uuid", "primary_key": true },
{ "name": "context_tags", "type": "text[]" },
{ "name": "text", "type": "text" },
{ "name": "displayed_count", "type": "integer" },
{ "name": "created_at", "type": "timestamp with time zone" }
]
}
{
"table": "settings",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "scan_interval", "type": "integer" },
{ "name": "advertising_enabled", "type": "boolean" },
{ "name": "notifications_enabled", "type": "boolean" },
{ "name": "auto_expire_timeout", "type": "integer" },
{ "name": "privacy_mode", "type": "boolean" },
{ "name": "default_discovery_mode", "type": "text" }
]
}
Would you like me to generate SQL import scripts for Supabase next?
Here is the BeaconAI Data Model in Supabase JSON format, designed to match your React Native app's local-first architecture, with Post-MVP stretch features included. This format can be directly used to set up tables in Supabase.
{
"table": "user_profile",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "social_links", "type": "jsonb" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "qr_code", "type": "text" },
{ "name": "last_updated", "type": "timestamp with time zone" }
]
}
{
"table": "peer_device",
"columns": [
{ "name": "peer_id", "type": "uuid", "primary_key": true },
{ "name": "name", "type": "text" },
{ "name": "role", "type": "text" },
{ "name": "company", "type": "text" },
{ "name": "avatar_uri", "type": "text" },
{ "name": "interest_tags", "type": "text[]" },
{ "name": "rssi", "type": "integer" },
{ "name": "discovered_at", "type": "timestamp with time zone" },
{ "name": "expires_at", "type": "timestamp with time zone" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "contact_saved", "type": "boolean" }
]
}
{
"table": "discovery_session",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "started_at", "type": "timestamp with time zone" },
{ "name": "ended_at", "type": "timestamp with time zone" },
{ "name": "mode", "type": "text" },
{ "name": "room_code", "type": "text" },
{ "name": "session_name", "type": "text" }
]
}
{
"table": "connection_log",
"columns": [
{ "name": "log_id", "type": "uuid", "primary_key": true },
{ "name": "peer_id", "type": "uuid", "references": "peer_device.peer_id" },
{ "name": "session_id", "type": "uuid", "references": "discovery_session.id" },
{ "name": "saved", "type": "boolean" },
{ "name": "notes", "type": "text" },
{ "name": "interaction_type", "type": "text" },
{ "name": "timestamp", "type": "timestamp with time zone" }
]
}
{
"table": "conversation_starter",
"columns": [
{ "name": "starter_id", "type": "uuid", "primary_key": true },
{ "name": "context_tags", "type": "text[]" },
{ "name": "text", "type": "text" },
{ "name": "displayed_count", "type": "integer" },
{ "name": "created_at", "type": "timestamp with time zone" }
]
}
{
"table": "settings",
"columns": [
{ "name": "id", "type": "uuid", "primary_key": true },
{ "name": "scan_interval", "type": "integer" },
{ "name": "advertising_enabled", "type": "boolean" },
{ "name": "notifications_enabled", "type": "boolean" },
{ "name": "auto_expire_timeout", "type": "integer" },
{ "name": "privacy_mode", "type": "boolean" },
{ "name": "default_discovery_mode", "type": "text" }
]
}