Skip to content

jmix-framework/jmix-crm

Repository files navigation

CRM B2B CRM

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.

📑 Table of Contents

📖 Overview

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

🛠️ Technical Stack

  • Java 21
  • Jmix 2.7
  • Spring Boot 3
  • HSQLDB

🧩 Add-ons

  • Audit
  • Application settings
  • Charts
  • Data tools
  • Dynamic attributes
  • Grid export
  • Local file storage
  • Reports (includes an invoice template)

🚀 Build and Run

Prerequisites: Java 21+

Run Project

  1. Run B2B CRM Jmix run configuration or execute

    ./gradlew bootRun
  2. Open application URL

Run via JAR:

./gradlew bootJar -Pvaadin.productionMode
java -jar build/libs/crm.jar

Run via Docker

docker build -t jmix-crm .
docker run --rm -p 8080:8080 jmix-crm

Run via Docker Compose

docker-compose up

🤖 AI Assistant

The 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 Report and Category 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-key in application.properties or provide the SPRING_AI_OPENAI_APIKEY environment variable

When enabled, open the CRM AI item in the main menu to start a new conversation.

🎲 Demo Data

The local profile generates demo data on the application start:

👥 Application Accounts

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

⚙️ Domain Model

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
Loading

🔐 Role Model

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.

About

CRM application based on Jmix framework

Topics

Resources

Stars

Watchers

Forks

Contributors