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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@l10nmonster/server

v3.1.1

Published

L10n Monster Manager

Downloads

313

Readme

@l10nmonster/server

L10n Monster Manager UI - Web-based interface for managing localization projects and translation workflows.

How It Works

The L10n Monster server is implemented as an action in the L10n Monster CLI. When you run l10n serve --ui, it:

  1. Starts an Express server that connects to the current L10n Monster project
  2. Serves real-time data from your project's translation memory and source files
  3. Optionally serves the web UI (when --ui flag is used) from pre-built static files

Important: This is NOT a standalone server

  • The server must be run from within a L10n Monster project directory (where l10nmonster.config.mjs exists)
  • It accesses the project's MonsterManager instance (mm) to fetch real translation data
  • The API endpoints return actual project data, not mock data

Installation

npm install @l10nmonster/server

Usage

From within a L10n Monster project:

# Navigate to your l10nmonster project directory
cd samples/CardboardSDK/l10nmonster

# Start the server with API only
npx l10n serve --port 9691

# Start the server with web UI
npx l10n serve --port 9691 --ui

Building the UI

The UI must be built before it can be served:

cd server
npm install
npm run build

This creates the ui/dist directory with the built static files.

Features

Web UI

Modern React-based interface built with:

  • Chakra UI 3.0: Modern component library with excellent performance
  • React 19: Latest React with improved performance
  • TypeScript: Type-safe development
  • React Router: Client-side routing
  • Vite: Fast development and build tooling
  • Responsive Design: Works on desktop and mobile

API Endpoints

All endpoints return real project data from the MonsterManager instance:

  • GET /api/status - Real-time translation status from mm.getTranslationStatus()
  • GET /api/untranslated/:sourceLang/:targetLang - Actual untranslated content (currently using mock data, needs implementation)
  • GET /api/tm/stats/:sourceLang/:targetLang - Translation memory statistics (currently using mock data, needs implementation)

Pages

  • Home: Project overview with real translation status
  • Untranslated: Browse untranslated content by language pair
  • Translation Memory: View translation memory statistics
  • 404: Error handling for unknown routes

Development

Prerequisites

  1. Build the UI first:
cd server
npm install
npm run build
  1. Run from a L10n Monster project:
cd your-project/l10nmonster
npx l10n serve --ui

Development Mode

For UI development with hot reload:

cd server
npm run dev  # Runs Vite dev server on port 5173

Note: In development mode, the Vite dev server proxies API calls to http://localhost:9691, so you need the L10n Monster server running.

Build for Production

cd server
npm run build

Run Tests

# Frontend tests
npm run test

# Server tests  
npm run test:server

# Test coverage
npm run test:coverage

Configuration

The server supports:

  • Custom Port: Specify listening port with --port option (default: 9691)
  • UI Toggle: Enable/disable web interface with --ui flag
  • CORS: Cross-Origin Resource Sharing enabled for API access
  • Static Serving: Production-ready static file serving from ui/dist

Architecture

Backend (index.js)

  • Implemented as a L10n Monster action class
  • Receives MonsterManager instance (mm) with access to project data
  • Express.js server with API routes
  • Serves static UI files when --ui flag is used

Frontend (ui/)

  • React 19: Modern frontend framework
  • Chakra UI 3.0: High-performance component library
  • TypeScript: Type safety throughout
  • Vite: Build tool and development server
  • Client-Side Routing: Single-page application with React Router

Dependencies

Backend

  • express: Web application framework
  • cors: Cross-Origin Resource Sharing
  • open: Automatic browser launching

Frontend

  • react & react-dom: Core React libraries (v19)
  • @chakra-ui/react: Chakra UI 3.0 components
  • lucide-react: Modern icon library
  • react-router-dom: Client-side routing
  • typescript: Type-safe development

Development

  • vite: Build tool and development server
  • @vitejs/plugin-react: React integration for Vite
  • vitest: Testing framework
  • @testing-library/*: React testing utilities
  • eslint & prettier: Code quality tools