Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Platform

Reference

Shared server routes

The routes in src/cluster_erp/server/routes that belong to no module, the routes defined inline in server/app.py, when each is mounted, and the core service behind each.

Most HTTP routes of Cluster ERP belong to a module and live under /api/v1/<module>. A smaller set lives in the server itself: ten route files in src/cluster_erp/server/routes/ and seven routes defined inline in create_app. This page lists them, says when each is mounted, and names the core code behind each. Request and response schemas of every route are documented in server routes and system endpoints.

Scope and source

  • Defined in: src/cluster_erp/server/routes/*.py, src/cluster_erp/server/app.py
  • Count: 10 route files with 68 route decorators (counted with grep -c -E '@(router|overlay_router)\.(get|post|put|patch|delete)\(' per file), and 7 inline routes in create_app (counted from the @app.get decorators, src/cluster_erp/server/app.py:1450-1571)

Route files

File Prefix Routes Mounted Core service or target Source
notes.py /api/v1/notes 6 always core/notes.py src/cluster_erp/server/routes/notes.py:14, src/cluster_erp/server/app.py:1432
party_composite.py /api/v1/parties 1 always Services of parties, crm, owned_organisations, procurement src/cluster_erp/server/routes/party_composite.py:27, src/cluster_erp/server/app.py:1433
party_roles.py /api/v1/parties 3 always Facet services for customer, supplier, and employee src/cluster_erp/server/routes/party_roles.py:31, src/cluster_erp/server/app.py:1434
tenant_fields.py (router) /api/v1/{module}/_fields 17 always core/tenant_fields.py src/cluster_erp/server/routes/tenant_fields.py:42, src/cluster_erp/server/app.py:1435
tenant_fields.py (overlay_router) /api/v1 1 always core/tenant_fields.py src/cluster_erp/server/routes/tenant_fields.py:43, src/cluster_erp/server/app.py:1436
attachments.py /api/v1/attachments 8 always core/attachments.py, core/storage.py, core/upload_policy.py src/cluster_erp/server/routes/attachments.py:27, src/cluster_erp/server/app.py:1437
email.py /api/v1/email 3 always core/system_mail.py, server/services/record_formatter.py src/cluster_erp/server/routes/email.py:22, src/cluster_erp/server/app.py:1438
chat.py /api/v1/chat 1 always ai/intent_engine.py src/cluster_erp/server/routes/chat.py:23, src/cluster_erp/server/app.py:1439
signup.py /api/v1/signup 6 multi-tenant mode only server/signup.py src/cluster_erp/server/routes/signup.py:39, src/cluster_erp/server/app.py:1440-1447
vendor.py /api/v1/vendor 15 multi-tenant mode only server/operators.py, core/tenancy.py src/cluster_erp/server/routes/vendor.py:68-70, src/cluster_erp/server/app.py:1448-1450
currencies.py none; included by the currencies module under /api/v1/currencies 7 when the currencies module loads core/currencies.py src/cluster_erp/server/routes/currencies.py:18, src/cluster_erp/modules/currencies/module.py:74-82

The pages that explain each group:

Notes on individual files

  • POST /api/v1/parties/composite creates a party and the role facets chosen in one form in a single transaction. It requires party.create (src/cluster_erp/server/routes/party_composite.py:1-9, src/cluster_erp/server/routes/party_composite.py:54-60).
  • party_roles.py adds POST /api/v1/parties/{party_id}/roles/customer, /supplier, and /employee, requiring customer.create, supplier.create, and employee.create. Removing a role is the facet's own deactivation, not a route here (src/cluster_erp/server/routes/party_roles.py:1-14, src/cluster_erp/server/routes/party_roles.py:58-106).
  • POST /api/v1/chat/message requires dashboard.read. The intent engine is loaded once per process on first use (src/cluster_erp/server/routes/chat.py:24-34, src/cluster_erp/server/routes/chat.py:1191-1197).
  • The vendor router accepts only operator tokens, not tenant tokens, and serves its screens as metadata from GET /api/v1/vendor/_meta (src/cluster_erp/server/routes/vendor.py:1-16, src/cluster_erp/server/routes/vendor.py:149).

Inline routes in create_app

Method and path Access Purpose Source
GET /api/v1/signup/ public, single-tenant mode only Answers {"signup": "closed"} so the login screen shows no signup door src/cluster_erp/server/app.py:1451-1457
GET /.well-known/security.txt public Security contact document; 404 when security_contact is empty src/cluster_erp/server/app.py:1459-1466
GET /health public Liveness: {"status": "healthy", "version":...} with no external check src/cluster_erp/server/app.py:1468-1473
GET /ready public Readiness: asks each database one trivial question within readiness_timeout_seconds; 200 or 503, naming each check src/cluster_erp/server/app.py:1475-1504
GET /api/v1/modules signed-in Name, version, and description of every loaded module src/cluster_erp/server/app.py:1507-1516
GET /api/v1/_meta signed-in The metadata document of all modules src/cluster_erp/server/app.py:1518-1556
GET /api/v1/_switches signed-in The tenant's display switches, merged from DescribeDisplaySwitches answers src/cluster_erp/server/app.py:1558-1572

include_in_schema=False hides the signup and security.txt routes from the OpenAPI schema (src/cluster_erp/server/app.py:1455, src/cluster_erp/server/app.py:1459). The API documentation pages exist only in debug mode (src/cluster_erp/server/app.py:1300-1301). Readiness and security.txt are documented in security.txt and readiness.

Constraints and validation

  • Server routes import module code; module code may not import other modules (tests/test_architecture_boundaries.py:46-57). The boundary test checks only files under src/cluster_erp/modules.

Terms introduced

Term Code identifier Definition Turkish term Source
shared route server/routes An HTTP route defined by the server rather than by a module. ortak rota src/cluster_erp/server/app.py:1432-1450
readiness probe /ready The route /ready that says whether the process may take traffic, by asking each store one question. hazırlık yoklaması src/cluster_erp/server/app.py:1475

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13