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

# API Reference

> React SDK components and hooks reference

## Overview

The Fortt React SDK provides components and hooks to integrate Fortt into your React or Next.js application. All backend API communication is handled automatically—you only need to work with the React components and hooks.

## Components

### `<ForttProvider />`

The main provider component that wraps your application and enables Fortt functionality. It automatically handles page view tracking and provides Fortt context to all child components.

#### Props

<ParamField body="projectId" type="string" required>
  Your unique Fortt project identifier. This is required to connect your
  application to your Fortt project. **Getting your projectId**: To start your
  trial and receive your `projectId`, contact
  [rafael@fortt.sh](mailto:rafael@fortt.sh). You'll receive your project
  identifier after starting your trial.
</ParamField>

<ParamField body="children" type="React.ReactNode" required>
  The child components that will have access to the Fortt context. Typically,
  this is your entire application or a portion that needs protection.
</ParamField>

<ParamField body="ignorePaths" type="string[]" required={false}>
  Array of path patterns to skip automatic verification on. Supports exact
  matches and wildcard patterns. When a page matches any pattern in this array,
  Fortt will not automatically send verification requests on page load.
  **Pattern Examples:** - `'/dashboard'` - Exact match for `/dashboard` -
  `'/admin/*'` - Matches `/admin` and all subpaths like `/admin/users`,
  `/admin/settings`, etc. This is useful for excluding internal pages, admin
  panels, or dashboard pages where you don't want automatic verification to
  occur.
</ParamField>

#### Example

```tsx theme={null}
import { ForttProvider } from 'fortt/react';

function App() {
  return (
    <ForttProvider projectId="your-project-id">
      {/* Your app components */}
    </ForttProvider>
  );
}
```

**Example with ignorePaths:**

```tsx theme={null}
import { ForttProvider } from 'fortt/react';

function App() {
  return (
    <ForttProvider
      projectId="your-project-id"
      ignorePaths={['/dashboard', '/admin/*', '/internal']}
    >
      {/* Your app components */}
    </ForttProvider>
  );
}
```

#### Behavior

When `ForttProvider` is mounted, it automatically:

* Initializes device fingerprinting
* Creates or retrieves visitor and session identifiers
* Sends verification requests on page load
* Manages all API communication in the background

All of this happens silently with zero visual impact on your users.

## Hooks

Additional hooks for protecting specific actions will be available soon. Currently, `ForttProvider` handles all verification automatically through page view tracking.

## Next Steps

* Check out the [quickstart guide](/quickstart) to integrate Fortt into your app
* Visit the [FAQ](/faq) for common questions about integration and usage
