Skip to content

Project Architecture Overview

Project Architecture Overview

This section introduces the Asset Tracking project, which uses RFID technology combined with an ESP32 microcontroller to create a check-in/check-out system for personnel and asset management. Learning this section will enable you to:

  • Understand the overall architecture of the RFID-based tracking system
  • Identify the key hardware and software components involved
  • Describe the data flow from RFID scan to database recording
  • Recognize the buyer scenarios this project addresses on Alibaba.com

Before starting this section, ensure you are familiar with:

  • Basic ESP32 capabilities (see Chapter 01)
  • MQTT protocol fundamentals (see Chapter 06)
  • Node-RED basic concepts (see Chapter 09)
  • Docker container basics (see Chapter 07)

International buyers on Alibaba.com who need:

  • Factory attendance tracking: Record employee check-in/check-out times
  • Tool and asset management: Track借用/归还 of equipment, tools, or assets
  • Inventory entry/exit recording: Log items entering or leaving a warehouse
  • Work order tracking: Associate worker time with specific production orders
Pain PointHow This Solution Addresses
Manual time tracking is error-proneRFID scan provides automated, accurate recording
Paper-based records are hard to analyzeDigital records enable reporting and analytics
Tool loss due to poor trackingEach scan logs who has which asset and when
Difficult to calculate labor costsTime entries are automatically linked to projects
┌─────────────────────────────────────────────────────────┐
│ Asset Tracking System │
├─────────────────────────────────────────────────────────┤
│ │
│ [RFID Tags] ──→ [RC522 Reader] ──→ [ESP32] │
│ ↑ │ │
│ │ │ MQTT/HTTP │
│ │ ↓ │
│ │ [WiFi Network] │
│ │ │ │
│ │ │ │
│ ┌────┴────────────────────────────────────┴──────┐ │
│ │ Server Stack (Docker) │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │ │
│ │ │ TimeTagger│ │ Node-RED │ │ Database │ │ │
│ │ │ (REST API)│←─│ (Flow) │←─│ (JSON File) │ │ │
│ │ └──────────┘ └──────────┘ └──────────────┘ │ │
│ └────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
ComponentRoleTechnical Notes
RFID TagsUnique identifiers for personnel/assetsPassive tags, 13.56MHz (HF), no battery needed
RC522 ReaderReads RFID tag UIDSPI interface, 3.3V only, ~3-5cm read range
ESP32Main controllerWiFi + MQTT, reads tag, controls LEDs
TimeTaggerTime tracking softwareOpen source, REST API, Docker container
Node-REDFlow automationOrchestrates MQTT/HTTP communication
File-based storageLocal check-in stateJSON flat file on server
1. User taps RFID tag on reader
2. ESP32 reads tag UID via RC522 (SPI)
3. ESP32 publishes UID to MQTT topic
4. Node-RED receives MQTT message
5. Node-RED checks if check-in file exists on server
6. If file does NOT exist → This is a CHECK-IN
7. Node-RED creates JSON file with start timestamp
8. ESP32 turns on GREEN LED to indicate success
1. Same user taps RFID tag again
2. ESP32 reads same UID via RC522
3. ESP32 publishes UID to MQTT topic
4. Node-RED receives MQTT message
5. Node-RED checks if check-in file exists
6. If file EXISTS → This is a CHECK-OUT
7. Node-RED reads the file, adds end timestamp
8. Node-RED sends complete record to TimeTagger API via HTTP POST
9. Node-RED deletes the local file
10. ESP32 turns on RED LED to indicate completion
┌──────────┐
│ IDLE │
│ (Waiting)│
└────┬─────┘
┌──────▼──────┐
│ Tag Detected │
└──────┬──────┘
┌──────▼──────┐
NO │ File Exists?│ YES
┌────────┤ on Server ├────────┐
│ └─────────────┘ │
▼ ▼
┌──────────┐ ┌──────────┐
│ CHECK-IN │ │ CHECK-OUT│
│ Create │ │ Read File│
│ JSON File│ │ POST API │
└────┬─────┘ │ Delete │
│ │ File │
│ └────┬─────┘
│ │
└──────────┬─────────────────┘
┌──────────┐
│ DONE │
│ (LED FB) │
└──────────┘
DecisionChoiceRationale
RFID Frequency13.56 MHz (HF)Good balance of read range and tag cost; works for proximity tracking
Reader ModuleRC522Widely available, low cost (~$2), Arduino library support
Data StorageFlat file on serverSimple, no database dependency; TimeTagger as final record
Server CommunicationMQTT + HTTPMQTT for real-time events; HTTP REST for TimeTagger API
State PersistenceJSON file Node-REDSurvives server restarts; easy to inspect and debug

This chapter is organized into the following sections:

SectionTopicFocus
05-02RFID Reader Hardware SetupWiring the RC522 module to ESP32
05-03RC522 Module IntegrationLibrary setup and SPI configuration
05-04RFID Tag UID ReadingReading and validating tag identifiers
05-05TimeTagger Open Source SoftwareInstalling and configuring TimeTagger
05-06REST API AuthenticationObtaining and using API tokens
05-07HTTP POST Request ImplementationBuilding and sending POST requests
05-08Check-In API IntegrationFull check-in/check-out flow
05-09State Management LogicFile-based state tracking
05-10LED Status IndicatorsVisual feedback for operations
05-11Technical Capability AssessmentEvaluating solution boundaries
05-12Customization PossibilitiesAdapting to different buyer needs

After completing this chapter, you should be able to:

  • Explain the complete check-in/check-out flow to a buyer
  • Identify the role of each component in the architecture
  • Describe how RFID-based tracking solves factory attendance requirements
  • Understand the difference between check-in and check-out state management

Key takeaways:

  1. System architecture: RFID tags → RC522 → ESP32 → MQTT → Node-RED → TimeTagger
  2. Two-phase flow: Check-in (create file) and Check-out (send to API + delete file)
  3. State management: File existence on server determines check-in vs check-out behavior
  4. Buyer alignment: Solves factory attendance, tool tracking, and asset management needs

Writing Date: 2026-05-17
Based on Source File: 校正版/10 Time recording witht RFID und TimeTagger.md
Target Audience: Alibaba.com IoT Pre-sales Engineer
Status: ✅ Completed