Skip to content

Latest commit

 

History

History
95 lines (71 loc) · 1.91 KB

File metadata and controls

95 lines (71 loc) · 1.91 KB

Development Guide

Guide for contributors working on Bonsai Desk.

Setup

Install the same prerequisites listed in installation.md, then run:

git clone https://github.com/Kxrbx/BonsaiDesk.git
cd BonsaiDesk
.\install.bat
.\scripts\check.ps1

If you prefer PowerShell scripts directly:

powershell -ExecutionPolicy Bypass -File .\scripts\bootstrap.ps1

Running Locally

.\launch-app.bat

Or run each side manually:

powershell -ExecutionPolicy Bypass -File .\scripts\run-backend.ps1
powershell -ExecutionPolicy Bypass -File .\scripts\run-frontend.ps1

Project Structure

BonsaiDesk/
|-- backend/
|   |-- app/
|   |   |-- api/           # FastAPI route handlers
|   |   |-- core/          # Runtime and chat logic
|   |   |-- db/            # SQLite persistence
|   |   `-- main.py        # FastAPI app entrypoint
|   |-- tests/
|   `-- requirements.txt
|-- frontend/
|   |-- src/
|   |-- package.json
|   `-- vite.config.ts
|-- scripts/
|-- docs/
`-- .github/

Checks and Tests

Run the full project check:

.\scripts\check.ps1

Backend tests only:

cd backend
..\.venv\Scripts\python.exe -m unittest discover -s tests -v

Frontend production build:

cd frontend
npm run build

Code Style

Python

  • Use type hints.
  • Prefer snake_case for functions and variables, PascalCase for classes.
  • Keep docstrings concise and useful.

TypeScript

  • Use camelCase for variables/functions and PascalCase for components/types.
  • Keep components small and move reusable API/types logic into shared modules.

Release Checklist

  1. Update versions in backend/app/__init__.py, frontend/package.json, and frontend/package-lock.json.
  2. Update CHANGELOG.md.
  3. Run .\scripts\check.ps1.
  4. Create and push a tag such as v0.3.0.
  5. Draft a GitHub release.