@adriankulik/create-fullstack-app 1.4.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,5 +1,8 @@
|
|
|
1
1
|
# create-fullstack-app
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@adriankulik/create-fullstack-app)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
A CLI tool for scaffolding a full-stack web application with your choice of frontend and backend technologies. The generated projects use `npm ci` and pinned Python dependencies to ensure fully deterministic and reproducible installations.
|
|
4
7
|
|
|
5
8
|
## Prerequisites
|
|
@@ -8,7 +11,8 @@ Before running the CLI or the scaffolded applications, ensure you have the follo
|
|
|
8
11
|
|
|
9
12
|
- **Node.js**: v20 or newer
|
|
10
13
|
- **npm**: v10 or newer
|
|
11
|
-
- **Python**: v3.11 or newer
|
|
14
|
+
- **Python**: v3.11 or newer _(only required for FastAPI / Flask backends)_
|
|
15
|
+
- **[.NET 9 SDK](https://aka.ms/dotnet/download)** _(only required for the .NET backend — the CLI will offer to install it automatically on macOS/Linux if not found)_
|
|
12
16
|
|
|
13
17
|
## Quickstart
|
|
14
18
|
|
|
@@ -32,13 +36,12 @@ You will be prompted to choose a project name, your preferred frontend, and back
|
|
|
32
36
|
- **Backend Options**:
|
|
33
37
|
- FastAPI (v0.136.1)
|
|
34
38
|
- Flask (v3.1.3)
|
|
35
|
-
- .NET (
|
|
36
|
-
- Node.js Express (v4.
|
|
37
|
-
- Rust Rocket (v0.5.0)
|
|
39
|
+
- .NET (v9.0.16)
|
|
40
|
+
- Node.js Express (v4.22.2)
|
|
38
41
|
- **Opinionated Defaults**: We bake in sensible, predefined choices (e.g., Angular uses `zone.js`, testing is unified under Playwright and framework-native test runners).
|
|
39
42
|
- **Unified Scripts**: `start.sh`, `test.sh`, and `lint.sh` available out of the box to manage both frontend and backend seamlessly.
|
|
40
43
|
- **CI/CD Ready**: Includes a pre-configured `.github/workflows/cli-e2e.yml` that tests both ends. _Tip: To enforce this, enable branch protection in your GitHub repository settings and require the "test" status check to pass._
|
|
41
|
-
- **Developer Experience**: Includes `.vscode/extensions.json` recommending the necessary linters and formatters, and an `AGENTS.md` file providing behavioral guidelines for AI agents
|
|
44
|
+
- **Developer Experience**: Includes `.vscode/extensions.json` recommending the necessary linters and formatters, and an `AGENTS.md` file providing behavioral guidelines for AI agents. It is AI development friendly, including an extensive set of agent skills in `.agents/skills`.
|
|
42
45
|
<details>
|
|
43
46
|
<summary>Included Agent Skills</summary>
|
|
44
47
|
<p>senior-frontend, senior-qa, senior-fullstack, accessibility-general</p>
|
|
@@ -89,6 +92,8 @@ Then run it:
|
|
|
89
92
|
Future plans for this CLI include:
|
|
90
93
|
|
|
91
94
|
- Adding frontend framework-specific component libraries during the scaffold step.
|
|
95
|
+
- **Spring Boot** backend support (Java, enterprise-ready framework).
|
|
96
|
+
- **Rust (Rocket)** backend support (web framework for Rust with focus on ease of use).
|
|
92
97
|
|
|
93
98
|
## Acknowledgements
|
|
94
99
|
|
|
@@ -102,4 +107,9 @@ This project redistributes boilerplate code and configuration files generated by
|
|
|
102
107
|
- [Flask](https://flask.palletsprojects.com/) (BSD 3-Clause License)
|
|
103
108
|
- [.NET](https://dotnet.microsoft.com/) (MIT License)
|
|
104
109
|
- [Express](https://expressjs.com/) (MIT License)
|
|
105
|
-
|
|
110
|
+
|
|
111
|
+
## References
|
|
112
|
+
|
|
113
|
+
- [Shields.io](https://shields.io/badges)
|
|
114
|
+
- [andrej-karpathy-skills](https://github.com/forrestchang/andrej-karpathy-skills)
|
|
115
|
+
- [claude-skills](https://github.com/alirezarezvani/claude-skills)
|
package/cli/index.js
CHANGED
|
@@ -4,6 +4,7 @@ const prompts = require("prompts");
|
|
|
4
4
|
const pc = require("picocolors");
|
|
5
5
|
const fs = require("fs-extra");
|
|
6
6
|
const path = require("path");
|
|
7
|
+
const os = require("os");
|
|
7
8
|
const { execSync } = require("child_process");
|
|
8
9
|
|
|
9
10
|
async function main() {
|
|
@@ -82,21 +83,11 @@ async function main() {
|
|
|
82
83
|
value: "dotnet",
|
|
83
84
|
description: "Robust, C#, high-performance framework by Microsoft",
|
|
84
85
|
},
|
|
85
|
-
{
|
|
86
|
-
title: "Spring Boot",
|
|
87
|
-
value: "spring-boot",
|
|
88
|
-
description: "Powerful, Java, enterprise-ready framework",
|
|
89
|
-
},
|
|
90
86
|
{
|
|
91
87
|
title: "Node.js (Express)",
|
|
92
88
|
value: "nodejs",
|
|
93
89
|
description: "Minimalist web framework for Node.js",
|
|
94
90
|
},
|
|
95
|
-
{
|
|
96
|
-
title: "Rust (Rocket)",
|
|
97
|
-
value: "rust",
|
|
98
|
-
description: "Web framework for Rust with focus on ease of use",
|
|
99
|
-
}
|
|
100
91
|
],
|
|
101
92
|
initial: 0,
|
|
102
93
|
});
|
|
@@ -203,27 +194,63 @@ async function main() {
|
|
|
203
194
|
);
|
|
204
195
|
}
|
|
205
196
|
} else if (backend === "dotnet") {
|
|
197
|
+
// Check if .NET 9+ SDK is available
|
|
198
|
+
let dotnetMajor = 0;
|
|
199
|
+
try {
|
|
200
|
+
const version = execSync("dotnet --version", { stdio: "pipe" }).toString().trim();
|
|
201
|
+
dotnetMajor = parseInt(version.split(".")[0], 10);
|
|
202
|
+
} catch {
|
|
203
|
+
dotnetMajor = 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (dotnetMajor < 9) {
|
|
207
|
+
console.log(pc.yellow(`\n .NET 9 SDK is required but ${dotnetMajor > 0 ? `v${dotnetMajor} was found` : "dotnet was not found"} on your system.`));
|
|
208
|
+
|
|
209
|
+
if (process.platform === "win32") {
|
|
210
|
+
console.log(pc.yellow(" Please install the .NET 9 SDK from: https://aka.ms/dotnet/download"));
|
|
211
|
+
} else {
|
|
212
|
+
const { installDotnet } = await prompts({
|
|
213
|
+
type: "confirm",
|
|
214
|
+
name: "installDotnet",
|
|
215
|
+
message: "Would you like to install the .NET 9 SDK automatically? (uses the official Microsoft install script)",
|
|
216
|
+
initial: true,
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
if (installDotnet) {
|
|
220
|
+
console.log(pc.cyan(" Installing .NET 9 SDK (this may take a few minutes)..."));
|
|
221
|
+
try {
|
|
222
|
+
execSync(
|
|
223
|
+
"curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 9.0",
|
|
224
|
+
{ stdio: "inherit" }
|
|
225
|
+
);
|
|
226
|
+
// Make the newly installed dotnet available in the current process without a shell restart
|
|
227
|
+
const dotnetRoot = path.join(os.homedir(), ".dotnet");
|
|
228
|
+
process.env.DOTNET_ROOT = dotnetRoot;
|
|
229
|
+
process.env.PATH = `${dotnetRoot}:${process.env.PATH}`;
|
|
230
|
+
console.log(pc.green(" .NET 9 SDK installed successfully."));
|
|
231
|
+
console.log(pc.yellow(` Add ${dotnetRoot} to your PATH permanently by updating your shell profile (e.g. ~/.zshrc).`));
|
|
232
|
+
} catch (e) {
|
|
233
|
+
console.log(pc.yellow(" Could not install .NET SDK automatically. Please install it from https://aka.ms/dotnet/download"));
|
|
234
|
+
}
|
|
235
|
+
} else {
|
|
236
|
+
console.log(pc.yellow(" Skipping .NET SDK installation. Please install .NET 9 SDK from https://aka.ms/dotnet/download"));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
206
241
|
console.log(pc.cyan(" Restoring .NET dependencies..."));
|
|
207
242
|
try {
|
|
208
243
|
execSync("dotnet restore backend.sln", { cwd: targetBackend, stdio: "inherit" });
|
|
209
244
|
} catch (e) {
|
|
210
245
|
console.log(
|
|
211
246
|
pc.yellow(
|
|
212
|
-
" Could not restore .NET dependencies automatically. Please make sure .NET SDK is installed.",
|
|
247
|
+
" Could not restore .NET dependencies automatically. Please make sure .NET 9 SDK is installed and in your PATH.",
|
|
213
248
|
),
|
|
214
249
|
);
|
|
215
250
|
}
|
|
216
|
-
} else if (backend === "spring-boot") {
|
|
217
|
-
console.log(
|
|
218
|
-
pc.cyan(
|
|
219
|
-
" Spring Boot project created. Dependencies will be downloaded via Maven wrapper on first run.",
|
|
220
|
-
),
|
|
221
|
-
);
|
|
222
251
|
} else if (backend === "nodejs") {
|
|
223
252
|
console.log(pc.cyan(" Installing Node.js backend dependencies..."));
|
|
224
253
|
execSync("npm ci", { cwd: targetBackend, stdio: "inherit" });
|
|
225
|
-
} else if (backend === "rust") {
|
|
226
|
-
console.log(pc.cyan(" Rust backend created. Cargo will manage dependencies automatically on first run."));
|
|
227
254
|
}
|
|
228
255
|
|
|
229
256
|
// 7. Initialize Git repository
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
2
|
|
|
3
3
|
<PropertyGroup>
|
|
4
|
-
<TargetFramework>
|
|
4
|
+
<TargetFramework>net9.0</TargetFramework>
|
|
5
5
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
6
6
|
<Nullable>enable</Nullable>
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</PropertyGroup>
|
|
11
11
|
|
|
12
12
|
<ItemGroup>
|
|
13
|
-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="
|
|
13
|
+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
|
|
14
14
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
|
|
15
15
|
<PackageReference Include="xunit" Version="2.4.2" />
|
|
16
16
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
2
2
|
|
|
3
3
|
<PropertyGroup>
|
|
4
|
-
<TargetFramework>
|
|
4
|
+
<TargetFramework>net9.0</TargetFramework>
|
|
5
5
|
<Nullable>enable</Nullable>
|
|
6
6
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
7
7
|
<InvariantGlobalization>true</InvariantGlobalization>
|