Files
boc/vims-backend
Bernt 6de2455917 v1.2.0: Add Global Markets footer, translated to 9 languages
- Added GLOBAL_MARKETS_TITLE to all translation files
- Updated footer with 12 markets (4 active + 8 upcoming)
- Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi
- Built and deployed to production
- CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
2026-07-08 19:56:03 +00:00
..

VIMS - Visual Infrastructure Monitoring System

Overview

Production-ready AI-driven visual monitoring for critical infrastructure. Detects anomalies and changes in ATMs, charging stations, parking meters, and more.

Quick Start

# Clone and setup
git clone https://github.com/landvex/vims-backend.git
cd vims-backend

# Run setup script
./scripts/setup.sh

# Start services
docker-compose up -d

# Run tests
npm test

# Start development
npm run dev

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  quiXzoom   │────→│  VIMS API   │────→│  PostgreSQL │
│    App      │     │   (3450)    │     │  (Database) │
└─────────────┘     └──────┬──────┘     └─────────────┘
                           │
                    ┌──────▼──────┐
                    │    Redis    │
                    │   (Queue)   │
                    └──────┬──────┘
                           │
              ┌────────────┼────────────┐
              ▼            ▼            ▼
        ┌─────────┐ ┌──────────┐ ┌──────────┐
        │ Object  │ │ Change   │ │  Risk    │
        │Detection│ │Detection │ │Classifier│
        └─────────┘ └──────────┘ └──────────┘

Features

  • Object Detection: YOLO-based component detection (card readers, PIN pads, etc.)
  • Change Detection: Compare observations with baseline images
  • Risk Classification: Green/Yellow/Orange/Red levels
  • Real-time Alerts: Email, SMS, webhook, push notifications
  • Dashboard: Map view, timeline, statistics
  • API: RESTful API with JWT authentication

API Endpoints

Authentication

  • POST /api/v1/auth/register - Register new user
  • POST /api/v1/auth/login - Login
  • POST /api/v1/auth/refresh - Refresh token
  • GET /api/v1/auth/me - Get current user

Objects

  • GET /api/v1/objects - List monitored objects
  • POST /api/v1/objects - Create new object
  • GET /api/v1/objects/:id - Get object details
  • POST /api/v1/objects/:id/baseline - Set baseline images

Observations

  • POST /api/v1/observations - Upload observation images
  • GET /api/v1/observations/:id - Get observation
  • POST /api/v1/observations/:id/process - Reprocess observation

Detections

  • GET /api/v1/detections - List AI detections
  • POST /api/v1/detections/:id/verify - Verify detection

Alerts

  • GET /api/v1/alerts - List alerts
  • PUT /api/v1/alerts/:id/status - Update alert status
  • POST /api/v1/alerts/:id/escalate - Escalate alert

Dashboard

  • GET /api/v1/dashboard/overview - Dashboard statistics
  • GET /api/v1/dashboard/objects - Objects for map view
  • GET /api/v1/dashboard/timeline - Activity timeline

AI Training

Data Collection

# Generate synthetic training data
node src/training/data-collection.js atm 1000

# Validate dataset
node src/training/data-collection.js atm --validate

Model Training

# Install Python dependencies
pip install ultralytics

# Train YOLO model
python src/training/train-yolo.py atm --epochs 100

# Validate model
python src/training/train-yolo.py atm --validate

Deployment

Docker Compose (Development)

docker-compose up -d

Kubernetes (Production)

# Apply configurations
kubectl apply -f k8s/

# Check status
kubectl get pods -n vims

AWS

# Setup AWS infrastructure
./scripts/setup-aws.sh

# Deploy
./scripts/deploy-aws.sh

Configuration

Environment Variables

Variable Required Default Description
NODE_ENV Yes development Environment mode
PORT No 3450 API port
DB_HOST Yes - PostgreSQL host
DB_PASSWORD Yes - Database password
REDIS_HOST Yes - Redis host
JWT_SECRET Yes - Secret for JWT tokens
S3_BUCKET Yes - S3 bucket for images
AWS_ACCESS_KEY_ID Yes - AWS access key
AWS_SECRET_ACCESS_KEY Yes - AWS secret key

See .env.example for all options.

Testing

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test
npm test -- objectDetection.test.js

Monitoring

Health Checks

  • GET /health - Basic health
  • GET /health/ready - Readiness probe
  • GET /health/live - Liveness probe

Metrics

  • Prometheus metrics at /metrics
  • Grafana dashboards
  • CloudWatch integration

Documentation

Support

License

Proprietary - Landvex AB