A modular biometric authentication platform built with FastAPI, computer vision, and voice-processing technologies.
The project combines:
- face-based biometric identification
- voice-based verification
- challenge-response authentication
- liveness verification
- experimental anti-spoofing mechanisms
into a reusable multi-modal authentication architecture.
The system is designed as a prototype-stage biometric authentication platform with a modular backend and lightweight frontend clients.
- Real-time face enrollment
- Face embedding extraction
- 1:N face identification via server-side comparison
- Multi-frame enrollment capture
- Pose-aware verification
- Face similarity scoring
- Voice embedding extraction
- Speaker similarity verification
- Audio preprocessing pipeline
- Experimental voice challenge-response verification
- Experimental voice anti-spoofing integration
- Blink detection
- Head pose verification
- Directional challenge flow
- Multi-step verification pipeline
- Randomized challenge-response structure
- JWT-based authentication
- Role-aware protected endpoints
- Modular FastAPI backend
- REST-based API architecture
- Async database integration
- Experimental multi-client authentication direction (
X-Clientarchitecture)
- Lightweight modular frontend
- Vanilla JavaScript architecture
- Browser-based camera capture using
getUserMedia - Enrollment and identification interfaces
- Portal-oriented authentication flow
The system currently follows a modular architecture composed of:
- FastAPI backend service
- Browser-based frontend clients
- Face processing pipeline
- Voice processing pipeline
- Enrollment workflow
- Identification workflow
- Experimental spoof-detection components
The project is evolving toward a reusable multi-client biometric authentication architecture.
- User authentication
- Face capture sequence
- Multi-frame enrollment
- Voice sample collection
- Embedding extraction
- Biometric template storage
- User opens biometric verification
- Camera and/or microphone capture begins
- Face verification pipeline executes
- Voice verification pipeline executes
- Liveness checks are evaluated
- Fusion confidence is computed
- Verification decision is returned
Biometric_System/
β
βββ backend/
β βββ app/
β β βββ api/
β β βββ core/
β β βββ db/
β β βββ domain/
β β βββ repositories/
β β βββ services/
β β βββ utils/
β β
β βββ requirements.txt
β βββ app/main.py
β
βββ clients/
β βββ portal/
β β βββ assets/
β β β βββ css/
β β β βββ js/
β β β
β β βββ pages/
β β β βββ portal/
β β β β βββ login_portal.html
β β β β
β β β βββ biometric/
β β β βββ enroll.html
β β β βββ identify.html
β β
β βββ bank/
β
βββ docs/
β
βββ README.md
| Layer | Technology |
|---|---|
| Backend | FastAPI |
| Frontend | HTML, CSS, Vanilla JavaScript |
| Database | SQLite / PostgreSQL |
| ORM | SQLAlchemy |
| Authentication | JWT |
| Face Processing | InsightFace |
| Computer Vision | OpenCV, MediaPipe |
| Audio Processing | Librosa, SoundFile |
| Voice Embeddings | Resemblyzer |
| ML Runtime | PyTorch, ONNX Runtime |
- Python 3.10 (recommended)
- Python 3.11 (supported)
- pip
- virtual environment support (
venv)
Some system-level runtime dependencies may also be required depending on the operating system.
Examples include:
ffmpeglibsndfile- Visual C++ Redistributable (Windows)
git clone https://github.com/gulinkale/biometric-system.git
cd biometric-systempython -m venv venvActivate the environment:
source venv/bin/activatevenv\Scripts\activatecd backend
pip install -r requirements.txtCreate a .env file inside the backend/ directory.
Example:
cp .env.example .envcopy .env.example .envCurrently, the primary required environment variable for startup is:
DATABASE_URL=postgresql+asyncpg://user:password@host:5432/databaseThe current development environment uses a shared Supabase database instance with existing user records.
The current development environment uses a shared Supabase database instance.
Development and testing currently assume:
- an existing configured database
- existing biometric records
- pre-created user/admin accounts
Database connection settings are loaded through environment variables.
In the first terminal:
cd backend
uvicorn app.main:app --reload --port 8000Backend will run on:
http://127.0.0.1:8000
Swagger API documentation:
http://127.0.0.1:8000/docs
Open a second terminal in the project root directory:
python -m http.server 5500Frontend will run on:
http://localhost:5500
Portal login page:
http://localhost:5500/clients/portal/pages/portal/login_portal.html
Biometric enrollment page:
http://localhost:5500/clients/portal/pages/biometric/enroll.html
Biometric identification page:
http://localhost:5500/clients/portal/pages/biometric/identify.html
POST /auth/loginPOST /auth/verifyGET /auth/me/biometric-status
POST /enroll/biometricPOST /enroll/precheck/facePOST /enroll/precheck/voice
POST /identify/GET /identify/voice-challengePOST /identify/pose-checkPOST /identify/blink-check
Additional documentation can be found inside the docs/ directory.
Documentation currently includes:
- architecture notes
- API documentation
- authentication roadmap
- enrollment roadmap
- migration planning
- audit reports
- service architecture evolution
The project has been tested primarily on:
- macOS (Apple Silicon)
- CPU-based inference environments
Some ML/audio dependencies may require additional runtime setup on Windows environments.
Additional OS-specific setup instructions may be provided separately.
This project is currently a prototype-stage research and engineering project.
Several components remain experimental or intentionally simplified for development and educational purposes.
Current limitations include:
- prototype-oriented authentication flows
- experimental anti-spoofing logic
- linear 1:N identification scaling
- limited cross-platform validation
- non-production deployment assumptions
Large-scale deployments would require additional optimizations such as:
- vector indexing
- ANN search structures
- distributed inference pipelines
- scalable biometric template storage
The current implementation should not be considered production-ready without additional security hardening, scalability improvements, and infrastructure validation.
The project currently represents a:
prototype-stage reusable biometric authentication platform
The system already demonstrates:
- reusable service-oriented architecture concepts
- modular biometric processing pipelines
- multi-modal authentication logic
- client-isolated authentication direction
Some advanced components remain experimental, particularly:
- anti-spoofing
- advanced voice challenge verification
- broader cross-platform validation
This project is intended for:
- software engineering research
- biometric authentication experimentation
- modular authentication architecture exploration
- prototype-stage system development
- educational and architectural study
It is not currently intended as a production-ready enterprise authentication platform.