Experimental web and desktop ecosystem
Face Recognition
Local attendance, manual alternative and a commercial platform independent of biometric data.
Next.js · FastAPI · PostgreSQL · Python · SQLite · OpenCV · Tkinter · PyInstaller
The real problem
Explore supervised attendance using an ordinary webcam without dedicated biometric hardware or a continuous internet connection. This single-station prototype is not approved for door access control, surveillance or use with minors.
Architecture and what I built
I built a Next.js landing page, a FastAPI commercial contact API with PostgreSQL on Neon, and a Python app for manual attendance or experimental facial comparison. Attendance and biometrics remain in local SQLite, even offline. The desktop only checks API availability.
Evidence and tests
Frontend, API and desktop tests passed; the Windows x64 package was built. End-to-end integration with fictional data confirmed local attendance, API availability and production form submission. No measured biometric accuracy or field acceptance is established.
Project visuals
Advanced technical details
Technical decisions: isolation and privacy
The API validates origin, separate consent flags and a versioned notice; it limits requests to three per email and 100 globally per hour. The desktop stores descriptors without copying photos, supports revocation and deletion and offers manual attendance. SQLite has no application-level encryption; controller duties, retention and rights handling require operational and legal review. No LGPD certification is claimed.
Technical decisions: distribution and limits
The portable unsigned Windows x64 package includes LBPH. Optional dlib embeddings require a separate installation. Administrative authentication, multi-site synchronization, fraud protection, signing and physical camera acceptance remain outside the MVP.
System design
Interactive architecture
Select a component to inspect its responsibility and trade-offs. The diagram represents documented behavior.
Next.js · Vercel
Landing page
Website and commercial form, no biometrics.
Decision and trade-off
Commercial site separated from local operations.
Infrastructure / CI
Infrastructure and deployment
Documented topology, not a live inventory. Select a component to inspect the source.
Next.js · Vercel
Landing page
Website and commercial form, no biometrics. Commercial site separated from local operations.
Inspect source ↗API / HTTP
API reference
Read-only contract examples verified against source code and tests. No requests are sent. Tokens and IDs are placeholders; responses may be partial.
Runs SELECT 1; returns 503 if the database is unavailable.
Authorization: Public
Request
GET /healthExpected response
200 OK
{"status":"ok"}Architecture Decision Records
Architecture decisions
Retrospective records based on the implemented code. Alternatives are analytical comparisons, not a claimed historical shortlist.
ADR-01 · SQLite as local source
- Context
- Attendance must continue offline.
- Options compared
- Local store versus remote API.
- Decision
- SQLite with transactions and persistent cooldown.
- Consequences and trade-offs
- Network independence; no synchronization or application encryption.
ADR-02 · Biometric isolation
- Context
- Commercial inquiries and attendance have different purposes.
- Options compared
- Unified API versus separate domains.
- Decision
- API receives inquiries; biometrics and attendance remain local.
- Consequences and trade-offs
- Reduced exposure; local protection and retention remain necessary.
ADR-03 · LBPH on Windows
- Context
- Portable package requires native dependencies.
- Options compared
- Packaged LBPH versus optional dlib.
- Decision
- Ship LBPH; dlib requires separate installation.
- Consequences and trade-offs
- Simpler installation; no accuracy benchmark.
Technical dossier · Miguel Petherson Silva
https://petherson-dev.vercel.app/en/projetos/face-recognition
Infrastructure
Landing page: Website and commercial form, no biometrics. Commercial site separated from local operations.
Desktop: Manual attendance and experimental comparison. Calls GET /health only.
API REST: Validates commercial inquiries and consent. Receives neither attendance nor biometrics.
SQLite: Enrollment, descriptors and attendance. No application encryption or synchronization.
PostgreSQL 17: Commercial inquiries. Organization and terminal tables reserved for future integration.
GitHub Actions: Windows x64 validation and distribution passed.
API
GET /health
Runs SELECT 1; returns 503 if the database is unavailable.
GET /health
200 OK
{"status":"ok"}https://github.com/pethersonzada/face-recognition-backend/blob/6a78d5a4fdf9c9eed7d2357349396c5b621510cd/app.py
POST /v1/demo-requests
Synthetic example without submission. May return 422, 403, 429 or 503.
POST /v1/demo-requests
Content-Type: application/json
Origin: <allowed-origin>
{"name":"Example User","email":"demo@example.invalid","organization":"Example","message":"","consent":true,"international_consent":true,"privacy_version":"2026-11-v2","purpose":"demo","website":""}
202 Accepted
{"status":"received"}https://github.com/pethersonzada/face-recognition-backend/blob/6a78d5a4fdf9c9eed7d2357349396c5b621510cd/app.py
ADRs
ADR-01 · SQLite as local source
Context: Attendance must continue offline.
Options: Local store versus remote API.
Decision: SQLite with transactions and persistent cooldown.
Trade-offs: Network independence; no synchronization or application encryption.
https://github.com/pethersonzada/face-recognition-desktop/blob/1759b723680e2946f8f7ec94f1360de95dc332df/face_capture/storage.py
ADR-02 · Biometric isolation
Context: Commercial inquiries and attendance have different purposes.
Options: Unified API versus separate domains.
Decision: API receives inquiries; biometrics and attendance remain local.
Trade-offs: Reduced exposure; local protection and retention remain necessary.
https://github.com/pethersonzada/face-recognition-backend/blob/6a78d5a4fdf9c9eed7d2357349396c5b621510cd/app.py
ADR-03 · LBPH on Windows
Context: Portable package requires native dependencies.
Options: Packaged LBPH versus optional dlib.
Decision: Ship LBPH; dlib requires separate installation.
Trade-offs: Simpler installation; no accuracy benchmark.
https://github.com/pethersonzada/face-recognition-desktop/blob/1759b723680e2946f8f7ec94f1360de95dc332df/README.md