
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 8 parts on 42 nets, routed with 84 tracks and 0 vias.
It is built around the ESP32-S3-DEVKITC-1-N8. Its parts include 2 resistors, 2 diodes, 2 connectors and 1 IC. 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 |
|---|---|---|---|
| 2 | 330 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical | R1, R2 |
| 2 | LED | LED_THT:LED_D1.8mm_W3.3mm_H2.4mm | D1, D2 |
| 1 | Buzzer | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | Conn_01x04_Pin | Connector_PinHeader_1.00mm:PinHeader_1x04_P1.00mm_Vertical | J2 |
| 1 | Conn_01x07_Pin | Connector_PinHeader_1.00mm:PinHeader_1x07_P1.00mm_Vertical | J1 |
| 1 | ESP32-S3-DevKitC | PCM_Espressif:ESP32-S3-DevKitC | U1 |

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

willem-pennings/balancing-cube
A cube that balances itself in a corner or edge using reaction wheels

jazzmonger/Traeger-PID-Controller
Traeger Smoker/Grill Controller based on an

ohasanov-hbrw/tribit32-advanced
A tri-microcontroller, overengineered GameBoy Advance clone. More value was given to the controls and the exterior look, which is cool!



FIPATECH/CDFR26_PAMI
Open source firmware and PCB for a differential mobile robot (PAMI) based on ESP32-S3 - Coupe de France de Robotique

dnhutchins/ETC_Express_Reverse_Eng
The ultimate goal of this work is to develop an interface to use the control surface from a legacy ETC Express 24/48 lighting controller as a modern EOSNomad compatible programming and fader wing.

heckler/esphome-device-configs
Configuration definitions for local ESPHome files
8 parts, built around the ESP32-S3-DEVKITC-1-N8. 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 rfid-kicad/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.