# ANRI Risk Intelligence

> A prototype Spead AI built to take part in a procurement process of ANRI, the National Archives of Indonesia: RFID tracking of archive records, explained risk alerts, internet policy checks and a signed audit trail, on simulated data.

An archive keeps public, restricted and secret records in rooms with different security levels. Someone has to know where a sensitive record is, whether its last move was normal, and whether the log of who did what can still be trusted months later. I built this prototype in three days to show ANRI what a risk view over its archive could look like, with every number simulated.

- Every alert carries a risk score and the factors behind it in plain language, from rules an auditor can read instead of a black box.
- Audit entries are signed with HMAC-SHA256 and chained to the entry before them, so changing or deleting an old entry breaks the chain.
- Executives, security staff and compliance officers each get a dashboard built around their own questions.

- 3 days to build the core prototype, Jan 2026
- 6 user roles with their own access
- 3 dashboards: executive, security, compliance

- Role: Founder and Lead AI Engineer
- Company: Spead AI
- Period: Jan 2026
- Stack: Next.js 16, React 19, TypeScript, Prisma, MySQL 8, ApexCharts, Docker

## Why this prototype exists

Arsip Nasional Republik Indonesia (ANRI), the national archives, holds records of different classifications in rooms with different security levels. In January 2026 Spead AI took part in an ANRI procurement process, and I built this prototype for it: a working picture of how an archive could watch its physical records, its staff's internet use and its own audit log from one place.

**Simulated data, not an ANRI system**
Every record, movement, alert, score and violation in the screens below comes from the prototype's own seed script. Before the screenshots were taken, people were renamed to role labels and document titles were replaced with neutral archive titles. This is a prototype made for a procurement process, not an official ANRI system.

The prototype is built around four questions an archive has to be able to answer at any moment, and it gives each of them a screen.

*Four questions and where the prototype answers them*

| Question | Where it is answered |
| --- | --- |
| Where is this sensitive record right now? | Document tracking: RFID tag, classification, current zone and movement history |
| Was that movement unusual, and why? | Alerts with a risk score, an explanation and the contributing factors, plus incident replay |
| Did staff follow internet and access policies? | Policy engine, violations log and behavioural analytics |
| Can the audit trail still be trusted later? | Signed, hash-chained audit entries with a chain check |

## Six roles, three dashboards

Each role has its own permission set, defined in one place and checked when a page opens. Executives, IT security and compliance officers each land on a dashboard of their own, and a banner on every page marks the demo mode and the simulated data.

*Who does what in the prototype*

| Role | What they do |
| --- | --- |
| Executive | Reads the overall risk posture, the 30 day risk trend, open alerts and compliance indicators on one page |
| IT security | Works the alert matrix, reviews and replays incidents, manages policy rules and isolates devices |
| Compliance officer | Follows regulations, audit schedules and pending actions, and reviews the audit trail and violations |
| Archivist | Tracks records, their zones and movement history, and requests approval to move restricted or secret records |
| Auditor | Reads documents, alerts, policies and the audit trail, and exports audit data |
| System admin | Manages users, zones and settings, and can open every dashboard |

## From a moved record to an executive report

**One movement through the prototype** (Every step is logged, and approvals and sign-ins write signed audit entries.)
1. Move: A tagged record leaves one zone for another
2. Read: An RFID reader in the zone logs time and place
3. Score: Rules give a risk score with the reasons attached
4. Review: IT security opens the alert and replays the moves
5. Approve: Planned moves of secret records go step by step
6. Report: Risk posture rolls up to the executive overview

Six alert types are modelled: **unauthorised zone, after-hours access, unusual frequency, pattern deviation, classification mismatch and rapid movement**. Each alert stores its severity, its risk score, a sentence that explains it and the factors that added to the score, so the person reviewing it can see why it was raised before deciding what to do.

## Inside the prototype

**Dashboards**
The executive overview puts six indicators, the overall risk gauge and a 30 day risk trend on one page. Overall risk is split into document risk, digital activity risk and compliance risk, so an executive sees where the number comes from.

*Executive overview: indicators, the overall risk gauge and the 30 day trend, all simulated.*

**Documents**
Every record has an RFID tag, a classification and a current zone. The list filters by classification and zone and shows the last movement and a risk score; each record opens to a movement history with the readers that saw it and the alerts it raised.

*Document tracking: RFID tags, classifications, current zones and risk scores.*

**Alerts**
An alert opens to the record, its classification, the route between zones, the risk score and the explanation. An incident can be replayed on the zone map, step forward or back, at half to double speed.

*Alert detail: the record, its route, the risk score and the explanation behind it.*

**Zones**
Zones have a security level, readers and a document count, and each can be put into lockdown. Moving restricted or secret records, entering a high security zone or asking for a policy exception goes through an approval request with priority, levels and status.

*Zone management: a high security archive room with its readers, documents and alerts.*

**Internet policy**
The second use case watches staff internet use. Rules match domains by pattern and category and carry an action, from logging only to isolating a device. A simulator tests any address against the active rules before a rule goes live.

*Policy engine: the simulator shows which active rule would block a test address.*

## An audit trail you can check

For an archive, the log of who did what matters as much as the records themselves. In the prototype, every audit entry is signed and linked to the one before it.

*Audit trail with a signature per entry; detail and address columns blurred.*

1. **Read** the signature and time of the latest entry.
1. **Hash** them into the new entry's link to the past.
1. **Sign** the new entry with HMAC-SHA256.
1. **Verify** at any time: one button recomputes every link and reports entries that do not match.

## How it is built

- One app, one image: A single Next.js 16 app holds the screens and 28 API route handlers, packaged as one Docker image that runs as a non-root user with a health check.
- 23 data models: Zones, readers, records, movements, baselines, alerts, policies, approvals and the audit log, in MySQL through Prisma.
- Rules with capped weights: Each check adds at most a fixed share to the score: after hours 30%, unauthorised zone 40%, frequency 20%, rapid moves 30%.
- Sessions on the server: Passwords are hashed with bcrypt; sessions last eight hours in an httpOnly cookie and are also stored in the database, so signing out ends them.
- An assistant with live counts: Ask ANRI answers questions about alerts, records, violations and compliance using current counts from the database.
- Explained, not trained: Rules instead of a trained model, so every score can be explained factor by factor and the prototype works without training data.

To be clear about what a three-day prototype is: the alerts, scores and violations on screen come from the seed data. The scoring rules, the per-record baselines and the policy engine are written in the code base, ready to be run on live movements once real RFID readers and network logs are connected. The audit signer is already wired, so sign-ins, sign-outs and approvals write signed entries today.

**At a glance**
- Built by: Spead AI, for an ANRI procurement process
- Build time: 3 days, January 2026
- Data: Simulated, not an ANRI system
- Roles: 6
- Dashboards: Executive, security, compliance
- Alert types: 6
- Data models: 23

**Need to show a client what is possible before a tender?** I build working prototypes that make a proposal concrete, with honest labels on what is simulated.

Source: https://nugrahalabib.com/work/anri-risk-intelligence
Author: Nugraha Labib Mujaddid (https://nugrahalabib.com)
Published: 2026-11-27. Updated: 2026-11-27.
