Development Setup
This guide will help you set up your development environment for contributing to Actual.
Prerequisites
Before you begin, ensure you have the following installed:
-
Node.js: Version 22 or greater. You can download it from the Node.js website (we recommend the LTS version).
-
Yarn: Version 4.9.1 or greater. Yarn is the package manager used by Actual.
- The project uses Yarn 4 workspaces (monorepo structure).
-
Git: Required for cloning the repository and version control.
Initial Setup
-
Clone the Actual repository:
git clone https://github.com/actualbudget/actual.git
cd actual -
Install all dependencies:
yarn installThis will install dependencies for all packages in the monorepo.
-
Verify your setup by running type checking:
yarn typecheck
Essential Development Commands
All commands should be run from the root directory of the repository. Never run yarn commands from child workspace directories.
Type Checking
# Run TypeScript type checking (ALWAYS run before committing)
yarn typecheck
Linting and Formatting
# Check for linting and formatting issues
yarn lint
# Auto-fix linting and formatting issues
yarn lint:fix
Testing
# Run all tests across all packages
yarn test
# Run tests without cache (for debugging)
yarn test:debug
For more details on testing, see the Testing Guide.
Starting Development Servers
# Start browser development server
yarn start
# or explicitly:
yarn start:browser
# Start with sync server (for testing sync functionality)
yarn start:server-dev
# Start desktop app development
yarn start:desktop
Building
# Build browser version
yarn build:browser
# Build desktop app
yarn build:desktop
# Build API package
yarn build:api
# Build sync server
yarn build:server
Workspace Structure
Actual uses Yarn workspaces to manage a monorepo with multiple packages. For detailed information about each package, see the Project Structure documentation.
Running Workspace-Specific Commands
To run commands for a specific workspace, use:
yarn workspace <workspace-name> run <command>
Examples:
# Run tests for loot-core
yarn workspace loot-core run test
# Start the docs development server
yarn workspace docs start
# Build the API package
yarn workspace @actual-app/api build
Common Development Tasks
Running Specific Tests
See Testing Guide.
Debugging
# Run tests in debug mode (without cache)
yarn test:debug
# Run E2E tests with headed browser
yarn workspace @actual-app/web run playwright test --headed --debug accounts.test.ts
Type Checking
TypeScript uses project references. Always run yarn typecheck from the root to check all packages.
Building for Production
# Browser build
yarn build:browser
# Desktop build
yarn build:desktop
# API build
yarn build:api
# Sync server build
yarn build:server
Development Workflow
When making changes:
- Read relevant files to understand the current implementation
- Make focused, incremental changes
- Run type checking:
yarn typecheck - Run linting:
yarn lint:fix - Run relevant tests
- Fix any linter errors that are introduced
For more details, see the Development Workflow section.
Troubleshooting
If you encounter issues:
- Type errors: Run
yarn typecheckto see all type errors - Linter errors: Run
yarn lint:fixto auto-fix many issues - Test failures: See the Testing Guide for debugging tips
- Build failures: Clean build artifacts and reinstall dependencies:
rm -rf packages/*/dist packages/*/lib-dist packages/*/build
yarn install
For more troubleshooting help, see the Troubleshooting Guide.
Next Steps
- Read the Contributing Guide for information about submitting changes
- Review the Code Style Guide for coding conventions
- Check out the Testing Guide for testing strategies
- Explore the Project Structure to understand the codebase organization