@bayajidalam/apollo-cli 1.0.0 → 1.0.1

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 +34 -61
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,97 +1,70 @@
1
- # Apollo CLI
1
+ # Apollo Gears CLI
2
2
 
3
- A CLI tool for scaffolding and managing Apollo backend projects (Express + TypeScript + Prisma + PostgreSQL).
3
+ A powerful CLI tool for scaffolding and managing **Apollo Gears** backend projects (Express + TypeScript + Prisma + PostgreSQL).
4
4
 
5
5
  ## Installation
6
6
 
7
- ### Global Installation
8
-
9
- To install the CLI globally:
7
+ Install the CLI globally via npm:
10
8
 
11
9
  ```bash
12
- npm install -g apollo-cli
10
+ npm install -g @bayajidalam/apollo-cli
13
11
  ```
14
12
 
15
- ### Local Development Setup
13
+ ## Usage
14
+
15
+ ### 1. Initialize a New Project
16
16
 
17
- If you are developing this tool locally and want to test it:
17
+ Create a complete backend project structure with Express, Prisma, and TypeScript configured.
18
18
 
19
- 1. **Build the CLI**:
20
- ```bash
21
- npm run build
22
- ```
19
+ ```bash
20
+ apollo-cli init my-new-project
21
+ ```
23
22
 
24
- 2. **Link it globally**:
25
- ```bash
26
- npm link
27
- ```
28
- This makes the `apollo-cli` command available in your terminal.
23
+ ### 2. Generate Modules
29
24
 
30
- ## Usage
25
+ Scaffold a new module (Controller, Service, Route, Interface, Validation, Constants) instantly.
31
26
 
32
- ### 1. `generate` (alias: `g`)
27
+ **Alias**: `g`
33
28
 
34
- Generates a new module structure including controller, service, route, interface, validation, and constants.
29
+ **Important:** You must run this command *inside* your project directory.
35
30
 
36
- **Syntax:**
37
31
  ```bash
38
- apollo-cli generate module <ModuleName>
39
- # OR
40
- apollo-cli g module <ModuleName>
41
- ```
32
+ cd my-new-project
33
+ # Using full command
34
+ apollo-cli generate module User
42
35
 
43
- **Example:**
44
- Generate a `User` module:
45
- ```bash
36
+ # Using alias
46
37
  apollo-cli g module User
47
38
  ```
48
39
 
49
- This will create the following files in `src/app/modules/User`:
50
- - `user.controller.ts`
51
- - `user.service.ts`
52
- - `user.route.ts`
53
- - `user.interface.ts`
54
- - `user.validation.ts`
55
- - `user.constant.ts`
40
+ This will create `src/app/modules/User` with:
41
+ - `user.controller.ts`: Request handlers
42
+ - `user.service.ts`: Business logic
43
+ - `user.route.ts`: Express routes
44
+ - `user.interface.ts`: TypeScript interfaces
45
+ - `user.validation.ts`: Zod validation schemas
46
+ - `user.constant.ts`: Module constants
56
47
 
57
- ### 2. `build`
48
+ ### 3. Build for Production
58
49
 
59
- Builds the application for production deployment.
50
+ Builds your TypeScript application to the `dist` folder.
60
51
 
61
- **Syntax:**
62
52
  ```bash
63
53
  apollo-cli build
64
54
  ```
65
55
 
66
- **What it does:**
67
- - Cleans the `dist` folder.
68
- - Compiles TypeScript files.
69
- - Copies `package.json`, `package-lock.json`, and `.env` to the `dist` folder.
56
+ ### 4. Prisma Utilities
70
57
 
71
- ### 3. `prisma`
58
+ Convenient wrappers for common Prisma commands.
72
59
 
73
- Helper commands for Prisma ORM.
74
-
75
- **Generate Client:**
76
60
  ```bash
61
+ # Generate Prisma Client (runs: npx prisma generate)
77
62
  apollo-cli prisma generate
78
- ```
79
- *(Runs `npx prisma generate`)*
80
63
 
81
- **Run Migrations:**
82
- ```bash
64
+ # Run Migrations (runs: npx prisma migrate dev)
83
65
  apollo-cli prisma migrate
84
66
  ```
85
- *(Runs `npx prisma migrate dev`)*
86
-
87
- ## Development
88
67
 
89
- To run the CLI directly from source without building:
68
+ ## License
90
69
 
91
- ```bash
92
- npx ts-node src/bin/index.ts <command>
93
- ```
94
- Example:
95
- ```bash
96
- npx ts-node src/bin/index.ts generate module Product
97
- ```
70
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bayajidalam/apollo-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI tool for speed up backend projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -44,4 +44,4 @@
44
44
  "ts-node": "^10.9.2",
45
45
  "typescript": "^5.7.3"
46
46
  }
47
- }
47
+ }