Development Guides #
Comprehensive guides and best practices for developing in the BonsAI monorepo.
Getting Started #
New to BonsAI development? Start here:
- Development Workflow - Branching strategy, PR process, and code quality standards
- Example Workflow: Adding a New Field - Complete end-to-end walkthrough with realistic code examples
Essential Tools #
Tools you’ll use daily:
- Cursor IDE - IDE setup, useful commands, and extensions for BonsAI development
- Doppler - Managing secrets and environment variables securely
- Linear - Issue tracking, project management, and linking issues to PRs
Libraries #
Shared libraries live under libs/ and are grouped by language. Apps depend on these crates/packages rather than duplicating logic.
Rust Libraries #
Rust crates in libs/rust/ used by BonsAPI and other Rust services:
- bonsai-model — Domain and API models shared across the backend
- bonsai-database — Repository traits and database access
- bonsai-mq — RabbitMQ messaging utilities
- bonsai-cache — Redis cache utilities
- bonsai-storage — S3-compatible storage utilities
- bonsai-clerk — Clerk authentication integration
- bonsai-email — Email sending utilities
- bonsai-integration — Third-party integration types and helpers
- bonsai-utils — Common utilities
- bonsapi-client — Client for BonsAPI
Python Libraries #
Python packages in libs/python/ used by Bonsai-Invoice, Bonsai-Knowledge, and tooling:
- bonsai-model — Shared data models
- bonsai-mq — RabbitMQ messaging
- bonsai-cache — Redis cache
- bonsai-storage — Storage utilities
- bonsai-utils — Common utilities
- bonsai-hinoki — ML/document processing (Hinoki)
TypeScript Libraries #
TypeScript packages in libs/typescript/ used by the webapp and other Node services:
- Extraction Export Library —
@bonsai/extraction-export— Converts extracted documents (invoices, bank statements, direct expenses) into 27+ accounting software formats
Testing & Development #
- E2E Testing - Comprehensive guide to end-to-end testing with Playwright and DVC
Related Documentation #
- Getting Started Guide - Initial setup instructions
- API Documentation - Backend API reference
- Webapp Documentation - Frontend architecture and features
- Database Documentation - Schema, migrations, and database management
- Preview Environments - Deploy and manage PR-based preview environments