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.
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
Clone the repository
git clone https://github.com/your-org/notify-me.git
cd notify-me
Install dependencies
bash yarn install
Set up environment variables
Create a .env.local file in the apps/web directory: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"
Set up the database
bash yarn db:migrate yarn db:seed
Start the development server
Create your first notification task
Once your development environment is set up, you can create your first notification task:
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: '[email protected]',
subject: 'Price Alert!',
},
},
],
}),
});
Next steps
Learn about Notifications
Understand how notification tasks work
Configure Actions
Set up email, webhook, and custom actions
API Reference
Explore the complete API documentation
Best Practices
Learn tips for effective monitoring