-
Notifications
You must be signed in to change notification settings - Fork 120
Development Guide
jack ning edited this page Jun 15, 2026
·
2 revisions
Set up your development environment for backend, frontend, and documentation.
- JDK 21 - Java Development Kit
- Maven - Build tool
- Docker & Docker Compose - For running middleware
- IDE - IntelliJ IDEA, Eclipse, or VS Code
- Node.js - Version 20.19.0+ or 22.12.0+
- pnpm 10 - Package manager
- nvm (optional) - Node Version Manager
- IDE - VS Code, WebStorm, etc.
- Node.js - For Docusaurus
- pnpm - Package manager
We recommend **Docker for infrastructure + source for business applications:
- Start middleware via Docker Compose
- Run backend from source in your IDE
- Run frontend from source with hot reload
This approach provides:
- Environment parity with production
- Clear boundaries between components
- Flexible single-module debugging
- Fast hot reload for frontend changes
# Clone the repository
git clone https://github.com/Bytedesk/bytedesk.git
cd bytedesk
# Start middleware first
cd deploy/docker
cp .env.example .env
./start.sh mysql artemis standard middleware
# Return to project root and build
cd ../..
mvn clean install -DskipTests-
Import the root
pom.xmlinto your IDE - Configure JDK 21 as the project SDK
- Wait for Maven dependencies to download
-
Locate
StarterApplication.javainstarter/src/main/java/com/bytedesk/starter/ - Run it as a Java application or Spring Boot app
# Build entire project
mvn clean install
# Build without running tests
mvn clean install -DskipTests
# Build specific module
mvn clean install -pl modules/service
# Run tests
mvn test
# Run specific test module
mvn test -pl modules/service
# Run single test class
mvn test -Dtest=YourTestClass
# Run single test method
mvn test -Dtest=YourTestClass#testMethod
# Generate Javadoc
mvn javadoc:javadoc
# Run the application from starter module
cd starter
mvn spring-boot:runThe root pom.xml aggregates:
-
channels/- External channel integrations -
control/- Control plane and admin services -
modules/- Core business modules -
plugins/- Optional plugins -
projects/- Custom projects -
enterprise/- Enterprise features -
starter/- Application entry point
-
Main Configuration:
starter/src/main/resources/application*.properties -
Profiles:
-
application.properties- Default profile -
application-dev.properties- Development profile -
application-prod.properties- Production profile
-
cd frontend
# Use correct Node version
nvm use
# Install dependencies
pnpm install# Start all apps in development mode
pnpm dev
# Start specific app
turbo dev --filter=admin
turbo dev --filter=agent
turbo dev --filter=visitor
turbo dev --filter=desktop
# Build all apps
pnpm build
# Build specific app
turbo build --filter=admin
# Lint all code
pnpm lint
# Format code
pnpm format
# Run tests
pnpm testfrontend/
├── apps/ # Individual applications
│ ├── admin/ # Admin dashboard
│ ├── agent/ # Agent workbench
│ ├── visitor/ # Visitor chat widget
│ ├── desktop/ # Desktop app
│ └── ...
└── packages/ # Shared libraries
The docs/ directory contains the official documentation site built with Docusaurus.
cd docs
pnpm install# Build documentation
pnpm build
# Start Chinese documentation site
pnpm start-cn
# Start English documentation site
pnpm start-en- Locate the relevant module(s) in the Module Map
- Start the minimal required middleware
- Develop backend changes in the appropriate module
- Develop frontend changes in the appropriate app
- Test end-to-end with both backend and frontend running
-
Return to baseline:
mysql + artemis + standard -
Remove optional scenarios: no
call,webrtc, oraidependencies - Isolate whether the issue is in backend, frontend, or deployment
- Check logs and configuration
- Did you modify the correct module(s)?
- Are backend and frontend configurations in sync?
- Do deployment or documentation need updates?
- Are local-only configuration changes excluded from commit?
- Did you run tests for the modules you modified?
- Is sensitive information kept out of code and commits?
- Keep commits focused and atomic
- Write clear commit messages
- Don't commit secrets or passwords
- Don't commit large binary files
- Keep
.envfiles out of version control
- Set breakpoints in your IDE
- Check logs in
starter/logs/ - Use Elasticsearch/Kibana for log aggregation
- Monitor database queries
- Check message queue health
- Use browser dev tools
- Check network requests
- Use React DevTools
- Check console for errors
- Verify WebSocket connections
# Check running containers
docker compose -p bytedesk ps
# View logs
docker compose -p bytedesk logs -f
# View specific service logs
docker compose -p bytedesk logs -f bytedesk-mysql
# Enter a container
docker exec -it bytedesk-mysql bash
# Restart a service
docker compose -p bytedesk restart bytedesk-redis-
Use dev profile for development -
application-dev.properties -
Never commit real secrets - Keep them in
.envor local config - Use middleware mode for local development - Faster and more reliable
- Consider using Docker for full integration testing
- Refer to Deployment Guide for production setup