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

# Quickstart

> Start monitoring websites in under 5 minutes

## Setup your development environment

Learn how to set up your local development environment for hans.ai.

### Prerequisites

Before you begin, make sure you have the following installed:

* Node.js 22.0 or later
* Yarn package manager
* PostgreSQL database

## Installation

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/your-org/notify-me.git
    cd notify-me
    ```
  </Step>

  <Step title="Install dependencies">`bash yarn install `</Step>

  <Step title="Set up environment variables">
    Create a `.env.local` file in the `apps/web` directory:

    ```bash theme={null}
    DATABASE_URL="postgresql://user:password@localhost:5432/notify_me"
    BETTER_AUTH_SECRET="your-secret-key"
    BETTER_AUTH_URL="http://localhost:3010"
    RESEND_API_KEY="your-resend-api-key"
    OPENAI_API_KEY="your-openai-api-key"
    ```
  </Step>

  <Step title="Set up the database">`bash yarn db:migrate yarn db:seed `</Step>

  <Step title="Start the development server">
    ```bash theme={null}
    yarn dev
    ```

    Your app should now be running on [http://localhost:3010](http://localhost:3010).
  </Step>
</Steps>

## Create your first notification task

Once your development environment is set up, you can create your first notification task:

<CodeGroup>
  ```javascript API theme={null}
  const response = await fetch('http://localhost:3010/api/notifications', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer YOUR_API_TOKEN',
    },
    body: JSON.stringify({
      name: 'Price Monitor',
      description: 'Monitor product price changes',
      url: 'https://example.com/product',
      evaluationFunction: `
        const price = document.querySelector('.price').textContent;
        const numericPrice = parseFloat(price.replace('$', ''));
        return numericPrice < 100;
      `,
      actions: [
        {
          type: 'email',
          config: {
            to: 'user@example.com',
            subject: 'Price Alert!',
          },
        },
      ],
    }),
  });
  ```

  ```bash cURL theme={null}
  curl -X POST http://localhost:3010/api/notifications \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -d '{
      "name": "Price Monitor",
      "description": "Monitor product price changes",
      "url": "https://example.com/product",
      "evaluationFunction": "const price = document.querySelector(\".price\").textContent; const numericPrice = parseFloat(price.replace(\"$\", \"\")); return numericPrice < 100;",
      "actions": [{
        "type": "email",
        "config": {
          "to": "user@example.com",
          "subject": "Price Alert!"
        }
      }]
    }'
  ```
</CodeGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Learn about Notifications" icon="bell" href="/essentials/notifications">
    Understand how notification tasks work
  </Card>

  <Card title="Configure Actions" icon="gear" href="/essentials/actions">
    Set up email, webhook, and custom actions
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the complete API documentation
  </Card>

  <Card title="Best Practices" icon="lightbulb" href="/essentials/best-practices">
    Learn tips for effective monitoring
  </Card>
</CardGroup>
