FaceKom Agent Quick Context

Agent Onboarding

Read this first when working on any FaceKom project. Provides rapid onboarding for AI agents.

What is FaceKom?

Enterprise identity verification (KYC/eKYC) platform by TechTeamer. Real-time face recognition, document verification, liveness detection for banking, telecom, government.

Internal codename: vuer across all services.

Architecture at a Glance

Customer Browser
       │ HTTPS
    Nginx (:30080/:20080)
       │
  ┌────┴────┐
  │         │
vuer_css  vuer_oss ──── vuer_cv
(React)   (Node.js)     (Python/ML)
:10082-3  :10080-1      GPU inference
  │         │
  └────┬────┘
    RabbitMQ (RPC)
       │
  PostgreSQL / Redis

Service Quick Reference

ServiceTechWhat it doesKey file
vuer_ossNode.js, Sequelize, ExpressBackend API, auth, business logic, DBserver/db/models.ts (critical)
vuer_cssReact, Express, Socket.IOCustomer UI, queue management, real-timeserver.js (entry)
vuer_cvPython, ONNX, PyTorch16 ML models, 10 Supervisor processesapp_face.py, app_ocr.py
pdfserviceNode.jsPDF generation-
esign_css/ossNode.jsElectronic signatures-

Critical Knowledge

vuer_oss Gotchas

  • models.ts is the single point of failure - 70+ entities, 35+ files import it
  • Mixed JS/TS: .js files require('.ts') with explicit extension
  • No ts-node: Relies on Node experimental TS support
  • Module syntax: ESM imports + CJS exports in same file
  • Crash = fast loop: Supervisor restarts in 1-2s, fills logs quickly

vuer_css Gotchas

  • Bilingual required: Every UI string needs EN + HU in locales/
  • No direct DB: All data via RabbitMQ RPC to vuer_oss
  • Per-page bundling: Separate CSS/JS bundles per page

vuer_cv Gotchas

  • Git LFS required: git lfs pull for model weights
  • GPU modes: INFERENCE_DEVICE_MODE = cpu/gpu/force_gpu
  • Nginx generated: Runtime Jinja2 templates from scaling config

Communication Patterns

From → ToProtocolNotes
vuer_css ↔ vuer_ossRabbitMQ RPC15+ RPC servers, 20+ RPC clients
vuer_oss → vuer_cvHTTP/WebSocketCV inference requests
Browser ↔ vuer_cssSocket.IO + WebRTCReal-time video, chat
All servicesSupervisorProcess management

Development Environment (levander)

ItemLocation
Remote serverUbuntu 22.04.5 LTS via SSH + Tailscale
SSH aliasssh Facekom (ProxyJump through FKJumpBoxroot@lederera-447-fk-hardver)
Remote workspace/workspace/vuer_*/
DNSdnsmasq: *.facekomdev.net → Tailscale 100.103.48.49
ContainersPodman 5.7.1 (not Docker)
Container registryharbor.techteamer.com
Issue trackerJIRA: FKITDEV-XXXX
Branchesfeature/FKITDEV-XXXX
GitHub orgTechTeamer
Obsidian docs/Users/levander/levandor_obsidian/projects/facekom/

Tech Stack Summary

LayerTechnologies
BackendNode.js >= 22.18.0, Express, Sequelize (TechTeamer fork), Passport.js
FrontendReact 18, Browserify/esbuild, Stylus, i18n (EN/HU)
ML/CVPython, ONNX Runtime, PyTorch, Detectron2, OpenCV
DatabasesPostgreSQL (primary), MySQL, MSSQL, Oracle
MessagingRabbitMQ (@techteamer/mq)
CachingRedis
VideoJanus WebRTC Gateway, Socket.IO
AuthPassport (Local, SAML, AD, FIDO2, TOTP), JWT/JWE
InfraNginx, Supervisor, Docker Compose, Tailscale

Coding Conventions (Shared Across All Services)

RuleDetail
Module systemCommonJS (require/module.exports)
StyleESLint standard, single quotes, semicolons, 2-space indent
BracesAlways required (curly: error), 1TBS style
Consoleno-console: error in production code (allowed in engines/, bin/, db/)
File namingkebab-case for files, PascalCase for classes, camelCase for variables
Endpointsname.endpoint.js pattern
ServicesNameService.js pattern
DIService container pattern (server/service_container.js)
HooksServiceBus emitter for lifecycle events and customization
Configgetconfig with AJV JSON Schema validation
Config accessconfig.get('path.to.key', defaultValue), config.has('key')
LintingESLint v9 (flat config), yarn lint with --max-warnings 0
TestingJest v30 (unit), Playwright v1.56 (e2e, vuer_oss only)
Package managerYarn
Buildesbuild (internal JS), Browserify (externals), Stylus → PostCSS → CleanCSS

Service Container (DI Namespaces)

The central DI object serviceContainer is accessible everywhere within a process:

NamespacePurpose
serviceContainer.emitterServiceBus event emitter (hooks, overrides, lifecycle)
serviceContainer.loggerLog4js structured logging
serviceContainer.serviceBusiness logic services
serviceContainer.rpcServerRabbitMQ RPC servers
serviceContainer.rpcClientRabbitMQ RPC clients
serviceContainer.queueServerQueue message consumers
serviceContainer.queueClientQueue message publishers
serviceContainer.publisherPub/sub publishers (broadcast to all processes)
serviceContainer.subscriberPub/sub subscribers
serviceContainer.dbModelsSequelize model instances (vuer_oss only)
serviceContainer.customizationsCustomer-specific extensions (same structure as above)

Common Commands

# vuer_oss
yarn dev                    # Dev mode with live reload
yarn build                  # Production build (esbuild)
yarn test:unit              # Jest unit tests
yarn test:e2e               # Playwright E2E (WARNING: can erase DB!)
 
# vuer_css
yarn dev                    # Dev mode
yarn build                  # Production build
yarn test:unit              # Jest unit tests
 
# vuer_cv (via Docker)
docker-compose -f vuer-cv-dev.yml up -d
./requirements/compile.sh   # Compile Python deps
./requirements/install.sh   # Install Python deps
git lfs pull                # Download model weights
 
# Infrastructure
supervisorctl status        # Check process status on remote
supervisorctl restart vuer  # Restart a process

Deeper Reading

  • FaceKom - Full ecosystem overview
  • vuer_oss - Backend deep dive (architecture, DB, auth, testing)
  • vuer_css - Frontend deep dive (pages, build, patterns)
  • vuer_cv - CV service deep dive (models, GPU config, scaling)
  • infrastructure - DNS, networking, containers
  • debugging-log - Past bugs and their resolutions