How marcoxmarquez/verificamtc works
Project type and purpose
• Project type: Native Android full-client application for identity verification in driving exams.
• Purpose: Capture user/admin interactions, perform facial recognition locally using TensorFlow Lite & ML Kit, store user data locally (SQLite) and in the cloud (Firebase Realtime Database), manage authentication (Firebase Auth), and present dashboards and workflows for admin and test candidates.
File structure
• Top-level “app” module containing:
• build.gradle.kts, proguard rules, google-services.json
• src/main/java/com/master/verificamtc/… ‑ organized into packages:
– auth (login & registration Activities)
– admin/dashboard (AdminDashboardActivity)
– user/(circuit|dashboard|exam|payment|vehicle) (Activities per user workflow)
– helpers:
· database (AppDatabase.java for local SQLite, FirebaseDatabaseHelper.java for cloud sync)
· vision/recogniser (FaceRecognitionProcessor.java, FaceGraphic.java)
· vision (GraphicOverlay.java, VisionBaseProcessor.java)
· object (FaceRecognitionActivity.java)
· MLVideoHelperActivity.java
· SecurityHelper.java (BCrypt, input validation)
– assets & ml directory: several .tflite models & vocab/label files
• src/main/res: layouts, drawables, XML configs (backup, fileprovider)
• test & androidTest folders for unit & instrumented tests
• No separate server code – uses Firebase BaaS for backend.
README insights
• Architecture is client-heavy: authentication + data via Firebase, local cache via SQLite, ML inference on device.
• ML models: mobile_face_net.tflite in res/ml, plus other TFLite assets.
• Firebase services: Auth, Realtime Database.
• Android frameworks: CameraX, ML Kit, Material Design.
Main components
a. Android Client (app module)
• UI Layer: Activities (Auth, AdminDashboard, User workflows)
• Presentation: XML layouts, Material Components
• CameraX & ML Kit: capture frames, pass to VisionBaseProcessor
• ML Inference Engine: TensorFlow Lite models (.tflite assets) handled by FaceRecognitionProcessor
• Local Storage: Room/SQLite (AppDatabase)
• Security Layer: SecurityHelper (BCrypt hashing, input validation)
b. Cloud Services (Firebase)
• Firebase Auth (user/admin login & session)
• Firebase Realtime Database (user records, exam results, vehicle data)
c. External Assets
• TFLite models in assets & res/ml
d. Testing
• Unit tests & Instrumented tests folders
Relationships & interactions
• UI Layer → SecurityHelper for input validation & password hashing
• UI Layer → AppDatabase for local query & cache
• UI Layer → FirebaseDatabaseHelper to read/write remote cloud data
• CameraX → VisionBaseProcessor → FaceRecognitionProcessor → TFLite model → results returned to UI
• Auth Activities ↔ Firebase Auth service
• AdminDashboardActivity & UserDashboardActivity ↔ FirebaseDatabaseHelper
• MLVideoHelperActivity orchestrates video capture & ML pipeline
Architectural patterns & design principles
• MVVM/MVP-like separation: UI Activities delegate processing to helper classes
• Repository pattern for data: FirebaseDatabaseHelper & AppDatabase unify data sources
• Single Responsibility: each helper class focuses on one domain (vision, database, security)
• On-device inference to minimize latency and preserve privacy
Be detailed and capture all essential elements
• Major Activity as its own node or group them by “Auth,” “Admin,” “User workflows”
• Asset directories for ML models to show where inference artifacts reside