npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

facecog-liveness-showcase

v0.0.1

Published

FaceCog Liveness Verification Showcase - Demo application for @naniteninja/liveness-verification library

Readme

FaceCog Liveness Verification

An Angular workspace containing a liveness verification library and a showcase demo application.

Project Structure

facecog-ionic-front/
├── projects/
│   ├── facecog-liveness-verification/        # @naniteninja/liveness-verification
│   │   ├── src/lib/
│   │   │   ├── models/
│   │   │   │   ├── types/                    # Type definitions (one per file)
│   │   │   │   │   ├── liveness-backend.type.ts
│   │   │   │   │   ├── verification-flow-step.type.ts
│   │   │   │   │   ├── liveness-action.type.ts
│   │   │   │   │   ├── pose-category.type.ts
│   │   │   │   │   ├── pose-difficulty.type.ts
│   │   │   │   │   ├── detection-strategy.type.ts
│   │   │   │   │   └── index.ts
│   │   │   │   │
│   │   │   │   ├── interfaces/               # Interface definitions (one per file)
│   │   │   │   │   ├── liveness-verification-config.interface.ts
│   │   │   │   │   ├── liveness-result.interface.ts
│   │   │   │   │   ├── pose-definition.interface.ts
│   │   │   │   │   ├── ... (13 more interfaces)
│   │   │   │   │   └── index.ts
│   │   │   │   │
│   │   │   │   ├── constants/                # Constant values
│   │   │   │   │   ├── default-liveness-config.constant.ts
│   │   │   │   │   ├── pose-definitions.constant.ts
│   │   │   │   │   └── index.ts
│   │   │   │   │
│   │   │   │   ├── utils/                    # Utility functions
│   │   │   │   │   ├── pose.utils.ts
│   │   │   │   │   └── index.ts
│   │   │   │   │
│   │   │   │   └── index.ts
│   │   │   │
│   │   │   ├── services/                     # Core services
│   │   │   │   ├── backends/
│   │   │   │   │   ├── backend-adapter.interface.ts
│   │   │   │   │   └── mock-backend.service.ts
│   │   │   │   ├── camera.service.ts
│   │   │   │   ├── liveness-config.service.ts
│   │   │   │   ├── pose-selection.service.ts
│   │   │   │   └── video-recorder.service.ts
│   │   │   │
│   │   │   ├── liveness-verification.component.ts
│   │   │   └── liveness-verification.module.ts
│   │   │
│   │   ├── src/public-api.ts
│   │   ├── package.json
│   │   ├── ng-package.json
│   │   └── README.md
│   │
│   └── facecog-liveness-verification-test/   # Showcase Demo App
│       └── src/
│           ├── app/
│           │   ├── liveness-verification/    # Full implementation
│           │   ├── verification-demo/        # FaceTec demo
│           │   └── home/                     # Home page
│           ├── assets/
│           ├── environments/
│           └── theme/
│
├── dist/
│   └── naniteninjas-liveness-verification/   # Built library
│
├── angular.json
├── tsconfig.json
└── package.json

Quick Start

Install Dependencies

npm install

Development Server

npm start

Starts facecog-liveness-verification-test on http://localhost:4200.

Build Library

npm run build:lib

Outputs to dist/naniteninjas-liveness-verification/.

Build Demo App

npm run build:prod

Outputs to www/.

Library Usage

Local Development (No Build Required)

The workspace is configured with TypeScript path mapping:

// tsconfig.json
{
  "paths": {
    "@naniteninja/liveness-verification": [
      "projects/facecog-liveness-verification/src/public-api.ts"
    ]
  }
}

Import Examples

// Types (single export per file)
import { LivenessBackend } from '@naniteninja/liveness-verification';
import { VerificationFlowStep } from '@naniteninja/liveness-verification';
import { PoseCategory } from '@naniteninja/liveness-verification';

// Interfaces (single export per file)
import { LivenessVerificationConfig } from '@naniteninja/liveness-verification';
import { LivenessResult } from '@naniteninja/liveness-verification';
import { PoseDefinition } from '@naniteninja/liveness-verification';

// Constants
import { DEFAULT_LIVENESS_CONFIG } from '@naniteninja/liveness-verification';
import { POSE_DEFINITIONS } from '@naniteninja/liveness-verification';

// Utils
import { getPoseById, getPosesByCategory } from '@naniteninja/liveness-verification';

// Services
import { LivenessConfigService, PoseSelectionService } from '@naniteninja/liveness-verification';

// Module/Component
import { LivenessVerificationModule, provideLivenessVerification } from '@naniteninja/liveness-verification';

Module-based Usage

import { LivenessVerificationModule } from '@naniteninja/liveness-verification';

@NgModule({
  imports: [
    LivenessVerificationModule.forRoot({
      apiUrl: 'https://api.example.com',
      backends: ['amazon', 'facetec']
    })
  ]
})
export class AppModule {}

Standalone Usage

import { provideLivenessVerification } from '@naniteninja/liveness-verification';

bootstrapApplication(AppComponent, {
  providers: [
    provideLivenessVerification({ backends: ['mock'] })
  ]
});

Template

<facecog-liveness-verification
  [pose]="5"
  (verificationComplete)="onComplete($event)"
  (verificationError)="onError($event)">
</facecog-liveness-verification>

Available Scripts

| Script | Description | |--------|-------------| | npm start | Start the showcase demo app | | npm run build | Build the demo app | | npm run build:prod | Build demo app for production | | npm run build:lib | Build the library | | npm run package | Build and pack the library | | npm run npm:pub | Publish library to npm | | npm run bump:lib | Bump library version | | npm run lint | Lint the demo app |

Publishing

# Update version
npm run bump:lib

# Build and pack
npm run package

# Publish
npm run npm:pub

Code Organization Principles

Single Export Per File

All types, interfaces, and enums follow the single-export-per-file pattern:

// ✅ Good: types/liveness-backend.type.ts
export type LivenessBackend = 'amazon' | 'openpose' | 'facetec' | 'azure' | 'mock';

// ✅ Good: interfaces/liveness-result.interface.ts
export interface LivenessResult {
  success: boolean;
  confidence: number;
  // ...
}

Barrel Exports (index.ts)

Each folder has an index.ts that re-exports its contents:

// types/index.ts
export { LivenessBackend } from './liveness-backend.type';
export { VerificationFlowStep } from './verification-flow-step.type';
// ...

// models/index.ts
export * from './types';
export * from './interfaces';
export * from './constants';
export * from './utils';

Features

  • 40+ Poses: Face, head, hand, gesture, and combined poses
  • Multi-Backend: Amazon, FaceTec, OpenPose, Azure, Mock
  • TensorFlow.js: MoveNet for pose detection
  • MediaPipe: Face & Hand Landmarker
  • Configurable: Thresholds, retries, video recording

Tech Stack

  • Angular 20
  • Ionic 8
  • TensorFlow.js
  • MediaPipe
  • RxJS

License

MIT