local development

info

this guide is for contributing to overlord's source code. if you're looking to use overlord, see the getting started guide.

prerequisites#

  • node.js >= 20
  • pnpm >= 9
  • redis (running locally)
  • git >= 2.20

development setup#

clone the repository and install dependencies:

git clone https://github.com/overlord-run/overlord.git
cd overlord
pnpm install

build the shared protocol package and server:

pnpm --filter @overlordai/protocol build
pnpm --filter @overlordai/server build

seed test data#

populate the database with sample developers, projects, and machines:

pnpm dev:seed

this creates the following test accounts:

usernamerolepasswordtotp secret
adminadmintest-password-123JBSWY3DPEHPK3PXP
aliceleadtest-password-123JBSWY3DPEHPK3PXP
bobdevelopertest-password-123JBSWY3DPEHPK3PXP
caroldevelopertest-password-123JBSWY3DPEHPK3PXP
info

use any totp authenticator app with the secret JBSWY3DPEHPK3PXP to generate 2fa codes for login.

start development servers#

open two terminals:

# terminal 1: start the backend server on port 9000
pnpm dev
 
# terminal 2: start the web dev server on port 5173
pnpm dev:web

the vite dev server proxies /api/* and /ws/* requests to the backend server on port 9000.

open http://localhost:5173 in your browser and log in with any of the seed credentials.

npm scripts#

scriptdescription
pnpm devstart the server
pnpm dev:webvite dev server (port 5173)
pnpm dev:seedseed test data
pnpm buildbuild all packages
pnpm testrun unit tests
pnpm test:allrun all tests including playwright e2e
pnpm test:coveragerun tests with v8 coverage reports
pnpm linttype-check all packages
pnpm publish:allpublish all packages to npm

after protocol changes#

whenever you modify types in packages/protocol, rebuild:

pnpm --filter @overlordai/protocol build

next steps#