> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uno.engineering/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an account

> Sign up for Uno and receive your first workspace

Uno uses Supabase Auth for identity. When you create an account, Uno provisions your profile and, after your email is confirmed, creates a personal workspace you can operate immediately.

## Create an account in the web app

<Steps>
  <Step title="Open the sign-in page">
    Go to `/login` in the Uno web app.

    | Environment | URL                                  |
    | ----------- | ------------------------------------ |
    | Local       | `http://127.0.0.1:5173/login`        |
    | Production  | Your deployed Uno web URL + `/login` |
  </Step>

  <Step title="Switch to account creation">
    Select **Create an account** on the sign-in card.
  </Step>

  <Step title="Enter your details">
    Provide:

    * **Email address** — used for sign-in and account recovery
    * **Password** — at least 8 characters
    * **Display name** — optional; used for your profile and default workspace name
  </Step>

  <Step title="Submit the form">
    Select **Create account**. Uno registers the account through Supabase Auth.
  </Step>
</Steps>

## What happens after sign-up

When you create an account, Uno runs a short provisioning flow:

```mermaid theme={null}
flowchart TD
  SignUp["Create account"] --> AuthUser["Supabase Auth user"]
  AuthUser --> Profile["User profile row"]
  Profile --> Confirm{"Email confirmed?"}
  Confirm -->|No| Inbox["Confirm from inbox"]
  Confirm -->|Yes| Workspace["Personal workspace + owner membership"]
  Inbox --> Workspace
```

1. **Auth user** — Supabase creates the authenticated identity.
2. **Profile** — a database trigger creates `user_profiles` from your display name metadata.
3. **Email confirmation** — if your deployment requires confirmation, Uno shows a notice to check your inbox before you can sign in.
4. **Personal workspace** — after confirmation, Uno creates one workspace owned by you and adds you as the owner member.

Unconfirmed sign-ups do not receive workspace data. This keeps tenant data tied to verified identities.

## Sign in after confirmation

Return to `/login`, choose **Sign in**, and enter the same email and password. After authentication succeeds, Uno routes you into the application and your workspace list.

## Create an account through the API

The backend also exposes a sign-up endpoint for programmatic onboarding:

```bash theme={null}
curl -X POST http://127.0.0.1:3000/auth/sign-up \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@example.com",
    "password": "your-secure-password",
    "displayName": "Ada Lovelace"
  }'
```

The request body accepts:

| Field         | Required | Notes                                                         |
| ------------- | -------- | ------------------------------------------------------------- |
| `email`       | Yes      | Valid email address                                           |
| `password`    | Yes      | Minimum 8 characters                                          |
| `displayName` | No       | Stored in auth metadata and used for profile/workspace naming |

On success, the API returns the created user and session when your auth configuration issues one immediately.

## Local development behavior

For local development, start Supabase before attempting sign-up:

```bash theme={null}
pnpm db:start
pnpm dev
```

The local stack disables email confirmation so you can sign up and sign in immediately during development. The database verification script exercises the same sign-up, profile trigger, and workspace bootstrap path used in production.

<Note>
  Admin-web operators are provisioned separately. Product sign-up creates tenant-facing profiles and workspaces; admin identities do not receive automatic workspace creation.
</Note>

## Troubleshooting

| Issue                                     | What to check                                                                  |
| ----------------------------------------- | ------------------------------------------------------------------------------ |
| Configuration required on `/login`        | Run `pnpm db:start` so `apps/web/.env.local` is generated                      |
| Check your inbox message after sign-up    | Email confirmation is enabled in your deployment                               |
| Sign-in succeeds but no workspace appears | Confirm the account email and inspect workspace bootstrap triggers in Supabase |
| `auth_sign_up_failed` from the API        | Verify email format, password length, and Supabase Auth settings               |
