Skip to content

Latest commit

 

History

History
126 lines (85 loc) · 3.53 KB

File metadata and controls

126 lines (85 loc) · 3.53 KB

Contributing to LingoTracker

Thank you for your interest in contributing to LingoTracker! This guide will help you get started.

Prerequisites

Setup

  1. Fork and clone the repository:

    git clone https://github.com/<your-username>/lingo-tracker.git
    cd lingo-tracker
  2. Install dependencies:

    pnpm install
  3. Build the project:

    pnpm run build
  4. Run the tests:

    pnpm run test

Development

Project Structure

This is an Nx monorepo with three applications sharing core business logic:

  • CLI (apps/cli) — Command-line interface
  • API (apps/api) — NestJS REST API
  • Tracker (apps/tracker) — Angular web UI
  • Domain (libs/domain) — Pure business logic (browser-safe, no Node.js deps)
  • Core (libs/core) — Node.js business logic (file I/O, checksums, bundles)
  • Data Transfer (libs/data-transfer) — Shared DTOs

Running Development Servers

pnpm run serve:api       # API server on port 3030
pnpm run serve:tracker   # Angular dev server

Running Tests

pnpm run test            # All tests
pnpm run test:cli        # CLI tests only
pnpm run test:api        # API tests only
pnpm run test:core       # Core library tests only
pnpm run test:tracker    # Tracker UI tests only

Linting and Formatting

pnpm run lint            # Lint with Biome
pnpm run format:check    # Check formatting
pnpm run format          # Auto-format

Making Changes

  1. Create a feature branch from develop:

    git checkout -b feat/my-feature develop
  2. Make your changes and write tests as needed.

  3. Commit using conventional commits:

    pnpm run commit

    This launches an interactive prompt that guides you through writing a properly formatted commit message.

  4. Push your branch and open a pull request against develop.

Commit Convention

This project uses Conventional Commits. Commit messages are validated by commitlint. Common prefixes:

  • feat: — A new feature
  • fix: — A bug fix
  • docs: — Documentation changes
  • refactor: — Code changes that neither fix a bug nor add a feature
  • test: — Adding or updating tests
  • chore: — Maintenance tasks

Code Standards

  • Angular components: Use signals, standalone components, OnPush change detection, and inject() for DI.
  • Domain logic: Pure, platform-agnostic business logic belongs in libs/domain. This includes key validation/parsing, translation status helpers, ICU/Transloco format conversion, and shared types. Domain has zero Node.js dependencies so it can be imported by all apps, including the browser-based Tracker UI.
  • Core logic: Node.js-dependent business logic belongs in libs/core — file I/O, checksums, directory traversal, bundle generation. Core depends on domain; domain must never depend on core.
  • DTOs: API contracts are defined in libs/data-transfer.
  • Testing: Vitest for unit tests.

Contributing to Documentation

The docs site lives in docs-site/ and is built with Docusaurus. To run it locally:

pnpm run docs:dev

Documentation source files are located under docs-site/src/pages/. Add or edit pages there and open a pull request as you would for any other change.

Questions?

Open an issue and we'll be happy to help.