B2B CRM is an enterprise demo application built with Jmix that showcases how to develop production-ready business systems
including customers, orders, invoicing, finance and analytics.
It reflects real ERP/CRM scenarios and demonstrates
best practices in domain modeling, UI, security, and business logic implementation.
- Overview
- Technical stack
- Add-ons in use
- Build and run
- AI Assistant
- Demo data
- Accounts
- Domain Model
- Role Model
This project models a typical B2B sales workflow:
- Manage the catalog of your products and categories
- Maintain clients and contacts
- Track orders and order items
- Issue invoices and record payments
- Ask an AI assistant for business insights
- Monitor tasks and recent activities
- See sales analytics
- Java 21
- Jmix 2.7
- Spring Boot 3
- HSQLDB
- Audit
- Application settings
- Charts
- Data tools
- Dynamic attributes
- Grid export
- Local file storage
- Reports (includes an invoice template)
Prerequisites: Java 21+
-
Run B2B CRM Jmix run configuration or execute
./gradlew bootRun
./gradlew bootJar -Pvaadin.productionModejava -jar build/libs/crm.jardocker build -t jmix-crm .docker run --rm -p 8080:8080 jmix-crmdocker-compose upThe application includes a built-in CRM AI workspace for natural-language analysis of CRM data.
Key capabilities:
- Ask business questions about clients, orders, invoices, payments, and sales performance
- Respect the current user's data access permissions and keep conversations private to their author
- Use built-in business reports such as
Client 360 ReportandCategory Cashflow Risk Allocation Report - Keep the conversation history with automatically generated chat titles
- Upload files to the conversation and let the assistant analyze supported documents and images
- Generate interactive links to CRM records directly in responses
Configuration:
- Set
spring.ai.openai.api-keyin application.properties or provide theSPRING_AI_OPENAI_APIKEYenvironment variable
When enabled, open the CRM AI item in the main menu to start a new conversation.
The local profile generates demo data on the application start:
- You can disable demo data generation with
crm.generateDemoDataproperty in application.properties - Catalog imported from catalog.xlsx
| Position | Username | Password | Access |
|---|---|---|---|
| Administrator | admin |
admin | Full access to all data and settings |
| Supervisor | james |
james | Manager + catalog management + assign accounts |
| Manager | manager |
manager | Full access to all clients and orders |
| Account Manager | alice |
alice | Only sees clients assigned to Alice Brown |
| Account Manager | robert |
robert | Only sees clients assigned to Robert Taylor |
classDiagram
Client o-- Contact
Client o-- Order
Client o-- Invoice
Client o-- Payment
Client o-- Address
Order *-- OrderItem
OrderItem --> CategoryItem
Category o-- CategoryItem
Invoice o-- Payment
The application uses a hierarchical role model:
Administrator: Full access to all application features, entities, and settings.Supervisor: Extends the Manager role with additional administrative capabilities:- Manage product catalog (Categories and Category Items).
- Assign Account Managers to Clients.
Manager: Primary role for sales operations.- Full access to Clients, Contacts, Orders, Invoices, and Payments.
- Read-only access to the product catalog.
- Manage own Tasks.
UI Minimal: Minimal access, allowing login and basic navigation.