2.0 previewNew: RAG + LLM Wiki knowledge base and AI assistant

Orders, stock and accountsthat always reconcile

Qiheng ERP is open-source inventory and accounting software for trading, wholesale and light-manufacturing teams. From order, shipment and delivery to payment matching and month-end close, every step leaves a record you can trace.

AGPL-3.0 open sourceStarts on a single serverOptional, self-hostable AI
erp.example.com / Workbench
Qiheng ERP workbench with to-dos, KPIs and 12-month trends (interface in Chinese)
Mobile PDA putaway screen: scan the bin and confirm the quantity (interface in Chinese)

Built on a familiar, proven stack

Java 21Spring Boot 4Vue 3TypeScriptElement PlusMySQL 8.0RedisFlowable 8Spring AIOpenSearchuni-appDocker Compose
Who it's for

For teams that need both operations and the books under control

Not a bookkeeping app, and not an inventory-only tool. Qiheng ERP keeps business documents and financial results in agreement.

Trading & wholesale

Many orders, many customers, long payment terms. You need to know what each customer owes at any moment.

  • Stock is reserved when an order is approved, so you don't oversell
  • Receivables are recognized on delivery, even for split shipments
  • Payments are matched to receivables one by one, with clear aging
Open receivables by customerSample data
Linjiang Supply¥128,600.00
Nanhu Hardware¥64,300.00
Qinghe Foods¥23,950.00

Multi-warehouse distribution

Several warehouses and companies. You need to know where the stock is and who can see what.

  • Data scoped by company, warehouse and department
  • Transfers in transit, bins, lots and serial numbers fully traceable
  • PDA scanning for putaway, picking and pack checks

Light manufacturing & assembly

Issue materials against a BOM, keep usage under control and get the costs right.

  • Versioned BOMs, substitutes and work orders
  • Material issues and returns, finished goods received in batches
  • Month-end work in progress and production cost variances
End to end

Three flows, from document to ledger

Blue steps are where finance comes in: once a document posts, receivables, payables and vouchers follow.

Procure to payRequisition → payable settled
RequisitionPO approvalIncoming inspectionGoods receiptPayable recognizedPayment matched
Order to cashOrder → receivable settled
SO approvalStock reservedPick & shipDelivery confirms receivablePayment matchedInvoice
Warehouse & productionTasks → cost
PutawayWave pickingPack checkBOM material issueFinished goods receiptMonth-end costing
Why the books stay right

Correct books first, more features second

The worst thing an ERP can do is let stock and books drift apart. Qiheng ERP builds reconciliation into every posting.

Posted means final. Corrections are reversals

Posted documents, ledger entries and vouchers are never edited. Mistakes are corrected with reversals, so the original record stays intact for audits.

A repeated request only counts once

Network retries, double clicks and concurrent users can't ship or collect twice. Each request is applied exactly once.

Period close and separation of duties

Closing checks for unfinished documents first. Receipts, payments, refunds, reversals and vouchers each need a second person to review.

Eight reconciliation checks

Inventory, cost, reservations, cash, receivables and payables, vouchers, ledgers and periods are reconciled in automated tests and release rehearsals. The difference must be zero.

12
Business modules
1,000+
Automated tests
98
Versioned database migrations
68
Design and user docs
AI · optional module

An AI assistant that knows your business and respects permissions

Turn policies, manuals and know-how into a knowledge base that keeps itself up to date. Look up figures and explain documents within your own permissions. Read-only, and every answer cites its source.

01 IngestUpload documentsPDF, Word and Markdown, visible by tenant and role
02 ParseSplit by sectionKeeps the heading structure; segments can be previewed and adjusted
03 RetrieveHybrid retrievalKeyword + vector (bge-m3), fused with RRF
04 RerankFilter the noisebge-reranker; passages below the threshold are dropped
05 WikiBuild topic pagesDrafted by the model, published after review, checked weekly
06 AnswerAnswer with citationsEach claim cites a source; with no source, it says so

More than RAG: an LLM Wiki that maintains itself

Plain RAG stitches an answer together from fragments every time, so the same question can get different answers. Qiheng ERP has the model organize your sources into structured, linked topic pages. Administrators review them before publishing, and answers check the Wiki first, then the original documents.

  • One answer per question: always from the same reviewed Wiki page
  • Human review: the model only drafts; admins publish, reject or archive, with full history
  • Weekly health checks: conflicting figures, stale sources, broken links and pages no one has opened in six months
  • Keeps up with sources: when a source document changes, related pages are queued for a new draft
Sales returns and refundsRevision pendingDrafted by AI · 3 passages cited

Before a refund

Posting a sales return creates a matching receivable reversal[1]. Refunds can be recorded directly.A refund must be requested first and recorded after a second finance reviewer approves it[2].

[1] Business rules · R3-14 [2] User guide · Refund requests

Ask for numbers

Read-only business tools query the ERP. Results match the reports and show when the data was pulled.

Explain a document

Ask why an order can't ship or why the period close failed, and get the reason plus where to fix it.

Customer portal assistant

Works out what a customer is asking and answers only about their own orders and statements. Anything else becomes a ticket for your team.

Permissions stay intact

Queries run as the person asking, so their permissions apply. The AI is read-only: it can't approve, post or pay.

Bring your own model

Run self-hosted open models, set per-tenant quotas and keep call logs. Models hosted outside mainland China stay off until an admin approves them.

Evaluate before you ship

A built-in evaluation set measures answer accuracy, citation accuracy and refusal rate.

Modules

12 modules, enable what you need

Warehouse operations can be turned on per warehouse. The AI assistant is deployed separately.

Sales

Order approval, stock reservation, delivery, returns and refunds

Purchasing

Requisition to PO, incoming inspection, receipts, supplier payments

Inventory & traceability

Transfers, counts, adjustments, lots, serial numbers and expiry

Warehouse operations

Putaway, wave picking, pack checks, PDA scanning

Receivables & cash

Receipts, payments, matching, aging, credit limits and collections

General ledger

Reviewed vouchers, ledgers, financial statements, period close

Manufacturing

BOMs, work orders, material issues and returns, month-end cost

CRM & customer portal

Leads, deals and contracts; customers check orders and statements themselves

Approvals & platform

Workflow designer, countersign, conditional branches, SSO, MFA

Reports & alerts

Inventory, sales and financial reports, print templates, alerts

Master data

Companies, departments, warehouses and bins, SKUs, prices

AI assistant (optional)

RAG + LLM Wiki knowledge base, data queries, document explanations

Architecture & deployment

A familiar stack that starts on one server

A modular monolith whose API and background workers can run separately. Docker Compose, systemd and Nginx templates are included.

Frontend
Vue 3TypeScriptElement PlusECharts
Mobile
uni-appH5 / Android PDA
Services
Java 21Spring Boot 4Flowable 8REST API
Data
MySQL 8.0RedisS3-compatible storage
AI (optional)
Spring AIOpenSearchSelf-hosted models
SetupSuggested starting point
Core, single host2 vCPU / 4 GiB: one ERP process serves the API and background jobs, with MySQL and Redis on the same host
With workflow, GL, etc.4 vCPU / 8 GiB: API and worker as separate processes
High availabilityTwo or more app nodes (4 vCPU / 8 GiB each), MySQL primary and replica, Redis Sentinel
With AIAI service on its own node from 2 vCPU / 4 GiB; self-hosted OpenSearch from 4 vCPU / 16 GiB; models sized separately
RuntimeLinux or Windows, JDK 21, MySQL 8.0.46, Redis 6+
ObservabilityOptional Prometheus, Grafana, OpenTelemetry, Loki

Confirm the minimum with a capacity test on your own environment and volumes. See the deployment guide (Chinese).

Security & open source

Who can see what, and who did what, all on record

Permissions are enforced on the server; hiding menus is only a convenience. The code is fully open for review.

Data scope

Checked on the server by tenant, company, warehouse, department and role.

Four-eyes review

Receipts, payments, refunds, reversals and vouchers are prepared and reviewed by different people.

Sign-in security

MFA, OIDC and LDAP single sign-on, and QR sign-in with WeCom and similar apps.

Audit trail

Key actions record before-and-after values, searchable by user and document.

Open API

Signed requests, replay protection and rate limits. Approvals and posting are not exposed.

AGPL-3.0-onlyFree to download, deploy and use inside your company
  • Read, modify and redistribute the code under the AGPL
  • If you offer a modified version over a network, publish your changes to its users
  • Keep the license and copyright notices when you redistribute
About Qiheng

A cat guarding the box,
and books that add up

柒
Qī, the formal way to write “seven” on financial documents. It's used for amounts because a stroke can't turn it into another number. Every entry in the system should hold up the same way.
衡
Héng, balance. Receipts and payments, books and stock stay in balance, and every reconciliation check has to come out to zero.

The “7” in the logo drops into an open box: goods and books, managed together. The mascot is an orange cat peeking out of that box, keeping an eye on every carton.

Get started

Two ways to run it

Install the 2.0 preview on a server, or run it from source on Windows.

Install the 2.0 preview

Download the deployment package and its SHA-256 checksum from the release page. Verify and unzip it, then set up JDK 21, MySQL 8.0.46, Redis and a reverse proxy, and create the company and administrator.

# PowerShell: compare with the value in the .sha256 file
Get-FileHash .\qiheng-erp-2.0.0-rc.1.zip -Algorithm SHA256

Run from source on Windows

You need Git, PowerShell 7, JDK 21, Maven, Node.js 24, npm and Redis, plus MySQL 8.0.46. Set DB_USERNAME and DB_PASSWORD in your shell first.

git clone --branch v2.0.0-rc.1 --single-branch https://github.com/qingyu6688/qiheng-erp.git
cd qiheng-erp
# Use your own JDK and Redis paths
pwsh -NoProfile -File ./scripts/prepare-local.ps1 -JavaHome 'D:/tools/jdk-21' -RedisDirectory 'D:/tools/redis'
npm --prefix erp-web ci

Then run pwsh -File ./scripts/project.ps1 server and pwsh -File ./scripts/project.ps1 web in two terminals and open http://127.0.0.1:5173. Sign in to tenant DEMO as admin; the initial password is ERP_DEV_ADMIN_PASSWORD in your local .env.

FAQ

Questions you may have

Can't find your answer? Open a GitHub issue with your version and the steps you took.

Open an issue
What hardware do I need?

Core purchasing, sales, inventory and cash run on a single 2 vCPU / 4 GiB host. With workflow, the general ledger and similar modules, plan for 4 vCPU / 8 GiB. The AI assistant needs its own server.

Is the interface available in English?

Not yet. The product interface and most documentation are in Simplified Chinese. The README has an English overview and setup steps.

Can I customize or extend it?

Yes. The repository includes the business rules, database and API designs, per-module design docs, an open API and webhooks. If you offer a modified version as a network service, the AGPL-3.0 applies.

How do I report a problem?

Open a GitHub issue with the version, the steps to reproduce it and the request ID shown on the page.

Try Qiheng ERP

Click around the live demo, or download the preview and run it on your own server.