Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Taykl12/Classify/llms.txt

Use this file to discover all available pages before exploring further.

Classify supports biometric attendance through fingerprint sensors wired to the ESP32-C3 SuperMini. When a student places their finger on the sensor, the device reads a slot ID, posts it to the Classify API, and the backend resolves the slot to a student record and creates an attendance entry. This page covers supported sensors, the database mapping, and how enrollment and the full attendance flow work.

Supported sensors

Two sensors are officially supported. Choose based on the size of your student population:
SensorFingerprint capacityBest for
AS-608120 – 160 slotsClassrooms with up to ~100 students
R305Up to 1,000 slotsHigh-concurrency environments or large campuses
Both sensors communicate over UART (serial) and return a numeric slot ID when a finger is matched against their internal template database. The slot ID is the key data point that Classify uses to identify a student.
The current firmware (esp32/src/main.cpp) implements the button-press and heartbeat protocol. Full biometric fingerprint reading — initialising the sensor library, reading the slot ID on finger detection, and posting it to the API — requires wiring the sensor to the ESP32 and adding the corresponding sensor library and read logic to the firmware.

How the attendance flow works

The fingerprint flow reuses the existing button endpoint as the attendance trigger, substituting the physical button event with a sensor-matched slot ID.
1

Student places finger on sensor

The sensor scans the fingerprint and searches its internal template database for a match. If a match is found, it returns the enrolled slot number (for example, slot 42).
2

ESP32 posts to the button endpoint

The firmware sends the slot ID to the Classify API:
POST /api/device/esp32/button
X-Device-Token: <DEVICE_TOKEN>
The slot ID identifies which student triggered the event.
3

Backend resolves slot to student

The server looks up the usuarios table for a student whose huella_id equals the posted slot number:
SELECT * FROM usuarios WHERE huella_id = 42;
4

Attendance record created

On a successful match, the backend inserts a row into the asistencias table, recording the student’s attendance for that session.

Database mapping: usuarios.huella_id

Each student who uses biometric attendance must have their sensor slot number stored in the usuarios table.
ColumnTypeConstraintsDescription
huella_idINTNULL, UNIQUESensor slot number assigned to this student
Key rules enforced by the schema:
  • The field is nullable — students without a registered fingerprint simply have NULL.
  • The field is unique — each slot number can only be assigned to one student.
  • A CHECK constraint ensures only student-role records can have this field set; teacher and admin accounts must leave it NULL.

Enrolling a student’s fingerprint

Enrollment is a two-part process:
  1. Register the fingerprint on the sensor using the sensor’s enrollment flow (typically triggered via a separate tool or admin command). The sensor assigns a slot number.
  2. Store that slot number in the student’s usuarios record.
To set or update a student’s huella_id in the database:
-- Assign sensor slot 42 to the student with id = 7
UPDATE usuarios
SET    huella_id = 42
WHERE  id = 7;
To look up which student is registered to a given slot:
SELECT id, nombre, email, huella_id
FROM   usuarios
WHERE  huella_id = 42;
To list all students who have a fingerprint registered:
SELECT id, nombre, huella_id
FROM   usuarios
WHERE  huella_id IS NOT NULL
ORDER  BY huella_id;
Because huella_id has a UNIQUE constraint, attempting to assign a slot number that is already in use for another student will raise a database error. Always verify the slot is free before enrollment.

Sensor capacity guidance

For most single-classroom deployments, the AS-608 is sufficient and easier to source. If you are running Classify across multiple classrooms sharing one device, or expect more than 100 enrolled students, choose the R305 to avoid running out of slots.
The sensor slot capacity is independent of the number of students in the Classify database. The limit applies to the number of fingerprint templates stored on the sensor hardware itself:
  • AS-608 — 120–160 slots available for enrollment. Once full, new students cannot be enrolled until an existing template is deleted from the sensor.
  • R305 — up to 1,000 slots. Suitable for institution-wide deployments where many students share a single sensor.

Wiring the sensor to the ESP32-C3 SuperMini

Both the AS-608 and R305 use a standard UART interface. Connect them to any free UART-capable GPIO pair on the ESP32-C3 SuperMini. Refer to the sensor’s datasheet for its TX/RX pin assignments and ensure both devices share a common ground. After wiring, add the appropriate Arduino sensor library (for example, Adafruit Fingerprint Sensor Library for AS-608/R305-compatible modules) to your PlatformIO platformio.ini or Arduino IDE library manager, then implement the finger-read loop in esp32/src/main.cpp to capture the slot ID and post it alongside the button event.

Build docs developers (and LLMs) love