@ahmadubaidillah/core 1.1.0
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.
- package/README.md +63 -0
- package/dist/index.js +26845 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @ahmadubaidillah/core ⚙️
|
|
2
|
+
|
|
3
|
+
The core engine and shared utilities for the **DevForge** ecosystem. This package contains the scaffolding logic, plugin installer, and the RTK-AI efficiency layer.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
|
|
7
|
+
- **Scaffolding Engine**: Programmatic API to generate projects from templates.
|
|
8
|
+
- **Plugin Installer**: Modular injection system for Hono, Drizzle, and more.
|
|
9
|
+
- **RTK-Filter**: Intelligence layer to compress code context for AI agents.
|
|
10
|
+
- **Token Tracker**: Metrics and analytics for LLM cost savings.
|
|
11
|
+
- **Doctor**: Architectural health checks and validation patterns.
|
|
12
|
+
|
|
13
|
+
## 🛠 Usage
|
|
14
|
+
|
|
15
|
+
This package is intended for internal use by `@ahmadubaidillah/cli` or for developers building custom wrappers around the DevForge engine.
|
|
16
|
+
|
|
17
|
+
### Programmatic Scaffolding
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { scaffold } from "@ahmadubaidillah/core";
|
|
21
|
+
|
|
22
|
+
await scaffold({
|
|
23
|
+
projectName: "my-app",
|
|
24
|
+
templateName: "saas",
|
|
25
|
+
targetDir: "./my-app",
|
|
26
|
+
plugins: ["auth", "stripe"],
|
|
27
|
+
withAgents: true,
|
|
28
|
+
agentKey: "YOUR_KEY",
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Context Filtering
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { RTKFilter, FilterLevel, Language } from "@ahmadubaidillah/core";
|
|
36
|
+
|
|
37
|
+
const compressed = RTKFilter.filter(
|
|
38
|
+
rawCode,
|
|
39
|
+
Language.TypeScript,
|
|
40
|
+
FilterLevel.Aggressive,
|
|
41
|
+
);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 🏗 Architecture
|
|
45
|
+
|
|
46
|
+
The core is divided into several key modules:
|
|
47
|
+
|
|
48
|
+
- `engine/`: Handles template loading, variable interpolation, and file composition.
|
|
49
|
+
- `utils/`: Includes the `TokenTracker`, `RTKFilter`, and `MigrationResolver`.
|
|
50
|
+
- `plugins/`: Logic for modular feature injection.
|
|
51
|
+
- `ui/`: Shared branding and design tokens for DevForge-generated apps.
|
|
52
|
+
|
|
53
|
+
## 🤝 Contributing
|
|
54
|
+
|
|
55
|
+
When modifying the core:
|
|
56
|
+
|
|
57
|
+
1. Ensure all logic is **language-agnostic** where possible.
|
|
58
|
+
2. Follow **Separation of Concerns** (keep engine logic out of utils).
|
|
59
|
+
3. Use **Zod** for all boundary validations.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
**The engine behind professional-grade agentic applications.**
|