Introduction
What is this platform?
The Intecog Logistech IoT Device Monitoring Platform is a full-stack web application that collects sensor readings from IoT hardware devices and gives users a real-time view of their monitored environments.
The platform covers three primary sensor metrics:
| Metric | Description |
|---|---|
| Temperature | Ambient temperature of a zone |
| Humidity | Relative humidity of a zone |
| Voltage | Power/voltage reading from a device |
Core Concepts
Unit
A Unit represents a named monitoring zone such as "Cold Room A" or "Warehouse B". Each unit has configurable min/max thresholds for temperature, humidity, and voltage.
Device
A Device is the physical IoT hardware, identified by a unique code. A device is assigned to exactly one unit and one user. It sends periodic sensor readings to the backend via HTTP POST.
Live Alerts
When a device reading breaches a unit's threshold, the system computes live alerts on the spot and stores them on the unit document. No separate alerts collection is used — alert state is always current.
Recipients
Recipients are contacts (email or phone) that receive alert notifications via AWS SES when thresholds are breached. A user can have multiple recipients; each unit can have different email and SMS recipients configured.
Technology Stack
| Layer | Technology |
|---|---|
| Frontend | Vue 3, TypeScript, Vite, Element Plus, Pinia, Vue Router 4 |
| Backend | Node.js, Express.js, Mongoose, Babel, JWT |
| Database | MongoDB (via Mongoose) |
| Cloud | AWS SES (email), AWS S3 (storage), AWS Lambda (reports) |
| Shared | Zod schemas, TypeScript types |
| Tooling | Turborepo, pnpm workspaces, ESLint, TypeScript (composite) |
Repository Structure
This project is a Turborepo monorepo using pnpm workspaces:
my-app/ ← monorepo root
├── apps/
│ ├── frontend/ ← Vue 3 SPA (@my-app/frontend)
│ └── backend/ ← Express API (@my-app/backend)
├── packages/
│ ├── shared/ ← Zod schemas + TS types (@my-app/shared)
│ ├── ui/ ← Shared Vue component library (@my-app/ui)
│ └── config/ ← Shared ESLint + tsconfig (@my-app/config)
└── docs/ ← This documentation siteCross-Package Import Rules
✅ apps/frontend → packages/shared
✅ apps/backend → packages/shared
✅ apps/frontend → packages/ui
❌ apps/frontend → apps/backend (FORBIDDEN)
❌ apps/backend → apps/frontend (FORBIDDEN)Shared logic must live in a packages/ package — never cross-imported between apps.
Domain Model (Quick Reference)
User → owns → Unit → linked to → Device
│ │
│ ├─ SensorData (temperature, humidity, volt)
│ ├─ DiagnosticData (OS/SW/HW versions, logs)
│ └─ RawSensorData (raw IoT payload)
│
└─ notifies → Recipient (email/SMS contacts)