Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version
20.20.0 (use nvm for easy version management)npm
Version
10.8.2 (comes with Node.js)Watchman
Required for React Native file watching
nvm
Recommended for Node.js version management
Getting Started
Install nvm and Node.js
Install nvm, then use it to install the correct Node.js version:The project uses strict Node and npm versions defined in
package.json and .nvmrc. The npm install command will fail if you’re not using the correct versions.Platform-Specific Setup
- Web
- iOS
- Android
Web Development Setup
Configure HTTPS
The webpack development server uses HTTPS. On macOS, you can run:mkcert and generates valid certificates for dev.new.expensify.com and localhost.For other operating systems:- Install mkcert
- Generate certificates:
Configure Local Hosts
Add this entry to your/etc/hosts file:Run Development Server
https://dev.new.expensify.com:8082Build for Production
To test a production build locally:http://localhost:8080Environment Variables
Key Environment Variables
| Variable | Description |
|---|---|
NEW_EXPENSIFY_URL | Root URL for the website |
SECURE_EXPENSIFY_URL | URL for the Expensify secure API |
EXPENSIFY_URL | URL for the Expensify API |
EXPENSIFY_PARTNER_NAME | Constant for app authentication |
EXPENSIFY_PARTNER_PASSWORD | Constant for app authentication (OK to be public) |
PUSHER_APP_KEY | Key for Pusher.com authentication |
USE_WEB_PROXY | Start proxy server for API requests (set to true for external contributors) |
Optional Performance Variables
| Variable | Description |
|---|---|
CAPTURE_METRICS | Capture performance metrics in Flipper |
ONYX_METRICS | Capture additional performance metrics |
USE_WDYR | Enable Why Did You Render testing |
USE_REDUX_DEVTOOLS | Enable Redux DevTools for Onyx state debugging |
If your
.env changes aren’t working, try rm -rf .rock and re-run your platform command.Running Tests
Common Issues
CORS Errors
CORS Errors
If you see CORS errors in the browser console:You likely have a misconfigured
.env file. Remove it and try again:Node Version Mismatch
Node Version Mismatch
Certificate Issues (Web)
Certificate Issues (Web)
If you’re having HTTPS certificate issues:
- Ensure mkcert is installed:
brew install mkcert - Run:
npm run setup-https - Check that
/etc/hostscontains:127.0.0.1 dev.new.expensify.com
MapBox Token Issues
MapBox Token Issues
If you’re having MapBox SDK download issues:
- Run:
npm run configure-mapbox - Follow the prompts to set up your token
- See this Slack thread for Expensify employees
Next Steps
Authentication
Learn how to sign in and manage your session
Workspaces
Create and configure your first workspace
Contributing
Start contributing to the project
Architecture
Understand the codebase structure
