Architecture in action

How NexInsights turns data into verified execution.

There’s no magic in between: every number has a calculation, every recommendation has a method, and every external action has a gate. This page explains how it works.

1. The state of operations in a snapshot

Everything shown in Mission Control comes from an operational snapshot calculated on the server from data for the active tenant: leads, pipeline stages, campaigns, signals, activities, approvals, agent runs, and daily metric points.

The snapshot provides a fixed set of KPIs — revenue over the last 30 days and change versus the previous 30 days, open pipeline, forecast weighted by stage probability, goal coverage, conversion, average deal size, CAC, LTV, stalled leads, connected integrations — along with short lists of risks, opportunities, priority leads, and recent activity.

Why this matters: the same source powers Mission Control, the executive view, revenue, and sales. There’s no “sales screen number” that differs from the “executive dashboard number.”

2. An explainable lead score, not a black box

The score ranges from 0 to 100 and is the sum of stated factors: contact seniority, ICP fit, intent signals (funding, hiring, expansion, technology changes), contact recency, deal size, and source history. Each factor shows its weight and evidence — for example, “Title: Sales Director — decision-maker” with +18.

When AI is enabled and permission is granted, the same lead can be rescored with a language model. The result still shows the factors and source used, and is recorded in the lead history. The deterministic engine is the default: if AI fails, the score doesn’t disappear.

What the score doesn’t do

It doesn’t make decisions on its own, send messages, or move the lead through the pipeline. Moving a lead to another stage is a human action, with an audit event and a recalculation of weighted value.

3. A forecast with a stated methodology

The forecast combines two things: realized revenue and pipeline weighted by the probability of each stage. The time-series projection uses a 14-day moving average with the trend from the last 4 weeks, and states the forecast horizon (21 days) and minimum sample size.

  • Conservative: only advanced stages close.
  • Expected: probability by pipeline stage.
  • Aggressive: all open pipeline closes.

All three scenarios appear together because a forecast without a range is a promise, not an estimate. Goal coverage is (realized + weighted) ÷ goal, and turns red when it falls below 60%.

Explicit limit: with fewer than 7 days of recorded revenue, the system reports “insufficient sample” and doesn’t project. It would rather acknowledge the gap than invent a line on the chart.

4. Execution Pipeline: from intent to outcome

Every action — from Copilot, an automation, or an approval — passes through ten steps before producing an external effect:

  1. Plan — what will be done, step by step.
  2. Policy — does the workspace allow this type of action?
  3. Permission — does the user have the resource:action permission?
  4. Approval — if the action affects the outside world, it goes into the human review queue.
  5. Idempotency — the same request is never executed twice.
  6. Tool — the tool runs with the tenant context.
  7. Verification — the result is checked (e.g., whether the campaign's status actually changed).
  8. Audit — the actor, action, entity, changes, and request ID are recorded.
  9. Event — the activity appears in the Workspace timeline.
  10. Outcome — the impact is measured and feeds learning.

If any step blocks the process, execution ends as BLOCKED with a clear reason — and this is shown in AI Operations, not hidden in a log.

5. Copilot with screen and operational context

Copilot receives the message, current route, Workspace snapshot, and user permissions. It responds with a declared type: factual answer, analysis, recommendation, forecast, plan, prepared action, or block. It also provides the evidence used (revenue, Pipeline, stalled leads, approvals) and, when available, sources from the Knowledge Center.

Action requests aren't executed directly: Copilot prepares the request and returns the path to the Approval Center. For example, if the user's role doesn't allow them to create a campaign, the response is an explicit block that explains what's missing and how to resolve it.

6. Company knowledge with citations

Workspace documents (policies, playbooks, FAQs, metric definitions) are split into passages and indexed. Search uses lexical BM25 with Portuguese normalization, returns the most relevant passages with their scores, and feeds them to Copilot.

The layer is abstracted: the index is rebuilt when a document changes, and the adapter can be switched to vector search (pgvector) without changing the product interface. This version doesn't use embeddings — and the product says so instead of pretending to understand semantics.

7. Multi-tenant architecture, roles, and segregation

The active tenant is resolved on the server from the header sent by the client and validated against the memberships table. If the user doesn't belong to the Workspace, the request is denied — the client never determines who can see what.

OWNER

Everything, including billing, members, and critical decisions.

ADMIN

Workspace management, integrations, and approvals.

OPERATOR

Manages leads, content, and automations; doesn't make decisions that require governance.

VIEWER

Read-only. Can't create content, move items through the Pipeline, or make decisions.

Beyond the role itself, there’s also the separation of duties rule: an approval request records who submitted it, and that person can’t approve their own request.

8. Stack and operations

Web application built with React 19 and Tailwind, with an Express server using tRPC and Drizzle on MySQL. Authentication via Manus OAuth. AI via the Manus gateway, with a model configurable by environment and a deterministic fallback when no model is available.

  • Public health check at /api/health for orchestrators.
  • AI usage logs for each call, with estimated cost and a plan-based quota.
  • Versioned migrations; managed database, with no writes outside the application.
  • For self-hosted installations, the package includes a Dockerfile, compose file, example environment variables, and a migration guide for PostgreSQL with RLS.

See the product in action →