Skip to main content

Monorepo Scripts Reference

This document describes the root-level scripts available in the FitNexa development environment (orchestration repo). Run these from the repository root (where the main package.json lives).

๐Ÿš€ Developmentโ€‹

ScriptDescription
npm run easy-startInteractive setup: detects local IP, lets you choose gym (Iron Temple, Green Theory, FitLife), clears ports, starts PostgreSQL (Docker), backend microservices, admin dashboards (Gym Admin + Super Admin), mobile app (Expo), and optionally Prisma Studio.
npm run dev:servicesStart backend only: Gateway, Identity, Gym, Content, Squad, Nutrition, Wizard, Messaging, Logging (all 9 services with colored prefixes).
npm run dev:allStart backend + mobile app (Expo).
npm run start:mobileStart the mobile app only (fitnexa-mobile).
npm run start:gym-adminStart Gym Admin dashboard only.
npm run start:super-adminStart Super Admin dashboard only.
npm run start:landingStart the marketing landing page.

๐Ÿงช Testingโ€‹

ScriptDescription
npm run easy-testInteractive test utility: 1) Choose target (Local or UAT), 2) Choose mode (Standard Run or Coverage Report), 3) Runs tests for every backend service that has a test script. Use this to run or get coverage against localhost or the UAT VPS.
npm run test:allRun all backend service test suites in sequence: gym, identity, nutrition, squad, content, messaging, logging, wizard. No interaction required.
npm run test:gymRun tests for Gym Service only.
npm run test:identityRun tests for Identity Service only.
npm run test:nutritionRun tests for Nutrition Service only.
npm run test:squadRun tests for Squad Service only.
npm run test:contentRun tests for Content Service only.
npm run test:messagingRun tests for Messaging Service only.
npm run test:logsRun tests for Logging Service only.
npm run test:wizardRun tests for Wizard Service only.
npm run test:integrationRun the integration test suite (Jest against fitnexa-backend/tests/integration.config.js). Requires NODE_ENV=test.

๐Ÿ“ฆ Build & Installโ€‹

ScriptDescription
npm run setup / npm run install:allInstall dependencies in all services (via scripts/install-all-services.js).
npm run install:sharedInstall dependencies in fitnexa-shared.
npm run install:mobileInstall dependencies in fitnexa-mobile.
npm run install:gym-adminInstall dependencies in Gym Admin.
npm run install:super-adminInstall dependencies in Super Admin.
npm run install:landingInstall dependencies in landing page.
npm run build:sharedBuild the shared package (fitnexa-shared). Run this after changing shared code before building or running backend services.

๐Ÿ—„๏ธ Databaseโ€‹

ScriptDescription
npm run db:push:allPush Prisma schema to all service databases (identity, gym, nutrition, content, messaging).
npm run generate:allGenerate Prisma clients for identity, gym, nutrition, content, messaging.
npm run generate:messagingGenerate Prisma client for Messaging Service only.
npm run seed:allRun seed script for all services (scripts/seed-all.js).

๐Ÿ”ง Utilitiesโ€‹

ScriptDescription
npm run health-checkRun health check script against configured services (scripts/health-check.js).
npm run docs:devStart the Docusaurus docs site in development mode.
npm run docs:buildBuild the Docusaurus docs for production.
npm run theme:mobileGenerate Tailwind theme for mobile (Iron Temple, using local gateway).
npm run theme:mobile:greentheoryGenerate Tailwind theme for Green Theory.
npm run build:mobile:uatBuild mobile app for UAT (scripts/build-mobile-uat.js).
npm run deploy:allRun full deployment script (scripts/deploy-all.js).
npm run test:e2e:fullRun full E2E test suite (scripts/test-e2e-full.js).

๐Ÿ“ Ports (reference)โ€‹

  • 3000: API Gateway
  • 3001: Admin dashboards (Vite)
  • 3002: Gym Service
  • 3003: Nutrition Service
  • 3004: Content Service
  • 3005: Squad Service
  • 3006: Wizard Service
  • 3007: Identity Service
  • 3008: Messaging Service
  • 3009: Logging Service
  • 5173: Vite (admin)
  • 8081: Metro (Expo)
  • 5555โ€“5559: Prisma Studio / wizard (script-dependent)

Back to Contributing ยท System Overview