InterruptIQ is an intelligent, context-aware cognitive attention gateway. Rather than acting as a static notification blocker, it operates as a context-aware gateway calculating real-time cognitive budgets, delivery options, and notification categories.
- Real-time Context Tracking: Continuously aggregates system, activity, focus, and battery signals.
- Deterministic Rules Engine: Executes priority classification and context threshold matching.
- Semantic Retrieval Engine: Connects historical decisions to direct local embedding matches (BGE-small-en-v1.5).
- LLM Critic review: Headless critic evaluating decisions against historical memory records and user overrides.
- Web Simulator Dashboard: Real-time developer control panel to customize context, inject events, and inspect outputs.
The system is split into three main components:
- API Monolith Gateway: Powered by Fastify, Zod, and PostgreSQL/Prisma.
- Local Embedding Engine: Powered by ONNX Runtime / Transformers.js to execute local embeddings calculations offline.
- AI Simulator Dashboard: Powered by React, Vite, and TailwindCSS.
graph TD
A[Incoming Notifications] --> B(Ingestion Engine)
B --> C{Decision Pipeline v1}
C -->|Active Context Snapshot| D[Rules Evaluator]
C -->|Semantic Memory Matcher| E[Embedding Retrieval Engine]
C -->|Decision Output| F[Ingested memory Indexer]
F --> G[LLM Critic Evaluator]
G --> H[Suggested Rules Recommendations]
├── apps
│ ├── api # Fastify TypeScript service
│ └── web # React simulator application
├── packages
│ ├── embedding-engine # Local vector embedding generator (ONNX)
│ ├── ai-core # Rules definitions
│ ├── shared # Shared types and constants
│ └── ui # UI components
├── docs # System design specifications
└── docker-compose.yml
- Backend: Node.js, Fastify, TypeScript, Prisma, Vitest.
- Database: PostgreSQL.
- Embeddings: ONNX Runtime, Transformers.js (MiniLM / BGE-small).
- Frontend: React, Vite, TailwindCSS, Zustand, Framer Motion.
Clone the repository and install all workspace dependencies:
pnpm installConfigure your environment variables by copying .env.example to .env:
cp .env.example .envApply database migrations:
pnpm --filter @interrupt-iq/api prisma db pushpnpm run devpnpm run build
pnpm startpnpm run testBuild and launch the complete stack containing Postgres, API, and Web client:
docker-compose up --buildFor production environments, stack overrides can be run via:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dApply database migrations:
pnpm --filter @interrupt-iq/api prisma migrate deployapps/api: Fastify framework hosting context snapshots, event ingestion pipelines, decision history, and critic evaluations endpoints.apps/web: React, Vite, Tailwind CSS interface providing operator control sliders, telemetry views, and feedback panels.packages/embedding-engine: Local vector space calculator hosting transformers ONNX engines with memory-safe LRU eviction limits.
- Spin up local database:
docker-compose up -d postgres
- Execute type checking:
pnpm run typecheck
- Execute test runners:
pnpm run test
- Configure Production env: Copy
.env.exampleto production.envand override:DATABASE_URLpointing to production cluster.JWT_SECRETconfigured with secure cryptograph hashes.ALLOWED_ORIGINSlocked down to client hosts.
- Launch via compose:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
To introduce database model changes:
- Update models in
apps/api/prisma/schema.prisma. - Generate migration SQL file (non-interactive):
npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > prisma/migrations/<timestamp>_<name>/migration.sql
- Mark migration as applied in development:
npx prisma migrate resolve --applied <timestamp>_<name>
- Deploy migrations in production pipelines:
npx prisma migrate deploy
Once the backend starts, Swagger interactive documentation is exposed at:
- Interactive spec: http://localhost:3001/documentation
- v1.1.0: Real-time push notification adapters (Slack / Email webhooks).
- v1.2.0: Multi-agent LLM selector and local LLM fine-tuning loops.
- v2.0.0: On-device context aggregation and native iOS/Android clients.