Thank you for your interest in contributing to Longtail! This document provides guidelines and instructions to help you get started.
- Node.js >= 20
- pnpm >= 9
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/longtail.git cd longtail
- Install dependencies:
pnpm install
- Copy the environment template:
cp .env.example .env
- Create a feature branch:
git checkout -b feature/my-feature
Longtail is a pnpm monorepo managed by Turborepo:
apps/pos/-- Merchant-facing POS applicationpackages/stellar-core/-- Low-level Stellar network interactionspackages/fx-engine/-- Foreign exchange / currency conversion logicpackages/wallet-sdk/-- Client-side wallet SDK (social login, ephemeral wallets)packages/ui-kit/-- Shared UI componentsinfra/-- Infrastructure and deployment configurationdocs/-- Architecture and design documentation
# Build all packages
pnpm build
# Run in development (watch mode)
pnpm dev
# Lint (type checking across all packages)
pnpm lint
# Type check
pnpm typecheck
# Run tests
pnpm test
# Format code
pnpm format
# Check formatting
pnpm format:check# Work on a specific package
pnpm --filter @longtail/wallet-sdk dev
# Build a specific package
pnpm --filter @longtail/stellar-core build
# Test a specific package
pnpm --filter @longtail/fx-engine test- We use TypeScript with strict mode enabled
- Code is formatted with Prettier (run
pnpm formatbefore committing) - Type checking is enforced via
tsc --noEmit - The pre-commit hook runs lint-staged automatically on staged files
- Tests are written with Vitest
- Place test files next to source files:
src/index.test.ts - Run all tests:
pnpm test - Run tests for a specific package:
pnpm --filter @longtail/fx-engine test
Follow Conventional Commits:
feat:-- New featurefix:-- Bug fixchore:-- Maintenance tasksdocs:-- Documentation changestest:-- Adding or updating testsrefactor:-- Code refactoring without behavior changes
Examples:
feat: add OAuth token exchange to wallet-sdk
fix: handle network timeout in stellar-core
chore: update dependencies
docs: add architecture overview
- Ensure your code builds (
pnpm build) and passes all checks (pnpm lint && pnpm test) - Update documentation if needed
- Open a PR against
mainwith a clear title and description - Link any related issues
- Wait for CI to pass and request a review
- Use GitHub Issues
- Include steps to reproduce for bugs
- Label feature requests appropriately
If you discover a security vulnerability, please do not open a public issue. Instead, contact the maintainers directly.
By contributing, you agree that your contributions will be licensed under the MIT License.