create-nizam-app 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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +153 -0
  3. package/dist/__main__.js +3196 -0
  4. package/dist/templates/NIZAM_DOC.template +10 -0
  5. package/dist/templates/env.template +1 -0
  6. package/dist/templates/react/css/bootstrap.template +127 -0
  7. package/dist/templates/react/css/index.template +1 -0
  8. package/dist/templates/react/css/tailwind.template +100 -0
  9. package/dist/templates/react/js/app.template +11 -0
  10. package/dist/templates/react/js/data_fetching/axios.template +11 -0
  11. package/dist/templates/react/js/data_fetching/fetcher.template +5 -0
  12. package/dist/templates/react/js/data_fetching/http.template +5 -0
  13. package/dist/templates/react/js/jsconfig.template +8 -0
  14. package/dist/templates/react/js/layout.template +17 -0
  15. package/dist/templates/react/js/main.template +41 -0
  16. package/dist/templates/react/js/react_router-router.template +17 -0
  17. package/dist/templates/react/js/state_management/context/theme_context.template +3 -0
  18. package/dist/templates/react/js/state_management/context/theme_provider.template +15 -0
  19. package/dist/templates/react/js/state_management/context/use_theme.template +14 -0
  20. package/dist/templates/react/js/state_management/store/counter_slice.template +19 -0
  21. package/dist/templates/react/js/state_management/store/index.template +1 -0
  22. package/dist/templates/react/js/state_management/store/store.template +8 -0
  23. package/dist/templates/react/js/state_management/zustand/index.template +1 -0
  24. package/dist/templates/react/js/state_management/zustand/use_counter_store.template +11 -0
  25. package/dist/templates/react/js/tanstack_router-router.template +24 -0
  26. package/dist/templates/react/js/vite.config.template +16 -0
  27. package/dist/templates/react/ts/app.template +11 -0
  28. package/dist/templates/react/ts/data_fetching/axios.template +13 -0
  29. package/dist/templates/react/ts/data_fetching/fetcher.template +7 -0
  30. package/dist/templates/react/ts/data_fetching/http.template +7 -0
  31. package/dist/templates/react/ts/layout.template +17 -0
  32. package/dist/templates/react/ts/main.template +41 -0
  33. package/dist/templates/react/ts/react_router-router.template +20 -0
  34. package/dist/templates/react/ts/state_management/context/theme_context.template +11 -0
  35. package/dist/templates/react/ts/state_management/context/theme_provider.template +15 -0
  36. package/dist/templates/react/ts/state_management/context/use_theme.template +14 -0
  37. package/dist/templates/react/ts/state_management/store/counter_slice.template +25 -0
  38. package/dist/templates/react/ts/state_management/store/index.template +1 -0
  39. package/dist/templates/react/ts/state_management/store/store.template +11 -0
  40. package/dist/templates/react/ts/state_management/zustand/index.template +1 -0
  41. package/dist/templates/react/ts/state_management/zustand/use_counter_store.template +17 -0
  42. package/dist/templates/react/ts/tanstack_router-router.template +26 -0
  43. package/dist/templates/react/ts/vite.config.template +16 -0
  44. package/dist/templates/vscode/settings.template +14 -0
  45. package/package.json +93 -0
@@ -0,0 +1,25 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+
3
+ interface CounterState {
4
+ value: number;
5
+ }
6
+
7
+ const initialState: CounterState = {
8
+ value: 0,
9
+ };
10
+
11
+ const counterSlice = createSlice({
12
+ name: "counter",
13
+ initialState,
14
+ reducers: {
15
+ increment: (state: CounterState) => {
16
+ state.value += 1;
17
+ },
18
+ decrement: (state: CounterState) => {
19
+ state.value -= 1;
20
+ },
21
+ },
22
+ });
23
+
24
+ export const { increment, decrement } = counterSlice.actions;
25
+ export default counterSlice.reducer;
@@ -0,0 +1 @@
1
+ export { default as counterSlice } from "./counterSlice";
@@ -0,0 +1,11 @@
1
+ import { configureStore } from "@reduxjs/toolkit";
2
+ import { counterSlice } from "./slices";
3
+
4
+ export const store = configureStore({
5
+ reducer: {
6
+ counter: counterSlice,
7
+ },
8
+ });
9
+
10
+ export type RootState = ReturnType<typeof store.getState>;
11
+ export type AppDispatch = typeof store.dispatch;
@@ -0,0 +1 @@
1
+ export { default as useCounterStore } from "./useCounterStore";
@@ -0,0 +1,17 @@
1
+ import { create } from "zustand";
2
+
3
+ interface CounterState {
4
+ count: number;
5
+ increment: () => void;
6
+ decrement: () => void;
7
+ }
8
+
9
+ const useCounterStore = create<CounterState>((set) => ({
10
+ count: 0,
11
+ increment: () =>
12
+ set((state) => ({ count: state.count + 1 })),
13
+ decrement: () =>
14
+ set((state) => ({ count: state.count - 1 })),
15
+ }));
16
+
17
+ export default useCounterStore;
@@ -0,0 +1,26 @@
1
+ import { createReactRouter, createRouteConfig } from '@tanstack/react-router';
2
+ import { RootRoute } from '@tanstack/react-router';
3
+ import Layout from './layout';
4
+ // ex:import Home from './pages/Home';
5
+ // ex:import About from './pages/About';
6
+
7
+
8
+ const rootRoute = new RootRoute({
9
+ component: Layout,
10
+ });
11
+
12
+ const homeRoute = rootRoute.createRoute({
13
+ path: '/',
14
+ // component: ex:Home,
15
+ });
16
+
17
+ const aboutRoute = rootRoute.createRoute({
18
+ path: '/about',
19
+ // component: ex:About,
20
+ });
21
+
22
+ export const router = createReactRouter({
23
+ routeConfig: rootRoute.addChildren([homeRoute, aboutRoute]),
24
+ });
25
+
26
+ export type Router = typeof router;
@@ -0,0 +1,16 @@
1
+ ##-nizam@mark-##:import_fileURLToPath
2
+ ##-nizam@mark-##:import_dirname_resolve
3
+ import { defineConfig } from 'vite'
4
+ import react from '@vitejs/plugin-react'
5
+ ##-nizam@mark-##:import_tailwindcss
6
+
7
+ ##-nizam@mark-##:make__filename
8
+ ##-nizam@mark-##:make__dirname
9
+
10
+ export default defineConfig({
11
+ plugins: [
12
+ react(),
13
+ ##-nizam@mark-##:append_tailwindcss_plugins
14
+ ],
15
+ ##-nizam@mark-##:add_resolve
16
+ })
@@ -0,0 +1,14 @@
1
+ {
2
+ "[html]": {
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
4
+ },
5
+ "[css]": {
6
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
7
+ },
8
+ "[json]": {
9
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
10
+ },
11
+ "[javascript]": {
12
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
13
+ }
14
+ }
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "create-nizam-app",
3
+ "version": "1.0.0",
4
+ "preferGlobal": true,
5
+ "description": "A Smart command-line interface with no presets for creating a modern architecture",
6
+ "type": "module",
7
+ "license": "MIT",
8
+ "author": {
9
+ "name": "Ahmed Abd Alalim",
10
+ "email": "ahmedabdalalim.3a@gmail.com",
11
+ "url": "https://ahmedabdalalim.pages.dev"
12
+ },
13
+ "homepage": "https://nizam-17v.pages.dev/",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/ahmed-abd-alalim/nizam.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/ahmed-abd-alalim/nizam/issues"
20
+ },
21
+ "keywords": [
22
+ "cli",
23
+ "command-line",
24
+ "typescript",
25
+ "javascript",
26
+ "node",
27
+ "react",
28
+ "vite",
29
+ "framework",
30
+ "css-framework",
31
+ "js-framework",
32
+ "animation",
33
+ "icons",
34
+ "library",
35
+ "frontend",
36
+ "automation",
37
+ "productivity",
38
+ "tool",
39
+ "developer-tool",
40
+ "workflow",
41
+ "utility"
42
+ ],
43
+ "bin": {
44
+ "create-nizam-app": "dist/__main__.js"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "README.md"
49
+ ],
50
+ "scripts": {
51
+ "watch:templates": "npx cpx \"src/templates/**/*.template\" dist/templates --watch",
52
+ "watch:rollup": "rollup -c -w --silent",
53
+ "dev": "npm-run-all --parallel watch:*",
54
+ "lint": "eslint ./src",
55
+ "format": "prettier --write ./src",
56
+ "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
57
+ "copy:templates": "npx cpx \"src/templates/**/*.template\" dist/templates",
58
+ "build": "npm run clean && npm run copy:templates && rollup -c --silent",
59
+ "matchV": "node -e \"const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json')); const config=JSON.parse(fs.readFileSync('src/assets/config.json')); config.app_info.version=pkg.version; fs.writeFileSync('src/assets/config.json', JSON.stringify(config,null,2));\"",
60
+ "prepublishOnly": "npm run matchV && npm run format && npm run lint && npm run build"
61
+ },
62
+ "engines": {
63
+ "node": ">=18"
64
+ },
65
+ "devDependencies": {
66
+ "@rollup/plugin-json": "^6.1.0",
67
+ "@rollup/plugin-typescript": "^12.3.0",
68
+ "@types/blessed": "^0.1.27",
69
+ "@types/fs-extra": "^11.0.4",
70
+ "@types/node": "^25.0.3",
71
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
72
+ "@typescript-eslint/parser": "^8.51.0",
73
+ "cpx": "^1.5.0",
74
+ "eslint": "^9.39.2",
75
+ "eslint-config-prettier": "^10.1.8",
76
+ "npm-run-all": "^4.1.5",
77
+ "prettier": "^3.8.0",
78
+ "rollup": "^4.55.1",
79
+ "ts-node": "^10.9.2",
80
+ "typescript": "^5.9.3"
81
+ },
82
+ "dependencies": {
83
+ "blessed": "^0.1.81",
84
+ "chalk": "^5.6.2",
85
+ "execa": "^9.6.1",
86
+ "fs-extra": "^11.3.2",
87
+ "fuse.js": "^7.1.0",
88
+ "inquirer": "^13.2.0",
89
+ "inquirer-checkbox-plus-plus": "^1.1.1",
90
+ "ora": "^9.0.0",
91
+ "strip-json-comments": "^5.0.3"
92
+ }
93
+ }