@ereactthohir/cli 1.3.0 → 1.5.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 CHANGED
@@ -1,159 +1,40 @@
1
- # @ereactthohir/cli
1
+ # @ereactthohir/cli 🛡️
2
2
 
3
- The command line interface for the **EreactThohir** framework.
3
+ The official Command Line Interface for the **EreactThohir** framework.
4
4
 
5
- ## 🚀 Installation
5
+ ## 🚀 Features
6
6
 
7
- Install globally or use via `npx`:
7
+ - **Development Server**: `ereact dev` starts your app instantly.
8
+ - **Security**: `ereact key:generate` secures your application.
9
+ - **Scaffolding**: Rapidly generate controllers, models, migrations, and more.
10
+ - **Database**: Built-in migration and seeding management.
11
+ - **Debugging**: `ereact route:list` to visualize your application's entry points.
12
+
13
+ ## 📦 Installation
8
14
 
9
15
  ```bash
10
16
  npm install -g @ereactthohir/cli
11
17
  ```
12
18
 
13
- Or:
19
+ ## 🛠️ Usage
14
20
 
15
21
  ```bash
16
- npx @ereactthohir/cli create my-app
17
- ```
22
+ # Start development
23
+ ereact dev
18
24
 
19
- ## 🛠 Commands
25
+ # Database migrations
26
+ ereact migrate
27
+ ereact migrate:rollback
20
28
 
21
- ### Creating a New Project
29
+ # Scaffolding
30
+ ereact make:controller UserController
31
+ ereact make:model User
32
+ ereact make:migration create_users_table
22
33
 
23
- ```bash
24
- ereact create my-app
34
+ # Security
35
+ ereact key:generate
25
36
  ```
26
37
 
27
- During project creation, you'll be prompted to select:
28
-
29
- 1. **Project Type**: Mobile Native, Web App, PWA, or Fullstack
30
- 2. **Rendering Mode**: SPA, SSR, or Hybrid
31
- 3. **Database**: sawit.db, MySQL, PostgreSQL, or MongoDB
32
- 4. **UI Style**: Multiple framework options (see below)
33
- 5. **Template**: Various starter templates
34
- 6. **Optional**: Semouth authentication scaffolding
35
-
36
- ### Supported UI Frameworks
37
-
38
- The `create` command supports the following UI frameworks and CSS solutions:
39
-
40
- - **Rice UI** (default, official) - EreactThohir's official component library
41
- - **Tailwind CSS** - Utility-first CSS framework
42
- - **Bootstrap 5** - Popular responsive framework
43
- - **JokoUI** - Modern UI component library
44
- - **Material UI** - Google's Material Design for React
45
- - **Ant Design** - Enterprise-grade UI design system
46
- - **Chakra UI** - Simple and accessible component library
47
- - **Shadcn/ui** - High-quality React component collection
48
- - **None (Custom CSS)** - For custom styling setup
49
-
50
- Example with specific UI framework:
51
-
52
- ```bash
53
- ereact create my-tailwind-app # Will prompt UI style selection
54
- ```
55
-
56
- ### Scaffolding
57
- - `ereact make:controller <Name>`: Create a new controller.
58
- - `ereact make:model <Name>`: Create a new ORM model.
59
- - `ereact make:service <Name>`: Create a new business logic service.
60
- - `ereact make:screen <Name>`: Create a new UI screen.
61
- - `ereact make:component <Name>`: Create a new reusable component.
62
- - `ereact make:migration <Name>`: Create a database migration.
63
- - `ereact make:seeder <Name>`: Create a database seeder.
64
-
65
- ### Database
66
- - `ereact migrate`: Run pending migrations.
67
- - `ereact migrate:rollback`: Rollback the last migration batch.
68
- - `ereact db:seed`: Seed the database.
69
-
70
- ### Development & Build
71
- - `ereact serve`: Start the development server.
72
- - `ereact build:web`: Build for web.
73
- - `ereact build:android`: Build Android APK/AAB.
74
- - `ereact build:ios`: Build iOS IPA.
75
-
76
- ## � Available Templates
77
-
78
- When creating a new project, choose from **6 powerful and fully functional templates**:
79
-
80
- 1. **None (Blank)** - Minimal setup for complete control
81
- 2. **Mobile App Starter** - React Native with navigation and state management
82
- 3. **Admin Dashboard** - Complete admin panel with charts and user management
83
- 4. **Authentication Starter** - Full auth system with login/register
84
- 5. **Enterprise App Template** - Production-grade with RBAC and modules
85
- 6. **SaaS Template** - Subscription management and billing
86
-
87
- Each template includes:
88
- - ✅ Pre-built components and pages
89
- - ✅ API integration with Axios
90
- - ✅ State management with Zustand
91
- - ✅ TypeScript support
92
- - ✅ Automatic UI framework adaptation
93
- - ✅ Example routes and controllers
94
- - ✅ Best practice patterns
95
-
96
- **📖 For detailed information, see [TEMPLATES_GUIDE.md](./TEMPLATES_GUIDE.md)**
97
-
98
- ### Scaffolding
99
- - Bottom tab navigation with 3 screens
100
- - Home, Profile, and Settings screens
101
- - User statistics and settings management
102
- - Perfect for mobile-first applications
103
-
104
- ### 2. **Admin Dashboard**
105
- - Complete admin panel with sidebar navigation
106
- - 4 statistical cards with metrics
107
- - Animated charts for data visualization
108
- - User management table with actions
109
- - Search and filter functionality
110
-
111
- ### 3. **Authentication Starter**
112
- - Beautiful login/register forms
113
- - Form validation and error handling
114
- - Password confirmation matching
115
- - Gradient design with smooth transitions
116
- - Ready for integration with backend
117
-
118
- ### 4. **Enterprise App Template**
119
- - Workspace management dashboard
120
- - Team collaboration features
121
- - Project tracking with status updates
122
- - Quick action buttons
123
- - Workspace settings and configuration
124
-
125
- ### 5. **SaaS Template**
126
- - Subscription management interface
127
- - Billing history and invoices
128
- - Multiple pricing plans comparison
129
- - Plan upgrade/downgrade functionality
130
- - Payment status tracking
131
-
132
- ### Usage:
133
- ```bash
134
- ereact create my-app
135
- # During setup, select desired template
136
- # All templates are production-ready and fully functional
137
- ```
138
-
139
- ## 🎯 Template Features
140
-
141
- All templates include:
142
- - ✅ **Responsive Design** - Works on all devices
143
- - ✅ **Modern UI** - Clean and professional design
144
- - ✅ **React Hooks** - State management with hooks
145
- - ✅ **TypeScript Support** - Full type safety
146
- - ✅ **Real Components** - Not just stubs or placeholders
147
- - ✅ **Example Data** - Pre-populated with demo data
148
- - ✅ **Accessibility** - WCAG compliance
149
- - ✅ **Production Ready** - No additional setup needed
150
-
151
- For detailed template documentation, see [TEMPLATE_GUIDE.md](../../docs/TEMPLATE_GUIDE.md)
152
-
153
- ## �👤 Author
154
-
155
- **KangPCode (Dhafa Nazula Permadi)**
156
-
157
38
  ## 📄 License
158
39
 
159
- MIT
40
+ Licensed under the [MIT License](../../LICENSE).
@@ -0,0 +1,2 @@
1
+ export declare function about(): Promise<void>;
2
+ //# sourceMappingURL=about.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":"AAKA,wBAAsB,KAAK,kBAmE1B"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.about = about;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ const path_1 = __importDefault(require("path"));
10
+ const os_1 = __importDefault(require("os"));
11
+ async function about() {
12
+ const projectRoot = process.cwd();
13
+ const pkgPath = path_1.default.join(projectRoot, 'package.json');
14
+ const ereactPath = path_1.default.join(projectRoot, 'ereact.json');
15
+ // Premium Logo ASCII
16
+ console.log(chalk_1.default.red.bold(`
17
+ ███████╗██████╗ ███████╗ █████╗ ██████╗████████╗████████╗██╗ ██╗ ██████╗ ██╗ ██╗██╗██████╗
18
+ ██╔════╝██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██║ ██║██╔═══██╗██║ ██║██║██╔══██╗
19
+ █████╗ ██████╔╝█████╗ ███████║██║ ██║ ██║ ███████║██║ ██║███████║██║██████╔╝
20
+ ██╔══╝ ██╔══██╗██╔══╝ ██╔══██║██║ ██║ ██║ ██╔══██║██║ ██║██╔══██║██║██╔══██╗
21
+ ███████╗██║ ██║███████╗██║ ██║╚██████╗ ██║ ██║ ██║ ██║╚██████╔╝██║ ██║██║██║ ██║
22
+ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
23
+ `));
24
+ console.log(chalk_1.default.white.bold(' 🚀 EreactThohir Framework ') + chalk_1.default.cyan('v1.5.0'));
25
+ console.log(chalk_1.default.gray(' ────────────────────────────────────────────────────────────'));
26
+ // Creator Info
27
+ console.log(chalk_1.default.yellow.bold(' 👨‍💻 Creator / Pencipta:'));
28
+ console.log(` Name: ${chalk_1.default.white.bold('Dhafa Nazula Permadi')} (KangPCode)`);
29
+ console.log(` Role: ${chalk_1.default.gray('Founder & Lead Architect')}`);
30
+ console.log(` Vision: ${chalk_1.default.italic('Building the future of Enterprise TypeScript.')}`);
31
+ console.log(` Photo: ${chalk_1.default.blue.underline('https://github.com/dhafanazula.png')} (View photo online)`);
32
+ // Project Info
33
+ if (fs_extra_1.default.existsSync(pkgPath)) {
34
+ const pkg = await fs_extra_1.default.readJSON(pkgPath);
35
+ console.log('\n' + chalk_1.default.magenta.bold(' 🏗️ Project Information / Informasi Proyek:'));
36
+ console.log(` Name: ${chalk_1.default.white(pkg.name)}`);
37
+ console.log(` Version: ${chalk_1.default.white(pkg.version)}`);
38
+ console.log(` License: ${chalk_1.default.white(pkg.license || 'MIT')}`);
39
+ }
40
+ // System Info
41
+ console.log('\n' + chalk_1.default.blue.bold(' 💻 System Environment / Lingkungan Sistem:'));
42
+ console.log(` Node: ${chalk_1.default.white(process.version)}`);
43
+ console.log(` OS: ${chalk_1.default.white(os_1.default.type())} (${os_1.default.release()})`);
44
+ console.log(` Arch: ${chalk_1.default.white(process.arch)}`);
45
+ // Framework Config
46
+ if (fs_extra_1.default.existsSync(ereactPath)) {
47
+ const config = await fs_extra_1.default.readJSON(ereactPath);
48
+ console.log('\n' + chalk_1.default.green.bold(' ⚙️ Framework Configuration / Konfigurasi Framework:'));
49
+ console.log(` Template: ${chalk_1.default.white(config.template || 'Default')}`);
50
+ console.log(` UI Style: ${chalk_1.default.white(config.uiSystem || 'Official Rice UI')}`);
51
+ console.log(` Semouth: ${chalk_1.default.white(config.installSemouth ? '✅ Installed (Terinstal)' : '❌ Not Installed (Belum Terinstal)')}`);
52
+ }
53
+ console.log('\n' + chalk_1.default.cyan.bold(' ⚡ Features Enabled / Fitur Aktif:'));
54
+ const folders = [
55
+ { path: 'app/Controllers', label: 'Controllers' },
56
+ { path: 'app/Models', label: 'Models' },
57
+ { path: 'database/migrations', label: 'Migrations' },
58
+ { path: 'app/Services', label: 'Services' },
59
+ { path: 'app/Services/AI', label: 'AI Drivers' },
60
+ { path: 'app/Services/Payments', label: 'Payment Providers' }
61
+ ];
62
+ folders.forEach(item => {
63
+ const exists = fs_extra_1.default.existsSync(path_1.default.join(projectRoot, item.path));
64
+ console.log(` ${exists ? chalk_1.default.green('✔') : chalk_1.default.gray('✘')} ${item.label}`);
65
+ });
66
+ console.log('\n' + chalk_1.default.gray(' ────────────────────────────────────────────────────────────'));
67
+ console.log(chalk_1.default.gray(' [EN] Built with power and simplicity. Happy coding!'));
68
+ console.log(chalk_1.default.gray(' [ID] Dibangun dengan kekuatan dan kesederhanaan. Selamat ngoding!') + '\n');
69
+ }
70
+ //# sourceMappingURL=about.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"about.js","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":";;;;;AAKA,sBAmEC;AAxED,kDAA0B;AAC1B,wDAA0B;AAC1B,gDAAwB;AACxB,4CAAoB;AAEb,KAAK,UAAU,KAAK;IACvB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAEzD,qBAAqB;IACrB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC;;;;;;;KAO1B,CAAC,CAAC,CAAC;IAEJ,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IA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E;QACjD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE;QACvC,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,YAAY,EAAE;QACpD,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE;QAC3C,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAE;QAChD,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,mBAAmB,EAAE;KAChE,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,MAAM,GAAG,kBAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChE,OAAO,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,eAAK,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC,CAAC;IAChG,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC,CAAC;IAChF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,oEAAoE,CAAC,GAAG,IAAI,CAAC,CAAC;AACzG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAMA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,iBA8YxC"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAMA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,iBAkVxC"}