
Rfid
LeafCodes/esp32s3-rfid-attendance
Local-First & Offline-Resilient RFID Attendance System built with ESP32-S3, PlatformIO, Custom KiCad PCB, and FastAPI Backend.

Local-First & Offline-Resilient RFID Attendance System built with ESP32-S3, PlatformIO, Custom KiCad PCB, and FastAPI Backend.
RFID is an open-source printed circuit board by LeafCodes, from the LeafCodes/esp32s3-rfid-attendance repository on GitHub. It is a 2-layer board with 28 parts on 54 nets.
It is built around the ESP32-S3-WROOM-1-N8, AMS1117 and BCV29, with the LESD5D5.0CT1G among its other parts. Its parts include 8 capacitors, 8 resistors, 5 connectors, 2 ICs and 2 transistors. It belongs with the radio and wireless boards and the ESP32 boards of this library.
Sistem Presensi RFID Mandiri Berbasis IoT & Local-First Architecture
Solusi presensi cerdas, hemat biaya, dan tahan kendala jaringan dengan integrasi end-to-end: Custom PCB (KiCad) + Embedded C++ (ESP32-S3) + Modern Web Backend (FastAPI & SQLite).
Banyak institusi, sekolah, laboratorium, maupun startup menghadapi berbagai kendala dalam pencatatan kehadiran:
Proyek ini menghadirkan arsitektur presensi lokal-mandiri (Local-First & Offline-Resilient) yang andal dan mudah dioperasikan tanpa ketergantungan pada internet publik:
absensi-pc.local). Pengguna tidak perlu mengubah kode atau mengatur IP statis saat berganti router..xlsx) siap olah.Berikut adalah gambaran interaksi antara komponen perangkat keras dan aplikasi server:
flowchart LR
subgraph EdgeDevice[" Perangkat Keras (Edge Device) "]
RFID["RFID MFRC522\n(13.56MHz SPI)"] --> ESP["ESP32-S3 MCU\n(Dual-Core Xtensa)"]
ESP --> LCD["LCD 16x2 I2C\n(Visual Info)"]
ESP --> BUZZ["Buzzer & LED\n(Audio-Visual Status)"]
ESP -. Buffer Luring .-> FS["Internal Flash / EEPROM\n(Offline Buffer & Card DB)"]
end
subgraph LocalNetwork[" Jaringan Area Lokal (WiFi / LAN) "]
ESP -- "mDNS Service Discovery" --- MDNS["Resolusi: absensi-pc.local"]
ESP -- "REST API (JSON / HTTP)" --- API["POST /api/attendance\nGET /api/cards"]
end
subgraph HostPC[" Server Lokal (PC / Mini PC) "]
API --> FastAPI["FastAPI Backend Server\n(Uvicorn ASGI Engine)"]
FastAPI --> SQLite[("SQLite Database\n(Cards, Logs, Settings)")]
FastAPI --> WebUI["Web Dashboard & Reports\n(Jinja2 + Tailwind)"]
FastAPI --> Excel["Export Engine\n(OpenPyXL .xlsx)"]
end📖 Pelajari detail alur sistem & flowchart lengkap: docs/architecture_flowchart.md
IN (Masuk) atau OUT (Keluar).wifi_manager, rfid_handler, pc_client, offline_buffer, lcd_display, led_buzzer).| Komponen | Spesifikasi / Tipe | Fungsi |
|---|---|---|
| Microcontroller | ESP32-S3 DevKitC-1 (WiFi + BLE) | Pemroses utama, konektivitas, buffer memori |
| RFID Reader | MFRC522 (13.56 MHz, SPI Interface) | Pembaca kartu RFID MIFARE |
| Display | LCD 16x2 Karakter dengan I2C Backpack | Penampil jam, sapaan nama, dan status |
| Audio-Visual | Active Buzzer 5V, LED Hijau, LED Merah | Indikator status sukses / ditolak |
| Kartu/Tag | MIFARE Classic 1K Card / Keyfob | Identitas pengguna / karyawan |
| Catu Daya | 5V DC (USB-C atau Adaptor 5V 1A) | Sumber daya sistem |
Pastikan Anda telah memasang PlatformIO Core / IDE.
# Masuk ke direktori firmware
cd firmware
# Compile dan upload ke board ESP32-S3
pio run -t upload
# Buka Serial Monitor untuk memantau proses boot
pio device monitorBuka terminal baru di komputer yang terhubung ke jaringan WiFi/LAN yang sama:
# Masuk ke direktori pc-app
cd pc-app
# Buat virtual environment (opsional namun disarankan)
python -m venv venv
# Windows:
venv\Scripts\activate
# Linux/macOS:
# source venv/bin/activate
# Install dependensi
pip install -r requirements.txt
# Jalankan server FastAPI
uvicorn app.main:app --host 0.0.0.0 --port 8000Buka browser web di komputer Anda lalu akses salah satu alamat berikut:
http://localhost:8000http://absensi-pc.local:8000projek_absensi_rfid/
├── firmware/ # Proyek Firmware PlatformIO (ESP32-S3)
│ ├── src/ # Source code modular C++
│ │ ├── main.ino # Logika utama (setup & loop)
│ │ ├── config.h # Pemetaan pin hardware & parameter sistem
│ │ ├── rfid_handler.cpp # Driver komunikasi MFRC522 (SPI)
│ │ ├── pc_client.cpp # Klien HTTP REST API ke server PC
│ │ ├── mdns_client.cpp # Resolusi nama server otomatis (mDNS)
│ │ ├── offline_buffer.cpp # Manajemen buffer antrean offline
│ │ ├── card_storage.cpp # Cache UID kartu lokal pada Flash
│ │ └── ...
│ ├── include/ # Header deklarasi
│ └── platformio.ini # Konfigurasi board & dependensi library
├── pc-app/ # Aplikasi Server & Web (FastAPI)
│ ├── app/
│ │ ├── main.py # Entry point FastAPI & zeroconf mDNS advertiser
│ │ ├── database.py # Konfigurasi database SQLite & ORM engine
│ │ ├── models.py # Model database: Card & AttendanceLog
│ │ ├── routes/ # REST API endpoints (cards, attendance, reports)
│ │ ├── services/ # Layanan mDNS broadcast & sync logic
│ │ ├── templates/ # UI Dashboard HTML (Jinja2)
│ │ └── static/ # Styling CSS & aset web
│ ├── tests/ # Unit testing (Pytest)
│ └── requirements.txt # Daftar dependensi PythonUntuk eksplorasi teknis yang lebih komprehensif, silakan pelajari dokumen-dokumen berikut:
Proyek ini dirilis di bawah lisensi terbuka MIT License. Bebas digunakan, dimodifikasi, dan dikembangkan untuk keperluan riset, edukasi, maupun implementasi komersial.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 10uF/25V(20%) | Capacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolder | C1, C3, C4, C7 |
| 3 | 0(1%) | Resistor_SMD:R_0201_0603Metric | R1, R4, R5 |
| 3 | 10k(1%) | Resistor_SMD:R_0201_0603Metric | R2, R3, R6 |
| 2 | 0.1uF/25V(20%) | Capacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolder | C5, C6 |
| 2 | 220 | Resistor_SMD:R_0201_0603Metric | R7, R8 |
| 2 | BCV29 | Package_TO_SOT_SMD:SOT-89-3 | Q1, Q2 |
| 1 | 0.1uF/25V(10%) | Capacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolder | C2 |
| 1 | 1uF/16V(10%) | Capacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolder | C8 |
| 1 | AMS1117 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | Buzzer | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | ESP32-S3-WROOM-1 | PCM_Espressif:ESP32-S3-WROOM-1 | U1 |
| 1 | LCD_Socket | Connector_PinSocket_1.00mm:PinSocket_1x04_P1.00mm_Vertical | J2 |
| 1 | LED_Socket | Connector_PinSocket_1.00mm:PinSocket_1x03_P1.00mm_Vertical | J1 |
| 1 | LESD5D5.0CT1G | Diode_SMD:Nexperia_DSN0603-2_0.6x0.3mm_P0.4mm | D2 |
| 1 | Polyfuse | Fuse:Fuse_Bourns_MF-RG300 | F2 |
| 1 | Power_Socket | Connector_PinSocket_1.00mm:PinSocket_1x02_P1.00mm_Vertical | J4 |
| 1 | RFID_Socket | Connector_PinSocket_1.00mm:PinSocket_1x08_P1.00mm_Vertical | J3 |
| 1 | Test_Point | Connector_PinSocket_1.00mm:PinSocket_1x06_P1.00mm_Vertical | J5 |

LeafCodes/esp32s3-rfid-attendance
Local-First & Offline-Resilient RFID Attendance System built with ESP32-S3, PlatformIO, Custom KiCad PCB, and FastAPI Backend.

Potato-eater/Legacy2026
github repo for Robocup Junior Australia lightweight soccer team


uw-roamr/roamr
turn your phone into a robot running SLAM with two motors, two control boards, and a bluetooth chip

rapha-tech/ESP32-hema-console
New PCB for the small console from hema to use an ESP32



FrWA14/KiCad8_ESP32S3_DevModule_wroom-1_DevelopementBoard
Contient tout les fichier KiCad nécessaire pour faire une carte ESP32S3 avec un module Wroom-1.

iowlabs/camara_electroforesis
Dispositivo para la instrumentación de experimentos de electroforesis. Considera tanto el diseño de un modelo 3D para el tanque, como la electrónica para una fuente generadora de voltaje.
28 parts, built around the ESP32-S3-WROOM-1-N8, AMS1117, BCV29 and LESD5D5.0CT1G. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the LeafCodes/esp32s3-rfid-attendance repository on GitHub, at the commit this page was made from: the board is pcb/RFID/RFID.kicad_pcb and its schematic pcb/RFID/Power_management_n_Protection_sch.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask LeafCodes before reusing the design.