Phase 4 - Platform Deployment

holonicweb2
Auth & User Permissions

User Authentication & Permissions Strategy

🔐 Current Decision: Auth Deferred, Structure Future-Proofed

Status:
Not yet implementing login, roles, or permission logic.
All modules remain read-only or seeded by admin for MVP testing and investor demos.

🔍 Why Auth Is Deferred at MVP Stage

Accelerated Development: No login overhead means faster iteration.
Flexible Simulation: Holon behavior and proposals can be simulated manually without real users.
Frictionless Demo: Investors or collaborators can instantly access the platform.
Avoids Premature Complexity: Permissions logic is unnecessary until governance flows are validated.

🧱 Future-Proofing the Stack (Now)

While auth is not yet live, we are structuring the backend and UI for easy activation:
Tables already include tenant_id, user_id, holon_id fields
Row-Level Security (RLS) rules scoped to:
auth.uid()
tenant_id
holon_membership
UI Architecture: Designed to switch from manual holon selection → login-based auto-context
MVP Setup Overview
Area
MVP Setup
Ready for Later
Auth
Disabled / Open Access
Supabase Auth (email OTP, magic link)
User Roles
Hardcoded simulated views
Role-linked to auth.uid()
Permissions
Not enforced
RLS policies by tenant_id + holon_id
UI Session Logic
Manual holon/org selector
Auto-select via login context
There are no rows in this table

🔄 Auth Activation Plan (When Ready)

Enable Supabase Auth: Email-based sign-in or magic link
Assign Roles to Users: Add role field to users or holon_members tables
Activate RLS Policies: Based on:
auth.uid()
tenant_id
role = 'admin' | 'member' | 'coordinator'
Switch UI Context Logic: Auto-load data by user’s org + holon membership

🌐 Supabase Policy Example

CREATE POLICY "Users see only their own tenant's holons"
ON holons
FOR SELECT
USING (
auth.uid() = user_id AND tenant_id = current_setting('app.tenant_id')
);

🧠 Optional Next Steps

Would you like to:
Mock up a future user auth + roles data model?
Scaffold UI logic for login and contextual dashboards?
Defer until simulation governance is finalized?
This page will remain a living reference as we evolve toward full interactive governance.

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.