larats 1.0.0 → 1.0.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.
- package/README.md +21 -11
- package/dist/index.js +851 -281
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/dist/index.cjs +0 -1744
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
> **Smart Architecture Visualizer & Contextual Module Scaffolder CLI**
|
|
4
4
|
> Tailor-made for **Laravel** & **TypeScript** (Node.js / Express / React / Monorepo) projects.
|
|
5
5
|
|
|
6
|
+
[](https://www.npmjs.com/package/larats)
|
|
7
|
+
[](https://github.com/SidiqFatuh187/Larats/actions/workflows/ci.yml)
|
|
6
8
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://nodejs.org)
|
|
8
10
|
[](https://www.typescriptlang.org/)
|
|
9
11
|
[](#-strict-security--safety-guarantees)
|
|
10
12
|
|
|
@@ -12,7 +14,7 @@
|
|
|
12
14
|
|
|
13
15
|
## 💡 What is LaraTS?
|
|
14
16
|
|
|
15
|
-
When codebases grow large, developers often struggle to understand the architecture or keep module structures consistent across teams. **LaraTS** solves this with
|
|
17
|
+
When codebases grow large, developers often struggle to understand the architecture or keep module structures consistent across teams. **LaraTS** solves this with three core pillars:
|
|
16
18
|
|
|
17
19
|
1. 🔍 **Architecture Scanner & Visualizer (`scan`)**: Instantly scans your repository, categorizes layers (Models, Controllers, Services, Actions, Filament Resources, Routes, etc.), and generates a clean `ARCHITECTURE.md` with an interactive **Mermaid.js flowchart** and directory tree.
|
|
18
20
|
2. 🏗️ **Contextual Module Scaffolder (`scaffold` / `make`)**: Quickly generates cohesive feature modules with clean, production-ready boilerplate code tailored to your exact stack (Laravel or TypeScript).
|
|
@@ -47,15 +49,15 @@ larats
|
|
|
47
49
|
## ✨ Key Features
|
|
48
50
|
|
|
49
51
|
### 1. 🔍 Auto-Detection & Safe Scanner
|
|
50
|
-
LaraTS inspects
|
|
51
|
-
- **Laravel**: Detects Laravel version, Filament Admin panel, Livewire, Inertia.js, Sanctum, and Modular architecture.
|
|
52
|
-
- **TypeScript**: Detects Express, NestJS, Fastify, Next.js, React, Prisma ORM, TypeORM, Drizzle, Monorepos, and Modular setups.
|
|
52
|
+
LaraTS safely inspects root manifest files (`package.json`, `composer.json`, `tsconfig.json`) solely to detect your framework and architectural stack, without parsing application logic or reading `.env*` secrets:
|
|
53
|
+
- **Laravel**: Detects Laravel version (10.x vs 11+), Filament Admin panel, Livewire, Inertia.js, Sanctum, and Modular architecture (`app/Modules/`, `modules/`, `Modules/`).
|
|
54
|
+
- **TypeScript**: Detects Express, NestJS, Fastify, Next.js, React, Prisma ORM, TypeORM, Drizzle, Monorepos (`apps/*/src`, `packages/*/src`), and Modular setups (`src/modules/`).
|
|
53
55
|
|
|
54
56
|
When you run `larats scan`:
|
|
55
57
|
- Indexes architectural components (Counts and samples).
|
|
56
58
|
- Builds a clean, high-level directory tree.
|
|
57
|
-
- Generates an interactive **Mermaid.js flowchart (`flowchart TD`)** showing the entire request lifecycle across layers.
|
|
58
|
-
- Outputs a
|
|
59
|
+
- Generates an interactive **Mermaid.js flowchart (`flowchart TD`)** showing the entire request lifecycle across layers, dynamically adapting to CLI applications or web services.
|
|
60
|
+
- Outputs a deterministic, diff-friendly `ARCHITECTURE.md` file.
|
|
59
61
|
|
|
60
62
|
### 2. 🏗️ Contextual Module Scaffolder
|
|
61
63
|
Create new features in seconds with consistent boilerplate:
|
|
@@ -88,10 +90,10 @@ LaraTS will **NEVER** silently overwrite your existing code. If a target file al
|
|
|
88
90
|
LaraTS was engineered from the ground up for strict security:
|
|
89
91
|
- **100% Offline & Local**: Zero network calls, telemetry, or third-party tracking.
|
|
90
92
|
- **Strict Ignore List (`SAFE_IGNORE_LIST`)**:
|
|
91
|
-
- Never reads or includes `**/node_modules/**`, `**/vendor/**`, `**/.git/**`, `**/storage/**`, `**/dist/**`,
|
|
92
|
-
- Never
|
|
93
|
-
- Never indexes lock/log files: `**/*.log`, `**/*.lock`, `package-lock.json`, `pnpm-lock.yaml`, `composer.lock`.
|
|
94
|
-
- **
|
|
93
|
+
- Never reads or includes `**/node_modules/**`, `**/vendor/**`, `**/.git/**`, `**/storage/**`, `**/dist/**`, `build/**`, `out/**`, `tmp/**`.
|
|
94
|
+
- Never touches keys or cloud secrets: `**/.env*`, `**/*.pem`, `**/*.key`, `**/*.p12`, `**/*.jks`, `**/*.keystore`, `**/.aws/**`, `**/.ssh/**`, `**/secrets/**`, `**/credentials*.json`, `**/*service-account*.json`, `**/id_rsa*`, `**/id_ed25519*`, `**/id_ecdsa*`.
|
|
95
|
+
- Never indexes lock/log files: `**/*.log`, `**/*.lock`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `composer.lock`.
|
|
96
|
+
- **Manifest & Structure Only**: Scanner safely inspects package manifests (`package.json`, `composer.json`) solely to identify framework and ORM types, and relative file paths to categorize layers. It never reads private configuration values, `.env*` secrets, or internal application logic.
|
|
95
97
|
|
|
96
98
|
---
|
|
97
99
|
|
|
@@ -133,6 +135,14 @@ larats scaffold Order --dry-run
|
|
|
133
135
|
|
|
134
136
|
---
|
|
135
137
|
|
|
138
|
+
## ⚠️ Limitations & Notes
|
|
139
|
+
|
|
140
|
+
- **Express Boilerplate**: For TypeScript projects, the scaffolder generates Express-compatible controllers and routers. If using NestJS, Fastify, or Next.js, use the generated domain logic (DTOs, Repositories, Services) and adapt HTTP routing accordingly.
|
|
141
|
+
- **Route Registration**: LaraTS does not automatically alter your main entrypoint files (`routes/api.php`, `src/app.ts`). Recommended mounting code is displayed in next steps upon scaffold completion.
|
|
142
|
+
- **Conventions**: Module and component detection relies on standard industry conventions (`app/Modules/`, `src/modules/`, `apps/*/src/`, etc.). Non-standard custom layouts may fall back to generic source classification.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
136
146
|
## 🛠️ Development & Contributing
|
|
137
147
|
|
|
138
148
|
```bash
|