basic-react-starter 1.0.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muhammad Zain Sajid
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 ADDED
@@ -0,0 +1,32 @@
1
+ # basic-react-starter
2
+
3
+ A minimal React + TypeScript + Vite boilerplate with everything wired up and ready to go.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx basic-react-starter my-app
9
+ cd my-app
10
+ yarn install
11
+ yarn dev
12
+ ```
13
+
14
+ ## Stack
15
+
16
+ - **React 19** — UI library
17
+ - **Vite 7** — Build tool
18
+ - **TypeScript** — Type safety
19
+ - **TanStack Router** — Type-safe routing
20
+ - **TanStack Query** — Data fetching
21
+ - **Zustand** — State management
22
+ - **Tailwind v4** — Styling
23
+ - **next-themes** — Theme switching
24
+ - **Axios** — HTTP client with interceptors
25
+ - **Sonner** — Toast notifications
26
+ - **Motion** — Animations
27
+ - **shadcn/ui** — Component library
28
+ - **React Hook Form + Yup** — Form handling
29
+
30
+ ## License
31
+
32
+ MIT
package/bin/index.js ADDED
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ import { execSync } from "child_process";
3
+ import path from "path";
4
+ import fs from "fs";
5
+ import degit from "degit";
6
+
7
+ // ─── Args ─────────────────────────────────────────────────────────────────────
8
+
9
+ const projectName = process.argv[2];
10
+
11
+ if (!projectName) {
12
+ console.error("\n Usage: npx basic-react-starter <project-name>\n");
13
+ process.exit(1);
14
+ }
15
+
16
+ const targetDir = path.resolve(process.cwd(), projectName);
17
+
18
+ if (fs.existsSync(targetDir)) {
19
+ console.error(`\n Error: Directory "${projectName}" already exists.\n`);
20
+ process.exit(1);
21
+ }
22
+
23
+ // ─── Clone ────────────────────────────────────────────────────────────────────
24
+
25
+ // TODO: replace with your actual GitHub username
26
+ const GITHUB_REPO = "MuhammadZainSajid/basic-react-starter";
27
+
28
+ console.log(`\n Creating project in ./${projectName}...\n`);
29
+
30
+ const emitter = degit(GITHUB_REPO, { cache: false, force: true });
31
+
32
+ emitter.on("info", (info) => {
33
+ console.log(` ${info.message}`);
34
+ });
35
+
36
+ try {
37
+ await emitter.clone(targetDir);
38
+ } catch (err) {
39
+ console.error("\n Failed to clone template:", err.message);
40
+ process.exit(1);
41
+ }
42
+
43
+ // ─── Update package.json ──────────────────────────────────────────────────────
44
+
45
+ const pkgPath = path.join(targetDir, "package.json");
46
+
47
+ if (fs.existsSync(pkgPath)) {
48
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
49
+ pkg.name = projectName;
50
+ pkg.version = "0.0.0";
51
+ fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
52
+ }
53
+
54
+ // ─── Done ─────────────────────────────────────────────────────────────────────
55
+
56
+ console.log(`
57
+ ✔ Done! Your project is ready.
58
+
59
+ Next steps:
60
+
61
+ cd ${projectName}
62
+ yarn install
63
+ yarn dev
64
+ `);
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "basic-react-starter",
3
+ "version": "1.0.0",
4
+ "description": "A minimal React + TypeScript + Vite starter with TanStack Router, Zustand, Tailwind v4, and more.",
5
+ "type": "module",
6
+ "bin": {
7
+ "basic-react-starter": "bin/index.js"
8
+ },
9
+ "files": [
10
+ "bin"
11
+ ],
12
+ "dependencies": {
13
+ "degit": "^2.8.4"
14
+ },
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "keywords": [
19
+ "react",
20
+ "vite",
21
+ "typescript",
22
+ "tanstack-router",
23
+ "zustand",
24
+ "tailwind",
25
+ "boilerplate",
26
+ "starter"
27
+ ],
28
+ "author": "Muhammad Zain Sajid",
29
+ "license": "MIT"
30
+ }