Skip to main content
InsightHub is a Next.js application. The fastest way to run it locally is Lite mode, which uses a built-in SQLite database and local credentials — no external services required beyond an Alquimia Runtime instance.

Prerequisites

  • Node.js 20+
  • A running Alquimia Runtime instance (its URL becomes ASSISTANT_BASEURL)

Lite mode (no database setup)

Lite mode replaces PostgreSQL with SQLite and Keycloak with local-credentials login. It is designed for development and demos — zero infrastructure besides Node.
1

Install dependencies

npm install
2

Configure your environment

cp .env.example .env.local
Open .env.local and set at minimum:
# Lite database — no PostgreSQL needed
DB_STRATEGY=lite
DATABASE_URL=file:.data/lite.db

# Lite auth — local credentials
AUTH_STRATEGY=lite
AUTH_LITE_USERS='[{"id":"1","name":"Admin","email":"admin@example.com","password":"changeme","role":"admin"}]'

# Alquimia Runtime
ASSISTANT_BASEURL=http://localhost:8080
ALQUIMIA_ASSISTANT_API_KEY=your-api-key

# NextAuth
NEXTAUTH_SECRET=a-random-secret-string
NEXTAUTH_URL=http://localhost:3000
3

Start the dev server

npm run dev
Open http://localhost:3000.
The SQLite database and tables are created automatically on first startup. You do not need to run migrations in Lite mode.

Production setup (PostgreSQL + Keycloak)

For production deployments with a real database and enterprise SSO:
1

Install dependencies

npm install
2

Configure your environment

Copy .env.example to .env.local. Set DB_STRATEGY=postgres with a valid DATABASE_URL, and AUTH_STRATEGY=keycloak with your Keycloak credentials.
3

Run database migrations

npm run db:deploy
4

Start the server

npm run build && npm run start

Key environment variables

VariableDescription
DB_STRATEGYpostgres (default) or lite (SQLite)
DATABASE_URLPostgreSQL connection string, or file:.data/lite.db for SQLite
AUTH_STRATEGYkeycloak or lite
NEXTAUTH_SECRETNextAuth signing secret
NEXTAUTH_URLApp base URL (e.g. http://localhost:3000)
ASSISTANT_BASEURLAlquimia Runtime base URL
ALQUIMIA_ASSISTANT_API_KEYAlquimia API key
AUTH_LITE_USERSJSON array of users (lite only)
AUTH_KEYCLOAK_IDKeycloak client ID (keycloak only)
AUTH_KEYCLOAK_SECRETKeycloak client secret (keycloak only)
AUTH_KEYCLOAK_ISSUERKeycloak issuer URL (keycloak only)
See .env.example for the full list, including optional observability variables.

Docker

If you prefer Docker:
docker build -t insight-hub .
docker run -p 3000:3000 --env-file .env.local insight-hub

Next steps

First steps

Log in and create your first topic.