This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is @localazy/strapi-plugin — the official Strapi v5 plugin by Localazy for managing multilingual content. It connects a Strapi CMS instance to the Localazy localization platform, enabling upload/download of translatable content.
npm run build # Build the plugin (uses strapi-plugin CLI)
npm run lint # ESLint (flat config, eslint.config.mjs)
npm run lint:fix # ESLint with auto-fix
npm run format:check # Prettier check
npm run format # Prettier write
npm run test:server # Run server-side Jest tests
npm run test:server:watch # Jest in watch mode
npm run test:server:coverage # Jest with coverage
npm run verify # Strapi plugin verificationRun a single test file:
npx jest --config server/jest.config.ts server/src/utils/__tests__/<file>.test.tsNode version: specified in .nvmrc (currently 20).
The plugin follows the standard Strapi v5 plugin structure with two main entry points:
index.ts— Exports the plugin's server-side API:register,bootstrap,destroy, config, controllers, routes, services, content-types, policies, middlewares.services/— Core business logic:localazy-transfer-upload-service.ts/localazy-transfer-download-service.ts— Content transfer to/from Localazylocalazy-upload-service.ts— Upload orchestrationlocalazy-pubapi-service.ts— Localazy public API clientlocalazy-user-service.ts— User managementstrapi-service.ts/strapi-i18n-service.ts/strapi-localazy-i18n-service.ts— Strapi data access and i18n integrationplugin-settings-service.ts— Plugin configuration persistenceentry-exclusion-service.ts— Entry-level exclusion from translation
controllers/— REST endpoints (auth, transfer, project, user, settings, strapi info, entry exclusion)routes/— Route definitions; includes both admin-authenticated and public transfer routescore/— Internal framework helpersutils/— Shared utilities; all server tests live inutils/__tests__/models/,functions/,db/— Data models, helper functions, database operationslifecycles/— Strapi content-type lifecycle hooks
pages/— Top-level page components: Login, Overview, Upload, Download, GlobalSettings, ContentTransferSetup, etc.modules/— Feature modules organized by domain:login/,overview/,localazy-upload/,localazy-download/,plugin-settings/,entry-exclusion/,alerts/,strapi/,user/,@common/state/— Global state management (usesreact-hooks-global-state)translations/— i18n stringsplugins/— Plugin-level React integrations
Guides users through bundler config setup (Vite/Webpack examples).
Tests use Jest with ts-jest. Only server-side utils are tested (in server/src/utils/__tests__/). The Jest config maps @/ to server/src/ and aliases lodash-es to lodash for CommonJS compatibility.
@localazy/api-clientand@localazy/generic-connector-client— Localazy platform API integrationws/socket.io— WebSocket support for real-time transfer progresslodash-es(aliased tolodashin tests) — Utility functions- Strapi v5 peer dependencies (
@strapi/strapi ^5.6.0,@strapi/design-system,@strapi/icons)
QA workflow (.github/workflows/qa.yml) runs on PRs to main: install, build, verify, and server tests.