express-project-init 1.1.0 → 1.2.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Raunak Ray
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,35 +1,42 @@
1
- # ExpressKit
2
-
3
- **Scaffold a clean Express API in seconds — JavaScript or TypeScript.**
4
-
5
- [![Watch the ExpressKit demo](docs/demo.jpg)](docs/demo.mp4)
6
-
7
- ExpressKit asks a few quick questions, then writes a ready-to-run Express 5 project. Choose JavaScript or TypeScript, optionally add centralized error handling, pick your linter and formatter, and start building.
1
+ # express-project-init
2
+
3
+ Set up a clean Express 5 API in seconds. Pick JavaScript or TypeScript, your linter, and your formatter. Then run it.
4
+
5
+ <p align="center">
6
+ <video
7
+ src="https://cdn.jsdelivr.net/gh/raunak-ray/ExpressKit@main/docs/express-project-init-v1.1.0-demo.mp4"
8
+ poster="https://cdn.jsdelivr.net/gh/raunak-ray/ExpressKit@main/docs/express-project-init-v1.1.0-demo.jpg"
9
+ autoplay
10
+ muted
11
+ loop
12
+ playsinline
13
+ controls
14
+ width="100%"
15
+ >
16
+ <img
17
+ src="https://cdn.jsdelivr.net/gh/raunak-ray/ExpressKit@main/docs/express-project-init-v1.1.0-demo.gif"
18
+ alt="express-project-init demo"
19
+ width="100%"
20
+ />
21
+ </video>
22
+ </p>
8
23
 
9
24
  ## Quick start
10
25
 
11
- Requires **Node.js 20+**.
12
-
13
- ```bash
14
- npm create expresskit@latest
15
- ```
16
-
17
- Or run it directly:
26
+ Requires Node.js 20 or newer.
18
27
 
19
28
  ```bash
20
- npx create-expresskit@latest
29
+ npx express-project-init@latest
21
30
  ```
22
31
 
23
- Answer the prompts:
32
+ It asks six quick questions:
24
33
 
25
- ```text
26
- ? Project name › my-api
27
- ? Language › TypeScript
28
- ? Create central error handling middleware? › Yes
29
- ? Which linter would you like to use? › ESLint
30
- ? Which formatter would you like to use? › Prettier
31
- ? Install dependencies? › Yes
32
- ```
34
+ 1. Project name
35
+ 2. JavaScript or TypeScript
36
+ 3. Central error handling
37
+ 4. Linter
38
+ 5. Formatter
39
+ 6. Install dependencies
33
40
 
34
41
  Then:
35
42
 
@@ -40,102 +47,45 @@ npm run dev
40
47
 
41
48
  Open <http://localhost:3000/health>.
42
49
 
43
- Use `.` at the project name prompt to scaffold in the current directory. ExpressKit will not overwrite existing files.
50
+ Use `.` as the project name to set up in the current folder. Existing files are never overwritten.
44
51
 
45
52
  ## What you get
46
53
 
47
- ```text
48
- my-api/
49
- ├── package.json
50
- ├── tsconfig.json # TypeScript only
51
- ├── eslint.config.js # with ESLint
52
- ├── .oxlintrc.json # with Oxlint
53
- ├── biome.json # with Biome (linter, formatter, or both)
54
- ├── .prettierrc # with Prettier
55
- ├── .prettierignore # with Prettier
56
- └── src/
57
- ├── server.ts
58
- ├── app.ts
59
- ├── middleware/ # with the optional error handler
60
- │ ├── error.middleware.ts
61
- │ └── notFound.middleware.ts
62
- └── utils/
63
- ├── helpers.ts
64
- ├── responseHelpers.ts
65
- └── AppError.ts # with the optional error handler
66
- ```
67
-
68
- JavaScript projects use the same layout with `.js` files and no `tsconfig.json`.
69
-
70
- ### Scripts
71
-
72
- | Command | Provider | Description |
73
- | --- | --- | --- |
74
- | `npm run dev` | Core | Start development server with file watching |
75
- | `npm start` | Core | Run the application |
76
- | `npm run typecheck` | Core (TS) | Run TypeScript compiler checks (`tsc --noEmit`) |
77
- | `npm run lint` | ESLint / Biome / Oxlint | Lint source files |
78
- | `npm run lint:fix` | ESLint / Biome / Oxlint | Auto-fix linting issues |
79
- | `npm run format` | Prettier / Biome | Format source files |
80
- | `npm run format:check` | Prettier / Biome | Check source files for formatting issues |
81
- | `npm run check` | Biome (both) | Run formatting check, import sorting, and linting |
54
+ - A small Express 5 API with a `/health` route
55
+ - JavaScript or TypeScript
56
+ - Optional central error handling with one response format
57
+ - ESLint, Biome, or Oxlint
58
+ - Prettier or Biome
59
+ - Real config files, dependencies, and npm scripts
60
+ - Dependencies installed for you, if you want
82
61
 
83
- ## Linters and formatters
62
+ TypeScript projects also get `tsconfig.json` and `npm run typecheck`.
84
63
 
85
- ExpressKit supports modern, lightning-fast linting and formatting tools:
64
+ ## Scripts
86
65
 
87
- - **Linters**:
88
- - **ESLint**: Industry-standard linter configured with ESLint 9+ flat config (`eslint.config.js`), Node globals, and TypeScript support via `typescript-eslint`.
89
- - **Biome**: Rust-powered linter with instant feedback and safe fixes.
90
- - **Oxlint**: High-speed Rust-based linter from the OXC project with `.oxlintrc.json`.
91
- - **None**: Skip linter setup.
66
+ The scripts you get depend on your choices.
92
67
 
93
- - **Formatters**:
94
- - **Prettier**: Opinionated code formatter with `.prettierrc` and `.prettierignore`.
95
- - **Biome**: High-performance code formatter configured with 2-space indentation.
96
- - **None**: Skip formatter setup.
68
+ | Command | What it does |
69
+ | --- | --- |
70
+ | `npm run dev` | Start the API and watch for changes |
71
+ | `npm start` | Run the API |
72
+ | `npm run lint` | Check your code |
73
+ | `npm run format` | Format your code |
74
+ | `npm run typecheck` | Check TypeScript types |
97
75
 
98
- ### Tool combinations
99
-
100
- - **Biome for both linting & formatting**: Generates a unified `biome.json` with both features enabled, plus `lint`, `lint:fix`, `format`, `format:check`, and `check` scripts.
101
- - **ESLint + Prettier**: Automatically installs and configures `eslint-config-prettier` to disable ESLint rules that might conflict with Prettier.
102
-
103
- ## Error handling
104
-
105
- With the error handler enabled, throw `BadRequestError`, `UnauthorizedError`, or `NotFoundError` from any route and one middleware formats the response:
106
-
107
- ```json
108
- {
109
- "success": false,
110
- "message": "Route not found",
111
- "code": "NOT_FOUND"
112
- }
113
- ```
114
-
115
- Successful responses use the same envelope with `success: true` and `data`.
116
-
117
- ## How it works
118
-
119
- Projects are assembled from a base template plus optional feature and tool layers. Feature and tool files replace base files at the same path, and `package.json` fragments are merged into the base manifest.
120
-
121
- ## Local development
122
-
123
- ```bash
124
- npm install
125
- npm run build
126
- npm link
127
- ```
76
+ ## Publish
128
77
 
129
- Then, in a separate directory:
78
+ Commit your changes first. If this version is already on npm, bump it with `npm version patch` before publishing.
130
79
 
131
80
  ```bash
132
- mkdir -p /tmp/expresskit-test
133
- cd /tmp/expresskit-test
134
- create-expresskit
81
+ npm login
82
+ npm pack --dry-run # check what goes into the package
83
+ npm publish
84
+ npm view express-project-init version
135
85
  ```
136
86
 
137
- Rebuild with `npm run build` after changing `src/`; the linked command picks up the new `dist/` automatically. Remove the global link with `npm unlink -g create-expresskit`.
87
+ `npm publish` builds the package first.
138
88
 
139
89
  ## License
140
90
 
141
- MIT
91
+ [MIT](LICENSE.md) © 2026 Raunak Ray
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-project-init",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Create production-ready Express.js API projects with JavaScript or TypeScript using clean, reusable starter templates.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,7 +11,10 @@
11
11
  "dist",
12
12
  "templates",
13
13
  "README.md",
14
- "LICENSE"
14
+ "LICENSE.md",
15
+ "docs/express-project-init-v1.1.0-demo.mp4",
16
+ "docs/express-project-init-v1.1.0-demo.jpg",
17
+ "docs/express-project-init-v1.1.0-demo.gif"
15
18
  ],
16
19
  "engines": {
17
20
  "node": ">=20"