create-stackit 0.1.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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +194 -0
  3. package/bin/index.js +64 -0
  4. package/package.json +43 -0
  5. package/src/choices.js +63 -0
  6. package/src/generator.js +133 -0
  7. package/src/injectors/addons.js +311 -0
  8. package/src/injectors/structure.js +51 -0
  9. package/src/pm.js +94 -0
  10. package/src/prompts.js +179 -0
  11. package/src/utils.js +18 -0
  12. package/templates/next-js-redux-mui/README.md +15 -0
  13. package/templates/next-js-redux-mui/app/layout.jsx +12 -0
  14. package/templates/next-js-redux-mui/app/page.jsx +15 -0
  15. package/templates/next-js-redux-mui/app/providers.jsx +16 -0
  16. package/templates/next-js-redux-mui/package.json +22 -0
  17. package/templates/next-js-redux-mui/src/store/counterSlice.js +13 -0
  18. package/templates/next-js-redux-mui/src/store/store.js +8 -0
  19. package/templates/next-js-redux-mui/src/theme.js +9 -0
  20. package/templates/next-js-redux-shadcn/README.md +15 -0
  21. package/templates/next-js-redux-shadcn/app/globals.css +3 -0
  22. package/templates/next-js-redux-shadcn/app/layout.jsx +13 -0
  23. package/templates/next-js-redux-shadcn/app/page.jsx +15 -0
  24. package/templates/next-js-redux-shadcn/app/providers.jsx +11 -0
  25. package/templates/next-js-redux-shadcn/package.json +23 -0
  26. package/templates/next-js-redux-shadcn/src/store/counterSlice.js +13 -0
  27. package/templates/next-js-redux-shadcn/src/store/store.js +8 -0
  28. package/templates/next-js-zustand-mui/README.md +15 -0
  29. package/templates/next-js-zustand-mui/app/layout.jsx +16 -0
  30. package/templates/next-js-zustand-mui/app/page.jsx +18 -0
  31. package/templates/next-js-zustand-mui/package.json +21 -0
  32. package/templates/next-js-zustand-mui/src/theme.js +9 -0
  33. package/templates/next-js-zustand-shadcn/README.md +15 -0
  34. package/templates/next-js-zustand-shadcn/app/globals.css +3 -0
  35. package/templates/next-js-zustand-shadcn/app/layout.jsx +10 -0
  36. package/templates/next-js-zustand-shadcn/app/page.jsx +18 -0
  37. package/templates/next-js-zustand-shadcn/package.json +22 -0
  38. package/templates/next-ts-redux-mui/README.md +15 -0
  39. package/templates/next-ts-redux-mui/app/layout.tsx +14 -0
  40. package/templates/next-ts-redux-mui/app/page.tsx +15 -0
  41. package/templates/next-ts-redux-mui/app/providers.tsx +16 -0
  42. package/templates/next-ts-redux-mui/package.json +27 -0
  43. package/templates/next-ts-redux-mui/src/store/counterSlice.ts +16 -0
  44. package/templates/next-ts-redux-mui/src/store/store.ts +11 -0
  45. package/templates/next-ts-redux-mui/src/theme.ts +9 -0
  46. package/templates/next-ts-redux-shadcn/README.md +15 -0
  47. package/templates/next-ts-redux-shadcn/app/globals.css +3 -0
  48. package/templates/next-ts-redux-shadcn/app/layout.tsx +15 -0
  49. package/templates/next-ts-redux-shadcn/app/page.tsx +15 -0
  50. package/templates/next-ts-redux-shadcn/app/providers.tsx +11 -0
  51. package/templates/next-ts-redux-shadcn/package.json +27 -0
  52. package/templates/next-ts-redux-shadcn/src/store/counterSlice.ts +16 -0
  53. package/templates/next-ts-redux-shadcn/src/store/store.ts +11 -0
  54. package/templates/next-ts-zustand-mui/README.md +15 -0
  55. package/templates/next-ts-zustand-mui/app/layout.tsx +18 -0
  56. package/templates/next-ts-zustand-mui/app/page.tsx +18 -0
  57. package/templates/next-ts-zustand-mui/package.json +26 -0
  58. package/templates/next-ts-zustand-mui/src/theme.ts +9 -0
  59. package/templates/next-ts-zustand-shadcn/README.md +15 -0
  60. package/templates/next-ts-zustand-shadcn/app/globals.css +3 -0
  61. package/templates/next-ts-zustand-shadcn/app/layout.tsx +12 -0
  62. package/templates/next-ts-zustand-shadcn/app/page.tsx +18 -0
  63. package/templates/next-ts-zustand-shadcn/package.json +26 -0
  64. package/templates/vite-js-redux-mui/README.md +15 -0
  65. package/templates/vite-js-redux-mui/package.json +24 -0
  66. package/templates/vite-js-redux-mui/src/App.jsx +14 -0
  67. package/templates/vite-js-redux-mui/src/main.jsx +18 -0
  68. package/templates/vite-js-redux-mui/src/store/counterSlice.js +13 -0
  69. package/templates/vite-js-redux-mui/src/store/store.js +8 -0
  70. package/templates/vite-js-redux-mui/src/theme.js +9 -0
  71. package/templates/vite-js-redux-shadcn/README.md +15 -0
  72. package/templates/vite-js-redux-shadcn/package.json +24 -0
  73. package/templates/vite-js-redux-shadcn/src/App.jsx +14 -0
  74. package/templates/vite-js-redux-shadcn/src/index.css +3 -0
  75. package/templates/vite-js-redux-shadcn/src/main.jsx +14 -0
  76. package/templates/vite-js-redux-shadcn/src/store/counterSlice.js +13 -0
  77. package/templates/vite-js-redux-shadcn/src/store/store.js +8 -0
  78. package/templates/vite-js-zustand-mui/README.md +15 -0
  79. package/templates/vite-js-zustand-mui/package.json +23 -0
  80. package/templates/vite-js-zustand-mui/src/App.jsx +17 -0
  81. package/templates/vite-js-zustand-mui/src/main.jsx +14 -0
  82. package/templates/vite-js-zustand-mui/src/theme.js +9 -0
  83. package/templates/vite-js-zustand-shadcn/README.md +15 -0
  84. package/templates/vite-js-zustand-shadcn/package.json +23 -0
  85. package/templates/vite-js-zustand-shadcn/src/App.jsx +17 -0
  86. package/templates/vite-js-zustand-shadcn/src/index.css +3 -0
  87. package/templates/vite-js-zustand-shadcn/src/main.jsx +10 -0
  88. package/templates/vite-ts-redux-mui/README.md +15 -0
  89. package/templates/vite-ts-redux-mui/package.json +27 -0
  90. package/templates/vite-ts-redux-mui/src/App.tsx +14 -0
  91. package/templates/vite-ts-redux-mui/src/main.tsx +18 -0
  92. package/templates/vite-ts-redux-mui/src/store/counterSlice.ts +16 -0
  93. package/templates/vite-ts-redux-mui/src/store/store.ts +11 -0
  94. package/templates/vite-ts-redux-mui/src/theme.ts +9 -0
  95. package/templates/vite-ts-redux-shadcn/README.md +15 -0
  96. package/templates/vite-ts-redux-shadcn/package.json +27 -0
  97. package/templates/vite-ts-redux-shadcn/src/App.tsx +14 -0
  98. package/templates/vite-ts-redux-shadcn/src/index.css +3 -0
  99. package/templates/vite-ts-redux-shadcn/src/main.tsx +14 -0
  100. package/templates/vite-ts-redux-shadcn/src/store/counterSlice.ts +16 -0
  101. package/templates/vite-ts-redux-shadcn/src/store/store.ts +11 -0
  102. package/templates/vite-ts-zustand-mui/README.md +15 -0
  103. package/templates/vite-ts-zustand-mui/package.json +26 -0
  104. package/templates/vite-ts-zustand-mui/src/App.tsx +17 -0
  105. package/templates/vite-ts-zustand-mui/src/main.tsx +14 -0
  106. package/templates/vite-ts-zustand-mui/src/theme.ts +9 -0
  107. package/templates/vite-ts-zustand-shadcn/README.md +15 -0
  108. package/templates/vite-ts-zustand-shadcn/package.json +23 -0
  109. package/templates/vite-ts-zustand-shadcn/src/main.tsx +2 -0
@@ -0,0 +1,18 @@
1
+ 'use client'
2
+ import { create } from 'zustand'
3
+
4
+ const useStore = create((set) => ({
5
+ count: 0,
6
+ increment: () => set((s) => ({ count: s.count + 1 })),
7
+ }))
8
+
9
+ export default function Home() {
10
+ const { count, increment } = useStore()
11
+ return (
12
+ <main>
13
+ <h1>create-stackit</h1>
14
+ <p>Count: {count}</p>
15
+ <button onClick={increment}>Increment</button>
16
+ </main>
17
+ )
18
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "next": "^15.0.3",
13
+ "react": "^18.3.1",
14
+ "react-dom": "^18.3.1",
15
+ "zustand": "^5.0.0",
16
+ "@mui/material": "^6.1.6",
17
+ "@emotion/react": "^11.13.3",
18
+ "@emotion/styled": "^11.13.0"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^20",
22
+ "@types/react": "^18.3.10",
23
+ "@types/react-dom": "^18.3.0",
24
+ "typescript": "^5.6.2"
25
+ }
26
+ }
@@ -0,0 +1,9 @@
1
+ import { createTheme } from '@mui/material/styles'
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light',
6
+ primary: { main: '#6366f1' },
7
+ secondary: { main: '#f43f5e' },
8
+ },
9
+ })
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Next.js + TypeScript
7
+ - Zustand
8
+ - Tailwind + shadcn/ui
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run start # start production server
15
+ ```
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import './globals.css'
3
+
4
+ export const metadata = { title: 'create-stackit app', description: 'Generated by create-stackit' }
5
+
6
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
7
+ return (
8
+ <html lang="en">
9
+ <body>{children}</body>
10
+ </html>
11
+ )
12
+ }
@@ -0,0 +1,18 @@
1
+ 'use client'
2
+ import { create } from 'zustand'
3
+
4
+ const useStore = create((set) => ({
5
+ count: 0,
6
+ increment: () => set((s) => ({ count: s.count + 1 })),
7
+ }))
8
+
9
+ export default function Home() {
10
+ const { count, increment } = useStore()
11
+ return (
12
+ <main>
13
+ <h1>create-stackit</h1>
14
+ <p>Count: {count}</p>
15
+ <button onClick={increment}>Increment</button>
16
+ </main>
17
+ )
18
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "next": "^15.0.3",
13
+ "react": "^18.3.1",
14
+ "react-dom": "^18.3.1",
15
+ "zustand": "^5.0.0"
16
+ },
17
+ "devDependencies": {
18
+ "@types/node": "^20",
19
+ "@types/react": "^18.3.10",
20
+ "@types/react-dom": "^18.3.0",
21
+ "typescript": "^5.6.2",
22
+ "tailwindcss": "^3.4.14",
23
+ "postcss": "^8.4.47",
24
+ "autoprefixer": "^10.4.20"
25
+ }
26
+ }
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + JavaScript
7
+ - Redux Toolkit
8
+ - Material UI
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "@reduxjs/toolkit": "^2.3.0",
15
+ "react-redux": "^9.1.2",
16
+ "@mui/material": "^6.1.6",
17
+ "@emotion/react": "^11.13.3",
18
+ "@emotion/styled": "^11.13.0"
19
+ },
20
+ "devDependencies": {
21
+ "@vitejs/plugin-react": "^4.3.2",
22
+ "vite": "^5.4.8"
23
+ }
24
+ }
@@ -0,0 +1,14 @@
1
+ import { useDispatch, useSelector } from 'react-redux'
2
+ import { increment } from './store/counterSlice'
3
+
4
+ export default function App() {
5
+ const count = useSelector((state) => state.counter.value)
6
+ const dispatch = useDispatch()
7
+ return (
8
+ <div>
9
+ <h1>create-stackit</h1>
10
+ <p>Count: {count}</p>
11
+ <button onClick={() => dispatch(increment())}>Increment</button>
12
+ </div>
13
+ )
14
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import { Provider } from 'react-redux'
4
+ import { store } from './store/store
5
+ import { ThemeProvider, CssBaseline } from '@mui/material'
6
+ import { theme } from './theme
7
+ import App from './App'
8
+
9
+ ReactDOM.createRoot(document.getElementById('root')).render(
10
+ <React.StrictMode>
11
+ <Provider store={store}>
12
+ <ThemeProvider theme={theme}>
13
+ <CssBaseline />
14
+ <App />
15
+ </ThemeProvider>
16
+ </Provider>
17
+ </React.StrictMode>,
18
+ )
@@ -0,0 +1,13 @@
1
+ import { createSlice } from '@reduxjs/toolkit'
2
+
3
+ const counterSlice = createSlice({
4
+ name: 'counter',
5
+ initialState: { value: 0 },
6
+ reducers: {
7
+ increment: (state) => { state.value += 1 },
8
+ decrement: (state) => { state.value -= 1 },
9
+ },
10
+ })
11
+
12
+ export const { increment, decrement } = counterSlice.actions
13
+ export default counterSlice.reducer
@@ -0,0 +1,8 @@
1
+ import { configureStore } from '@reduxjs/toolkit'
2
+ import counterReducer from './counterSlice'
3
+
4
+ export const store = configureStore({
5
+ reducer: {
6
+ counter: counterReducer,
7
+ },
8
+ })
@@ -0,0 +1,9 @@
1
+ import { createTheme } from '@mui/material/styles'
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light',
6
+ primary: { main: '#6366f1' },
7
+ secondary: { main: '#f43f5e' },
8
+ },
9
+ })
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + JavaScript
7
+ - Redux Toolkit
8
+ - Tailwind + shadcn/ui
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "@reduxjs/toolkit": "^2.3.0",
15
+ "react-redux": "^9.1.2"
16
+ },
17
+ "devDependencies": {
18
+ "@vitejs/plugin-react": "^4.3.2",
19
+ "vite": "^5.4.8",
20
+ "tailwindcss": "^3.4.14",
21
+ "postcss": "^8.4.47",
22
+ "autoprefixer": "^10.4.20"
23
+ }
24
+ }
@@ -0,0 +1,14 @@
1
+ import { useDispatch, useSelector } from 'react-redux'
2
+ import { increment } from './store/counterSlice'
3
+
4
+ export default function App() {
5
+ const count = useSelector((state) => state.counter.value)
6
+ const dispatch = useDispatch()
7
+ return (
8
+ <div>
9
+ <h1>create-stackit</h1>
10
+ <p>Count: {count}</p>
11
+ <button onClick={() => dispatch(increment())}>Increment</button>
12
+ </div>
13
+ )
14
+ }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import { Provider } from 'react-redux'
4
+ import { store } from './store/store
5
+ import './index.css'
6
+ import App from './App'
7
+
8
+ ReactDOM.createRoot(document.getElementById('root')).render(
9
+ <React.StrictMode>
10
+ <Provider store={store}>
11
+ <App />
12
+ </Provider>
13
+ </React.StrictMode>,
14
+ )
@@ -0,0 +1,13 @@
1
+ import { createSlice } from '@reduxjs/toolkit'
2
+
3
+ const counterSlice = createSlice({
4
+ name: 'counter',
5
+ initialState: { value: 0 },
6
+ reducers: {
7
+ increment: (state) => { state.value += 1 },
8
+ decrement: (state) => { state.value -= 1 },
9
+ },
10
+ })
11
+
12
+ export const { increment, decrement } = counterSlice.actions
13
+ export default counterSlice.reducer
@@ -0,0 +1,8 @@
1
+ import { configureStore } from '@reduxjs/toolkit'
2
+ import counterReducer from './counterSlice'
3
+
4
+ export const store = configureStore({
5
+ reducer: {
6
+ counter: counterReducer,
7
+ },
8
+ })
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + JavaScript
7
+ - Zustand
8
+ - Material UI
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "zustand": "^5.0.0",
15
+ "@mui/material": "^6.1.6",
16
+ "@emotion/react": "^11.13.3",
17
+ "@emotion/styled": "^11.13.0"
18
+ },
19
+ "devDependencies": {
20
+ "@vitejs/plugin-react": "^4.3.2",
21
+ "vite": "^5.4.8"
22
+ }
23
+ }
@@ -0,0 +1,17 @@
1
+ import { create } from 'zustand'
2
+
3
+ const useStore = create((set) => ({
4
+ count: 0,
5
+ increment: () => set((s) => ({ count: s.count + 1 })),
6
+ }))
7
+
8
+ export default function App() {
9
+ const { count, increment } = useStore()
10
+ return (
11
+ <div>
12
+ <h1>create-stackit</h1>
13
+ <p>Count: {count}</p>
14
+ <button onClick={increment}>Increment</button>
15
+ </div>
16
+ )
17
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import { ThemeProvider, CssBaseline } from '@mui/material'
4
+ import { theme } from './theme
5
+ import App from './App'
6
+
7
+ ReactDOM.createRoot(document.getElementById('root')).render(
8
+ <React.StrictMode>
9
+ <ThemeProvider theme={theme}>
10
+ <CssBaseline />
11
+ <App />
12
+ </ThemeProvider>
13
+ </React.StrictMode>,
14
+ )
@@ -0,0 +1,9 @@
1
+ import { createTheme } from '@mui/material/styles'
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light',
6
+ primary: { main: '#6366f1' },
7
+ secondary: { main: '#f43f5e' },
8
+ },
9
+ })
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + JavaScript
7
+ - Zustand
8
+ - Tailwind + shadcn/ui
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "zustand": "^5.0.0"
15
+ },
16
+ "devDependencies": {
17
+ "@vitejs/plugin-react": "^4.3.2",
18
+ "vite": "^5.4.8",
19
+ "tailwindcss": "^3.4.14",
20
+ "postcss": "^8.4.47",
21
+ "autoprefixer": "^10.4.20"
22
+ }
23
+ }
@@ -0,0 +1,17 @@
1
+ import { create } from 'zustand'
2
+
3
+ const useStore = create((set) => ({
4
+ count: 0,
5
+ increment: () => set((s) => ({ count: s.count + 1 })),
6
+ }))
7
+
8
+ export default function App() {
9
+ const { count, increment } = useStore()
10
+ return (
11
+ <div>
12
+ <h1>create-stackit</h1>
13
+ <p>Count: {count}</p>
14
+ <button onClick={increment}>Increment</button>
15
+ </div>
16
+ )
17
+ }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,10 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import './index.css'
4
+ import App from './App'
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>,
10
+ )
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + TypeScript
7
+ - Redux Toolkit
8
+ - Material UI
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "stackit-template",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "@reduxjs/toolkit": "^2.3.0",
15
+ "react-redux": "^9.1.2",
16
+ "@mui/material": "^6.1.6",
17
+ "@emotion/react": "^11.13.3",
18
+ "@emotion/styled": "^11.13.0"
19
+ },
20
+ "devDependencies": {
21
+ "@vitejs/plugin-react": "^4.3.2",
22
+ "vite": "^5.4.8",
23
+ "@types/react": "^18.3.10",
24
+ "@types/react-dom": "^18.3.0",
25
+ "typescript": "^5.6.2"
26
+ }
27
+ }
@@ -0,0 +1,14 @@
1
+ import { useDispatch, useSelector } from 'react-redux'
2
+ import { increment } from './store/counterSlice'
3
+
4
+ export default function App() {
5
+ const count = useSelector((state) => state.counter.value)
6
+ const dispatch = useDispatch()
7
+ return (
8
+ <div>
9
+ <h1>create-stackit</h1>
10
+ <p>Count: {count}</p>
11
+ <button onClick={() => dispatch(increment())}>Increment</button>
12
+ </div>
13
+ )
14
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import { Provider } from 'react-redux'
4
+ import { store } from './store/store
5
+ import { ThemeProvider, CssBaseline } from '@mui/material'
6
+ import { theme } from './theme
7
+ import App from './App'
8
+
9
+ ReactDOM.createRoot(document.getElementById('root')!).render(
10
+ <React.StrictMode>
11
+ <Provider store={store}>
12
+ <ThemeProvider theme={theme}>
13
+ <CssBaseline />
14
+ <App />
15
+ </ThemeProvider>
16
+ </Provider>
17
+ </React.StrictMode>,
18
+ )
@@ -0,0 +1,16 @@
1
+ import { createSlice } from '@reduxjs/toolkit'
2
+
3
+ interface CounterState { value: number }
4
+ const initialState: CounterState = { value: 0 }
5
+
6
+ export const counterSlice = createSlice({
7
+ name: 'counter',
8
+ initialState,
9
+ reducers: {
10
+ increment: (state) => { state.value += 1 },
11
+ decrement: (state) => { state.value -= 1 },
12
+ },
13
+ })
14
+
15
+ export const { increment, decrement } = counterSlice.actions
16
+ export default counterSlice.reducer
@@ -0,0 +1,11 @@
1
+ import { configureStore } from '@reduxjs/toolkit'
2
+ import counterReducer from './counterSlice'
3
+
4
+ export const store = configureStore({
5
+ reducer: {
6
+ counter: counterReducer,
7
+ },
8
+ })
9
+
10
+ export type RootState = ReturnType<typeof store.getState>
11
+ export type AppDispatch = typeof store.dispatch
@@ -0,0 +1,9 @@
1
+ import { createTheme } from '@mui/material/styles'
2
+
3
+ export const theme = createTheme({
4
+ palette: {
5
+ mode: 'light',
6
+ primary: { main: '#6366f1' },
7
+ secondary: { main: '#f43f5e' },
8
+ },
9
+ })
@@ -0,0 +1,15 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Generated with [create-stackit](https://github.com/your-handle/create-stackit).
4
+
5
+ ## Stack
6
+ - Vite + React + TypeScript
7
+ - Redux Toolkit
8
+ - Tailwind + shadcn/ui
9
+
10
+ ## Scripts
11
+ ```bash
12
+ npm run dev # start dev server
13
+ npm run build # production build
14
+ npm run preview # preview build
15
+ ```