This guide describes how to make focused, reviewable changes to LittleLink-Server. It applies to human contributors and automation agents working in the repository.
- Node.js 24 or later
- Yarn Classic 1.22.x
- Docker, when changing container, Compose, or e2e behavior
yarn installyarn devOpen http://localhost:3000.
# Lint, stylelint, markdownlint, compose env check, typecheck, and unit tests
yarn ci
# Type checking only
yarn typecheck
# Unit tests only
yarn test
# Browser e2e tests
yarn test:e2e
# Docker-backed minimal environment e2e tests
yarn test:e2e:minimal
# Production build
yarn build
# Sync docker-compose.yml with supported runtime env names
yarn compose-env:sync
# Check docker-compose.yml env coverage without writing changes
yarn compose-env:checkRun the narrowest useful command while developing, then run yarn ci before opening or updating a pull request.
- Create a branch from
mainfor each focused change. - Keep unrelated formatting, refactors, dependency changes, and generated files out of the branch.
- Add or update tests when behavior changes.
- Update documentation and examples when user-facing behavior, env vars, Docker, or CI behavior changes.
- Run the relevant validation commands and list them in the pull request.
- Open a pull request against
main.
- Read the nearby implementation and tests before editing.
- Preserve user changes already present in the working tree.
- Prefer small commits and focused pull requests.
- Do not commit
.envfiles, secrets, credentials, or unrelated generated output. - Use
yarn compose-env:syncafter changingsrc/config/envNames.ts. - Leave enough validation detail in the pull request for a reviewer to reproduce the checks.
Supported runtime environment names are defined in src/config/envNames.ts. That file is the source of truth for the application and for the Compose example.
When adding, renaming, or removing an environment variable:
- Update
src/config/envNames.tsand keep the list alphabetically sorted. - Update code that reads or renders the setting.
- Add or update unit and e2e coverage when behavior changes.
- Run
yarn compose-env:syncsodocker-compose.ymlstays complete and sorted. - Run
yarn compose-env:checkoryarn cibefore opening the pull request.
- Choose a stable, descriptive environment variable name for the service.
- Add the environment variable name to
src/config/envNames.ts. - Add the button rendering in
src/components/Home/Home.tsx. - Add the icon asset under
src/iconswhen the button needs a new local icon. - Add or update CSS in
public/css/brands.csswhen the button needs custom colors. - Run
yarn compose-env:syncto add the new variable todocker-compose.yml. - Add or update tests for the new button.
- Include a screenshot in the pull request when the visual output changes.
- Validate Compose-only changes with
docker compose config. - Validate image changes with a local Docker build when practical.
- Run
yarn test:e2e:minimalwhen container runtime behavior changes. - Keep the Docker image focused on Next.js standalone output and production runtime files.
Before requesting review, confirm:
- The branch is based on the latest
main. - The pull request has a concise summary of what changed and why.
- Relevant tests, lint, type checks, Docker checks, or e2e checks have passed.
- Documentation and examples match the behavior being shipped.
- No secrets or ignored files are included.
By contributing, contributors agree that their changes are provided under the repository's MIT License.