Docs/Database & Auth

Database & Authentication

Learn how Nirmaanly natively integrates secure Supabase authentication and orchestrates complex relational database schemas in seconds.

PostgreSQL Schema Definition

Every Nirmaanly App automatically orchestrates a serverless PostgreSQL database using Supabase under the hood. When you prompt Nirmaanly to 'build a user dashboard', the backend agent writes the exact schema definitions (Tables, RLS Policies, Foreign Keys) necessary to store that info.

Auto-migrated Schema Example
create table public.profiles (
  id uuid references auth.users not null primary key,
  updated_at timestamp with time zone,
  username text unique,
  full_name text,
  avatar_url text
);

-- Nirmaanly generated RLS
alter table public.profiles enable row level security;

Authentication & Security

Nirmaanly automatically provisions secure JWT-based auth flows via Next.js Middleware.`

Standard Providers

Magic Link, Email/Password, and automated Supabase auth logic components.

Row Level Security (RLS)

The agent intelligently applies strict RLS rules, protecting user rows from public crawling.

Middleware Route Protection

When you ask for a "Dashboard that requires login", Nirmaanly edits `middleware.ts` to automatically block all `/dashboard/*` requests without a valid session cookie.