# Contributing to Ledger Wallet

Welcome to the contributing guide for the [Ledger Wallet (formerly Ledger Live) monorepo](https://github.com/LedgerHQ/ledger-live). This documentation covers the architecture, coding conventions, and testing practices for both Ledger Wallet Desktop (LWD) and Ledger Wallet Mobile (LWM).

> **Warning:** **Migration in Progress**: The codebase is actively migrating to a feature-first architecture. New features and refactored code should follow the guidelines described here.

## Where to start

Depending on your task, follow the appropriate path:

| Scenario                    | Start here                                                 |
| --------------------------- | ---------------------------------------------------------- |
| **Creating a new feature**  | [How to Structure a Feature](./how-to/structure-a-feature) |
| **Working in MVVM code**    | [MVVM Pattern reference](./reference/mvvm-pattern)         |
| **Working in legacy code**  | Follow existing patterns, use MVVM for new components      |
| **Writing or fixing tests** | [How to Write Tests](./how-to/write-tests)                 |
| **Your first contribution** | Read the recommended path below                            |

### Recommended reading for new contributors

1. [**Architecture Decisions**](./explanation/architecture-decisions) — Understand why the codebase is structured the way it is
2. [**Architecture reference**](./reference/architecture) — Learn the folder structure and import rules
3. [**Do's and Don'ts**](./reference/component-patterns) — Review the 9 rules before writing code
4. [**Git Conventions**](./reference/git-conventions) — Branch naming and commit message format

---

## How-to Guides

Step-by-step instructions for common contributor tasks.

- [**How to Structure a Feature**](./how-to/structure-a-feature) — Create a new feature module or work within the existing architecture
- [**How to Write Tests**](./how-to/write-tests) — Write integration and unit tests, mock APIs, debug test failures
- [**How to Use the Custom Renderer**](./how-to/use-custom-renderer) — Render components and hooks with all providers in tests

## Reference

Lookup tables, rules, and specifications to consult while working.

- [**Architecture**](./reference/architecture) — Folder structure, import rules, platform-specific file extensions
- [**MVVM Pattern**](./reference/mvvm-pattern) — ViewModel pattern structure, implementation examples, when to use
- [**Do's and Don'ts**](./reference/component-patterns) — 9 numbered rules for components and naming (use in code reviews)
- [**Testing**](./reference/testing) — Testing tools, coverage targets, custom renderer API, query priority
- [**Git Conventions**](./reference/git-conventions) — Branch naming, commit message format, Gitmoji

## Explanation

Background and rationale behind our architectural and testing decisions.

- [**Architecture Decisions**](./explanation/architecture-decisions) — Why feature-first architecture, why MVVM, and the migration journey
- [**Testing Strategy**](./explanation/testing-strategy) — Testing principles and why we favor integration tests for UI
