This guide explains how to set up your development environment and contribute code to nilDB.
- Node.js >= 23
- pnpm >= 10
- Docker
-
Clone the repository:
git clone [email protected]:NillionNetwork/nildb.git cd nildb
-
Install dependencies and configure the environment:
pnpm install pnpm install-hooks cp .env.example .env
pnpm dev # watches for changes and auto-reloads
# or
pnpm start # runs without watching
Note
Database migrations run automatically when the node starts
Run these checks before submitting your PR:
tsc # type check
biome check # format and lint
pnpm test # run the test suite
Note
- Tests use isolated collections (test_datablocks and test_datablocks_data)
- The test database is dropped at the start of each test run
- Fork the repository
- Open an issue to discuss proposed changes
- Create a branch (
git switch -c <user>/amazing-feature
) - Implement your changes
- Ensure all checks pass
- Commit with conventional commits (feat:, fix:, etc.)
- Push to your fork
- Submit a pull request