Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/rag-knowledge-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ This architecture provides several key advantages for building document AI appli
- **Real-time Updates**: Webhook integration keeps documents synchronized

#### **🛡️ Production Ready**
- **Multi-tenant Security**: Row-level security ensures data isolation between users
- **Multi-tenant Security**: Every query is scoped to the signed-in user, and row-level security keeps the tables closed to direct database API access
- **Error Handling**: Comprehensive error management and retry logic
- **Monitoring**: Built-in logging and performance tracking

Expand Down Expand Up @@ -289,7 +289,7 @@ Requires `@stackone/ai` and `STACKONE_API_KEY`. The agent uses the first linked

1. In [StackOne Webhooks](https://app.stackone.com/webhooks), add a webhook and set the URL to your app (e.g. `https://your-ngrok-url.ngrok.io/api/stackone/webhook` for local dev).
2. Subscribe to **Documents > Files**: `documents_files.updated`, `documents_files.deleted` (and any account events you need). The app does not handle `documents_files.created`—users select which files to sync via the file picker.
3. Copy the **Signing secret** and set `STACKONE_WEBHOOK_SECRET` in `.env.local` so the app can verify `x-stackone-signature`.
3. Copy the **Signing secret** and set `STACKONE_WEBHOOK_SECRET` in `.env.local` so the app can verify `x-stackone-signature`. Without it the endpoint rejects every event.

For local development, use [ngrok](https://ngrok.com) (e.g. `ngrok http 3000`) and use the ngrok URL as the webhook URL in StackOne.

Expand Down
2 changes: 1 addition & 1 deletion apps/rag-knowledge-agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rag_agent
ports:
- "5433:5432" # host:container (use 5433 if 5432 is already in use)
- "127.0.0.1:5433:5432" # host:container (use 5433 if 5432 is already in use)
volumes:
- postgres_data:/var/lib/postgresql/data

Expand Down
7 changes: 4 additions & 3 deletions apps/rag-knowledge-agent/env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ STACKONE_API_KEY=your_stackone_api_key
# STACKONE_BASE_URL=https://api.stackone.com

# Webhook signing secret from StackOne dashboard (Webhooks > your webhook > Signing secret).
# If set, the app verifies x-stackone-signature (HMAC SHA256 base64url of body).
# Required for webhooks: without it the webhook endpoint rejects every event. The app
# verifies x-stackone-signature (HMAC SHA256 base64url of body).
# For local testing with ngrok: use the secret from StackOne and point the webhook URL to
# your ngrok URL, e.g. https://your-subdomain.ngrok.io/api/stackone/webhook
STACKONE_WEBHOOK_SECRET=

# =============================================================================
# NEXT.JS / NEXT-AUTH CONFIGURATION
# =============================================================================
# Generate a random secret for NextAuth
NEXTAUTH_SECRET=your_nextauth_secret_here
# Required. Generate one per installation: openssl rand -base64 32
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
APP_URL=http://localhost:3000

Expand Down
4 changes: 0 additions & 4 deletions apps/rag-knowledge-agent/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const nextConfig: NextConfig = {
exclude: ['error', 'warn']
} : false,
},
// Temporarily ignore TypeScript errors for build
typescript: {
ignoreBuildErrors: true,
},
};

export default nextConfig;
Loading