@lambda-development/erp-core 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +84 -0
  2. package/package.json +10 -1
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @lambda-development/erp-core
2
+
3
+ The frontend core of **Lambda ERP**, an AI-native ERP, packaged as a library:
4
+ the app shell (sidebar + header + router), the generic document/master pages,
5
+ the chat UI, the reports, and the registries that let a customer deployment
6
+ extend or override any of it **without forking**.
7
+
8
+ - Backend companion package: **`lambda-erp`** on PyPI.
9
+ - Source, docs & changelog: <https://github.com/lambdadevelopment/lambda-erp>
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @lambda-development/erp-core
15
+ ```
16
+
17
+ Install the peer dependencies in your app:
18
+
19
+ ```bash
20
+ npm install react react-dom react-router-dom \
21
+ @tanstack/react-query @tanstack/react-table \
22
+ i18next react-i18next recharts lucide-react
23
+ ```
24
+
25
+ ## Quick start
26
+
27
+ ```ts
28
+ import {
29
+ bootstrap,
30
+ configureApiBase,
31
+ configureBranding,
32
+ } from "@lambda-development/erp-core";
33
+ import "@lambda-development/erp-core/styles.css";
34
+
35
+ configureApiBase("https://erp.acme.example/api"); // defaults to "/api"
36
+ configureBranding({ appName: "Acme ERP", logoUrl: "/acme.svg" });
37
+
38
+ // ...register your overrides (see below)...
39
+
40
+ bootstrap(); // mounts the app shell + router into #root
41
+ ```
42
+
43
+ ## Styling (Tailwind — "consumer scans source")
44
+
45
+ Your app runs Tailwind, scans the library's compiled output for classes, and
46
+ pulls the shared design tokens from the exported preset:
47
+
48
+ ```js
49
+ // tailwind.config.js
50
+ module.exports = {
51
+ presets: [require("@lambda-development/erp-core/tailwind-preset")],
52
+ content: [
53
+ "./src/**/*.{ts,tsx}",
54
+ "./node_modules/@lambda-development/erp-core/dist/**/*.js",
55
+ ],
56
+ };
57
+ ```
58
+
59
+ Import the base stylesheet once: `import "@lambda-development/erp-core/styles.css";`
60
+
61
+ ## Extending the core
62
+
63
+ Every seam is an additive registry — call it **before** `bootstrap()`:
64
+
65
+ | Export | Purpose |
66
+ |--------|---------|
67
+ | `registerDoctype(config)` | Add or override a document type's list/form schema |
68
+ | `registerRoute(route)` | Add or override a route (merge-by-path) |
69
+ | `registerNavGroup` / `registerNavItem` | Extend the sidebar |
70
+ | `registerComponent(name, Component)` | Swap a core component (e.g. the dashboard) |
71
+ | `configureBranding({ appName, logoUrl, tokens })` | App name, logo, theme tokens |
72
+ | `configureApiBase(url)` | Point the client at your backend |
73
+
74
+ Also exported: `AppShell`, `buildRoutes`, `getDoctypeConfig` /
75
+ `getAllDoctypeConfigs`, the `api` client (`request`, `ApiError`),
76
+ `AuthProvider` / `useAuth`, the `i18n` instance + `SUPPORTED_LANGUAGES`, and the
77
+ related TypeScript types (`DoctypeConfig`, `FieldDef`, `BootstrapOptions`, …).
78
+
79
+ See **[Building a customer deployment on top of the core](https://github.com/lambdadevelopment/lambda-erp/blob/master/docs/core-extension-architecture.md)**
80
+ for the full extension architecture.
81
+
82
+ ## License
83
+
84
+ MIT. See the [repository LICENSE](https://github.com/lambdadevelopment/lambda-erp/blob/master/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "@lambda-development/erp-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
+ "description": "Frontend core of Lambda ERP — app shell, document/master pages, chat UI, reports, and extension registries.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/lambdadevelopment/lambda-erp.git",
9
+ "directory": "frontend"
10
+ },
11
+ "homepage": "https://github.com/lambdadevelopment/lambda-erp#readme",
12
+ "bugs": "https://github.com/lambdadevelopment/lambda-erp/issues",
4
13
  "type": "module",
5
14
  "main": "./dist/index.js",
6
15
  "module": "./dist/index.js",