Skip to main content

Development Server

The Money monorepo uses Turborepo to manage multiple applications. You can run all apps simultaneously or run individual apps as needed.

Run All Apps

To start all development servers at once:
pnpm dev
This command will start all apps in parallel using Turborepo’s task orchestration.
Make sure you have set up your environment variables before running the dev servers. See Environment Variables for details.

Running Individual Apps

You can run a specific app using Turborepo’s --filter flag:

Web App

The main landing/marketing website:
pnpm dev --filter=web

Secure App

Password manager and secure vault application:
pnpm dev --filter=secure
  • URL: http://localhost:3000
  • Port: 3000
  • Description: SecureVault password management app
  • Features: Authentication, password storage, OAuth integration

CashGap App

Financial tracking and management application:
pnpm dev --filter=cashgap
  • URL: http://localhost:3000
  • Port: 3000
  • Description: Financial tracking and cash flow management
  • Features: Transaction tracking, authentication, email notifications

Docs App

Documentation site (this site):
pnpm dev --filter=docs
The web, secure, and cashgap apps all default to port 3000. If you need to run multiple apps simultaneously, you’ll need to modify the port in the respective package.json files or use the --port flag:
cd apps/secure
pnpm dev -- --port 3002

Development Workflow

1

Start the development server

Choose which app(s) you want to work on and start the appropriate dev server(s).
pnpm dev --filter=secure
2

Make your changes

Edit files in the apps/ or packages/ directories. The dev server will automatically reload when you save changes.Hot Module Replacement (HMR) is enabled by default in Next.js, so most changes will appear instantly.
3

Check for errors

Watch the terminal output for any errors or warnings. TypeScript errors will appear in real-time.You can also run type checking manually:
pnpm check-types
4

Test in the browser

Open the app in your browser and verify your changes work as expected.

Available Scripts

These scripts are available at the root level and work across all apps:

pnpm dev

Starts all development servers in watch mode. Changes to files will trigger hot reloads.
pnpm dev
Turbo configuration: Uses cache: false and persistent: true for optimal dev experience.

pnpm build

Builds all apps for production. See Building for details.
pnpm build

pnpm lint

Runs ESLint across all apps and packages:
pnpm lint
Fix linting issues automatically:
pnpm lint -- --fix

pnpm format

Formats all TypeScript, TSX, and Markdown files using Prettier:
pnpm format

pnpm check-types

Runs TypeScript type checking across all apps:
pnpm check-types

App-Specific Scripts

Each app has its own scripts that can be run from within the app directory:

Web, Docs, and CashGap

cd apps/web  # or apps/docs, apps/cashgap
pnpm dev              # Start dev server on port 3000 (3001 for docs)
pnpm build            # Build for production
pnpm start            # Start production server
pnpm lint             # Run ESLint (max 0 warnings)
pnpm check-types      # Run TypeScript type checking

Secure

cd apps/secure
pnpm dev              # Start dev server on port 3000
pnpm build            # Build for production
pnpm start            # Start production server
pnpm lint             # Run ESLint

Working with Packages

The monorepo includes shared packages that are used across apps:
  • @repo/ui: Shared React components
  • @repo/auth: Authentication utilities
  • @repo/eslint-config: Shared ESLint configuration
  • @repo/typescript-config: Shared TypeScript configuration
When you make changes to a package, Turborepo automatically rebuilds dependent apps thanks to its dependency graph.

Debugging

Enable Debug Logs

To see detailed Turborepo logs:
TURBO_LOG=debug pnpm dev

Next.js Debugging

For Next.js-specific debugging, you can use the Node debugger:
NODE_OPTIONS='--inspect' pnpm dev --filter=secure
Then attach your debugger (VS Code, Chrome DevTools) to the process.

Common Issues

Port already in use If you see an error about port 3000 being in use:
# Find the process using the port
lsof -i :3000

# Kill the process
kill -9 <PID>
Module not found errors If you encounter module resolution issues:
# Clear Turborepo cache
pnpm turbo clean

# Reinstall dependencies
rm -rf node_modules
pnpm install
Database connection errors Ensure your MongoDB instance is running and the MONGODB_URI in your .env file is correct. See Database Setup.

Performance Tips

  1. Use filters: When working on a specific app, use --filter to only run that app’s dev server
  2. Turbo cache: Turborepo caches task outputs to speed up subsequent runs
  3. Parallel execution: Turborepo runs tasks in parallel when possible, respecting dependencies

Next Steps

Building

Learn about the production build process

Testing

Write and run tests

Environment Variables

Configure your environment

Contributing

Contribution guidelines

Build docs developers (and LLMs) love