Product architecture

One record. Every team. Zero duplicate entry.

ShayanRoyal turns vehicle data into a single source of truth — searchable by sales, editable by supervisors, governed by managers. Below is how the system is built.

01 — Core flow

From arrival to handover

STEP 1
Vehicle arrives
Physical intake at lot
STEP 2
Photos captured
Edited + raw stored
STEP 3
Record created
Stock # auto-generated
STEP 4
Searchable
Sales discovers it instantly
STEP 5
Status updates
Reserved → Sold → Shipped
STEP 6
Dashboard live
Counts + value refresh
02 — Permission engine

Role-based access matrix

Sales
  • View vehicles
  • Search inventory
  • Open documents
  • Add / edit
  • See cost & margin
  • Manage team
Supervisor
  • View vehicles
  • Add / edit vehicles
  • See cost & margin
  • Export inventory
  • Delete vehicles
  • Manage team
Manager
  • Full vehicle control
  • Delete vehicles
  • Manage team & roles
  • Cost, margin & exports
  • Audit & overrides
  • Workspace settings
Rules engine logic
Each request is evaluated against a deterministic policy chain.
request → authenticated?
       ↓ yes
       role lookup  ──→  policy chain
         ├─ sales       → READ vehicles · READ docs
         ├─ supervisor  → READ + WRITE vehicles · READ cost · EXPORT
         └─ manager     → ALL + DELETE · MANAGE users · AUDIT
       ↓
       resource scope  ──→  field-level filters
         (cost & margin hidden from sales response payload)
       ↓
       audit log  ──→  immutable event stream
03 — Data model

Entities and relationships

Vehicle
  • stockNo (auto)
  • make, model, trim
  • spec + steering
  • price + cost*
  • status
  • photos[]
  • documents[]
User
  • name, email, phone
  • role (sales/sup/mgr)
  • avatar
  • joinedAt
Document
  • name, type
  • size
  • vehicleId →
Capability radar
04 — Platform

Stack at a glance

Frontend
React + TypeScript with type-safe routing and component-level caching.
State
Server-state cache with optimistic mutations and offline-safe queue.
Storage
Relational primary store with object storage for photos and documents.
Delivery
Edge-cached read APIs · zero-downtime deploys · regional failover.
Security
Role-based access, signed media URLs, immutable audit log.
Realtime
Push events for status changes, new arrivals, and team activity.
Analytics
Materialised views power dashboards without slowing transactional reads.
Reliability
99.95% SLO, automated backups, point-in-time recovery.

Ready to see it in action?

Jump into the workspace with a single click — pick a role and explore the live inventory.

Open the workspace