Decentralized Biometric Identity System
Secure biometric authentication backed by blockchain โ tamper-proof, privacy-first, and built for scale.
TrueID combines biometric authentication with blockchain technology to create a tamper-proof, decentralized identity management system. Users register once, verify with their face, and carry a cryptographically-secured identity that no central authority can alter or revoke.
Biometric Auth Secure face recognition |
Blockchain Immutable records |
Privacy End-to-end encryption |
Mobile App Cross-platform |
Gov Portal Admin dashboard |
Security Multi-factor auth |
TrueID combines blockchain technology with biometric authentication to create a tamper-proof identity management system. The system consists of the following components:
๐ฑ 1. Android Mobile App
- ๐ User Registration: Streamlined onboarding process
- ๐ Biometric Auth: ML Kit Face Detection integration
- ๐ Identity Management: Professional profile versioning
- ๐ Blockchain Wallet: Secure transaction verification
- ๐ Data Security: Encrypted storage
- ๐ก Offline Mode: Authentication without internet
- ๐ฑ QR Codes: Easy identity sharing
- ๐ธ CameraX: Advanced camera features
- ๐ Retrofit: Efficient API communication
๐ฅ๏ธ 2. Backend Server
- ๐ RESTful API: Node.js/Express.js endpoints
- ๐ Auth System: JWT with refresh tokens
- โ๏ธ Blockchain: Ethers.js integration
- ๐พ Database: PostgreSQL operations
- ๐ Biometric: SHA-256 hashing
- ๐ก๏ธ Security: Rate limiting & validation
- ๐ Webhooks: Event notifications
- ๐ก๏ธ Helmet: Enhanced security headers
- ๐ Morgan: Request logging
โ๏ธ 3. Blockchain Layer
- ๐ Smart Contracts: Avalanche Fuji deployment
- โ๏ธ Multi-sig: Identity verification
- ๐ History: Immutable records
- โฑ๏ธ Audit Trail: Timestamp verification
- ๐ฅ Access Control: Role-based permissions
- ๐ฐ Gas Optimization: Cost-effective transactions
๐ 4. Frontend Web Application
- โ๏ธ React.js: Modern UI with Material UI
- ๐ฑ Responsive: All device support
- ๐ Web3: Blockchain integration
- ๐ Auth: Secure token management
- ๐จ UI/UX: User-friendly interface
- ๐ Real-time: Polling updates
๐๏ธ 5. Government Portal
- โ๏ธ React.js: Tailwind CSS dashboard
- ๐ฅ RBAC: Administrative hierarchy
- ๐ Identity: Detailed user profiles
- ๐ Records: Search & filtering
- ๐ Analytics: Audit trail viewing
- ๐ Stats: Real-time visualization
- ๐ ๏ธ Dev Mode: Testing tools
- โฟ Accessibility: Headless UI
- โจ Animations: Framer Motion
๐ง 6. C Client
- โก Lightweight: Embedded systems
- ๐ API Client: Backend integration
- ๐ฆ Minimal: Few dependencies
TrueID/
โโโ ๐ฑ android-app/ # Mobile application
โ โโโ ๐ app/ # Android source
โ โ โโโ ๐ src/ # Source code
โ โ โโโ ๐ build.gradle # Build config
โ โโโ ๐ gradle/ # Gradle wrapper
โโโ ๐ฅ๏ธ backend/ # Node.js server
โ โโโ โ๏ธ blockchain/ # Smart contracts
โ โโโ โ๏ธ config/ # Config files
โ โโโ ๐ฎ controllers/ # API controllers
โ โโโ ๐ middleware/ # Express middleware
โ โโโ ๐ models/ # Database models
โ โโโ ๐ฃ๏ธ routes/ # API routes
โ โโโ ๐ ๏ธ services/ # Business logic
โ โโโ ๐งฐ utils/ # Utilities
โโโ ๐ง c-client/ # C implementation
โโโ ๐พ database/ # DB schemas
โโโ ๐ frontend/ # React web app
โโโ ๐๏ธ government-portal/ # Admin dashboard
โ โโโ ๐ public/ # Static assets
โ โโโ ๐ src/ # React components
โ โโโ ๐ package.json # Dependencies
โโโ ๐ scripts/ # Utilities
1. Clone
git clone https://github.com/notcaliper/TrueID.git
|
2. Backend
cd backend && npm install
|
3. Database
cd database && npm run migrate
|
4. Frontend
cd frontend && npm install
|
5. Portal
cd government-portal && npm install
|
6. Deploy
cd backend && npm run blockchain:deploy:fuji
|
๐ Environment Variables
# Server Configuration
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
# Database Configuration
DB_USER=your_db_user
DB_HOST=localhost
DB_NAME=trueid_db
DB_PASSWORD=your_db_password
DB_PORT=5432
# Authentication
JWT_SECRET=your_jwt_secret
JWT_EXPIRATION=1h
REFRESH_TOKEN_SECRET=your_refresh_token_secret
REFRESH_TOKEN_EXPIRATION=7d
# Blockchain
BLOCKCHAIN_RPC_URL=https://api.avax-test.network/ext/bc/C/rpc
CONTRACT_ADDRESS=your_contract_address
ADMIN_WALLET_PRIVATE_KEY=your_private_key# API Configuration
REACT_APP_API_URL=http://localhost:5000
# Blockchain Configuration
REACT_APP_AVALANCHE_CONTRACT_ADDRESS=your_contract_address
REACT_APP_AVALANCHE_NETWORK=fuji
REACT_APP_AVALANCHE_RPC_URL=https://api.avax-test.network/ext/bc/C/rpc# Server Configuration
PORT=8000
# API Configuration
REACT_APP_API_URL=http://localhost:5000
REACT_APP_AVALANCHE_CONTRACT_ADDRESS=your_contract_address
Backend
cd backend && npm run dev
|
Frontend
cd frontend && npm start
|
Portal
cd government-portal && npm start
|
Dev Mode
cd government-portal && npm run dev:mock
|
Android
cd android-app && ./gradlew assembleDebug
|
Tests
npm run test
|
|
๐ Data Protection
Biometric hashing End-to-end encryption |
๐ Authentication
JWT with refresh Multi-factor auth |
โ๏ธ Blockchain
Immutable records Smart contracts |
|
๐ก๏ธ Access Control
Role-based permissions Rate limiting |
๐ Compliance
Data protection Security audits |
๐ Monitoring
Audit trails Activity logging |
|
๐จ Formatting
ESLint & Prettier |
๐ Style Guide
Airbnb JavaScript |
๐ TypeScript
Type safety |
|
โ
Testing
Unit tests |
๐ Documentation
API docs |
๐ Code Review
Peer review |
|
๐ฟ Branches
Feature branches |
๐ฅ Reviews
PR reviews |
๐ Commits
Conventional |
|
๐งช Unit
Jest |
๐ Integration
Supertest |
๐ E2E
Cypress |
|
๐ฑ Mobile
Espresso |
โ๏ธ Smart Contracts
Hardhat |
๐ Coverage
Reports |
|
1. ๐ด Fork
Clone the repo |
2. ๐ฟ Branch
Create feature branch |
3. ๐พ Commit
Make changes |
|
4. ๐ค Push
To your branch |
5. ๐ PR
Create pull request |
6. โ
Review
Address feedback |
TrueID provides an interactive setup wizard to simplify backend configuration, database setup, blockchain contract deployment, and admin creation.
cd backend
npm run setup
# or
node setup.jsWhat the setup tool does:
- Installs all backend dependencies (if needed)
- Asks for PostgreSQL connection info and tests the connection
- Creates the database if it doesn't exist
- Runs the schema and migrations
- Configures JWT secrets (auto-generates or lets you enter your own)
- Asks for Avalanche wallet private key and derives the address
- Optionally deploys the smart contract to Avalanche Fuji testnet
- Creates the initial admin account (argon2-hashed password)
- Writes the complete
.envfile (backs up old one if present) - Prints a summary and next steps
You can re-run the setup tool any time to update your configuration.







