An AI workforce console for Nexus Quantum Tech. The app is the orchestrator; RantAI Claw is the AI runtime (LLM, knowledge-base embeddings, and messaging channels). Next.js route handlers proxy to Claw server-side (BFF pattern).
The product is built around one connected chain:
Knowledge Base ──► AI Employee ──► Conversation ──► Channels & Integrations
(Claw RAG) (config+prompt) (inbox) (Web embed · Telegram)
The console covers a full AI-workforce surface, grouped like its navigation. Status: ✅ live · 🟡 in progress · ⬜ planned (scaffolded, no mock data).
Workforce
- ✅ Overview — command center: KPIs, AI employee status, conversation pipeline, live activity, needs-attention queue
- ✅ AI Employees — editable config (role, mission, reply guidelines, approval & escalation, autonomy, model), attach knowledge bases for RAG, live test chat against Claw, real resolution-rate metric
- 🟡 Conversations — inbox with search + status/lead filters, AI draft replies (Claw + KB), per-conversation AI enrichment (intent, sentiment, lead score, summary, suggested reply, escalation), assign-to-human / mark-resolved
- ⬜ Workspaces — segment employees, channels and campaigns by team or brand
Operations
- ⬜ Content Studio · ⬜ Social Publishing · ⬜ Market Intelligence · ⬜ Outreach · ⬜ Campaigns
Governance
- ✅ Knowledge Base — knowledge bases (groups), upload/ingest with categories, semantic (RAG) search with sources, edit (re-index) / delete / unlink — stored & embedded in Claw
- 🟡 Channels & Integrations — ✅ Web Chat embed: a Google-style widget any site drops in with one
<script>tag — streaming replies from the linked AI employee, conversations land in the inbox (see docs/web-embed.md); connect Telegram via Claw, detect connected channels - ⬜ Approvals — human-in-the-loop review queue
- ⬜ Analytics — productivity & performance per employee
Administration
- ⬜ Team & Roles · ⬜ Settings
Built feature-first, no mock data: live modules read real data from Postgres + Claw; planned modules are scaffolded and show empty / "coming" states until implemented.
- Next.js 16 (App Router, Turbopack) · React 19 · TypeScript
- Tailwind CSS v4 (via PostCSS)
- Bun (package manager + runtime)
- PostgreSQL + Prisma 6
- RantAI Claw (AI runtime: chat, KB embeddings, channels)
- Bun 1.3+
- Docker (for the local Postgres) — or your own Postgres
- A running RantAI Claw instance reachable at
CLAW_BASE_URL(with the KB feature + an embeddings provider enabled for Knowledge Base)
# 1. install dependencies
bun install
# 2. configure environment
cp .env.example .env # then edit values
# 3. start Postgres (docker) and apply the schema
bun run db:up
bunx prisma db push # sync schema to the database
bun run db:seed # seed the Customer Service AI employee
# 4. run the dev server
bun dev # http://localhost:3000Make sure your RantAI Claw instance is running and CLAW_BASE_URL points to it; otherwise Claw-backed features (KB, test chat, channels) fall back to an offline state.
See .env.example. Key ones:
| Variable | Description |
|---|---|
DATABASE_URL |
Postgres connection string (docker-compose exposes host port 5434) |
CLAW_BASE_URL |
Base URL of the RantAI Claw API (use 127.0.0.1, not localhost) |
CLAW_DEFAULT_MODEL |
Default model id used when an employee has none set |
| Script | Action |
|---|---|
bun dev |
Start the dev server |
bun run build |
Production build |
bun start |
Start the production server |
bun run lint |
ESLint |
bun run db:up |
Start the Postgres container |
bun run db:seed |
Seed the database |
bun run db:studio |
Open Prisma Studio |
- Web chat embed — drop the AI chat widget onto any website with one
<script>tag - Claw ↔ app relay — Hybrid Relay contract for external channels (planned)
src/
app/(console)/ routed pages (overview, employees, knowledge, conversations, channels, …)
app/api/ route handlers proxying to Claw + Prisma (BFF)
components/ views, AgentDrawer, sidebar/topbar, shared UI
lib/ claw client, prompt builder, conversation enrichment, prisma, employees, data/icons
prisma/ schema, seed, migrations
public/widget/ embeddable web chat widget (nq-widget.js)
design/ source UI mockup reference