Skip to content

EV ID.

A structured asset identification and tracking system. Unique ID-based system for tracking and managing asset lifecycle.

Client
Evrentek · self-initiated
Year
2025
Stack
Next.jsDatabase System
9f3c2e1a-4b7d-a0c1 → registered → serviced → transferred

The outcome

Before

Assets and their service history lived in different systems and manual logs — no single source of truth.

After

Every asset has one ID; a single scan shows its owner, status and full service history.

Under the hood

1 indexed queryLookup path per scan
Append-onlyHistory integrity
0 by designID collisions

01 / The Problem

Assets and service history are hard to track consistently. Different systems, manual logs, and no single source of truth lead to confusion and lost data.

02 / The Solution

EV ID provides unique ID-based tracking for assets. Every asset has a single identity. Service history, status, and operational data attach to that ID. Scalable data structure for growth.

What EV ID does

Unique ID tracking

Every asset has a persistent, searchable identity

Service history

Full lifecycle and maintenance records per asset

Scalable data structure

Designed for high volume and fast querying

How it flows

  1. Step 01

    Asset registered

    Unique ID assigned at creation

  2. Step 02

    Service events logged

    Each action attached to asset ID

  3. Step 03

    History queries

    Full lifecycle view per asset

  4. Step 04

    Reporting

    Aggregate views across assets

Architecture & Technical Design

The shape of the system

architecturetext
// Data model (simplified)
Asset
  id: UUID (unique, immutable)
  metadata: {...}
  serviceHistory: [...]
  status: enum

// Query pattern
getAssetById(id) → full lifecycle
getAssetsByStatus(status) → filtered list

Decisions

Key technical decisions

  1. 01

    UUID identity minted once, independent of every attribute

    Rejected: Serial-number keys · Composite natural keys

    Serial numbers get replaced with hardware, owners change, and labels wear out. Divorcing identity from attributes means the QR label never needs reprinting and history never fragments across "the same" asset.

  2. 02

    Append-only event log as the source of truth

    Rejected: Mutable current-state rows · Audit columns (updated_by, updated_at)

    Disputes like "who had this device in March?" are answered by replaying the log, not by digging through backups. Events are small, immutable, and cheap to store — the write path never contends with reads.

  3. 03

    Projection table refreshed in the same transaction

    Rejected: On-the-fly aggregation per query · Async projection worker

    At this scale, computing current state synchronously with the event insert keeps reads to one indexed lookup with zero staleness — without the operational cost of a separate projection pipeline.

Code

Real code patterns

Identity and events: the whole core model

The asset core is deliberately minimal — everything mutable is an event. New event types are added without migrating existing rows.

Identity and events: the whole core modeltypescript
interface Asset {
  id: string;          // UUID v4, immutable
  createdAt: string;
}

interface AssetEvent {
  assetId: string;     // FK -> Asset.id
  seq: number;         // monotonic per asset
  type: 'registered' | 'transferred' | 'serviced' | 'status_changed';
  payload: Record<string, unknown>;
  at: string;
}

Read model updated atomically with the event

Scanning a QR resolves the UUID to this projection row in a single indexed lookup; the full history stays one join away for audits.

Read model updated atomically with the eventsql
-- One row per asset, upserted in the same tx as the event insert
INSERT INTO asset_current (asset_id, owner_id, status, updated_at)
VALUES ($1, $2, $3, now())
ON CONFLICT (asset_id) DO UPDATE
  SET owner_id = EXCLUDED.owner_id,
      status = EXCLUDED.status,
      updated_at = EXCLUDED.updated_at;

Why It Matters

Assets become traceable and manageable at scale. Service history is never lost. Reporting and analytics built on solid data.

Next case study

Aurora Hub
→
Let's talk—Let's talk—Let's talk—Let's talk—

Work together

Need asset tracking at scaleLet's talk.

I can walk you through the data model — get in touch.