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,16 @@
1
+ 'use client'
2
+ import { Provider } from 'react-redux'
3
+ import { store } from '../src/store/store'
4
+ import { ThemeProvider, CssBaseline } from '@mui/material'
5
+ import { theme } from '../src/theme'
6
+
7
+ export function Providers({ children }) {
8
+ return (
9
+ <Provider store={store}>
10
+ <ThemeProvider theme={theme}>
11
+ <CssBaseline />
12
+ {children}
13
+ </ThemeProvider>
14
+ </Provider>
15
+ )
16
+ }
@@ -0,0 +1,22 @@
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
+ "@reduxjs/toolkit": "^2.3.0",
16
+ "react-redux": "^9.1.2",
17
+ "@mui/material": "^6.1.6",
18
+ "@emotion/react": "^11.13.3",
19
+ "@emotion/styled": "^11.13.0"
20
+ },
21
+ "devDependencies": {}
22
+ }
@@ -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
+ - Next.js + 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 start # start production server
15
+ ```
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,13 @@
1
+ import React from 'react'
2
+ import { Providers } from './providers'
3
+ import './globals.css'
4
+
5
+ export default function RootLayout({ children }) {
6
+ return (
7
+ <html lang="en">
8
+ <body>
9
+ <Providers>{children}</Providers>
10
+ </body>
11
+ </html>
12
+ )
13
+ }
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ import { useDispatch, useSelector } from 'react-redux'
3
+ import { increment } from '../src/store/counterSlice'
4
+
5
+ export default function Home() {
6
+ const count = useSelector((state) => state.counter.value)
7
+ const dispatch = useDispatch()
8
+ return (
9
+ <main>
10
+ <h1>create-stackit</h1>
11
+ <p>Count: {count}</p>
12
+ <button onClick={() => dispatch(increment())}>Increment</button>
13
+ </main>
14
+ )
15
+ }
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ import { Provider } from 'react-redux'
3
+ import { store } from '../src/store/store'
4
+
5
+ export function Providers({ children }) {
6
+ return (
7
+ <Provider store={store}>
8
+ {children}
9
+ </Provider>
10
+ )
11
+ }
@@ -0,0 +1,23 @@
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
+ "@reduxjs/toolkit": "^2.3.0",
16
+ "react-redux": "^9.1.2"
17
+ },
18
+ "devDependencies": {
19
+ "tailwindcss": "^3.4.14",
20
+ "postcss": "^8.4.47",
21
+ "autoprefixer": "^10.4.20"
22
+ }
23
+ }
@@ -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
+ - Next.js + 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 start # start production server
15
+ ```
@@ -0,0 +1,16 @@
1
+ import React from 'react'
2
+ import { ThemeProvider, CssBaseline } from '@mui/material'
3
+ import { theme } from '../src/theme'
4
+
5
+ export default function RootLayout({ children }) {
6
+ return (
7
+ <html lang="en">
8
+ <body>
9
+ <ThemeProvider theme={theme}>
10
+ <CssBaseline />
11
+ {children}
12
+ </ThemeProvider>
13
+ </body>
14
+ </html>
15
+ )
16
+ }
@@ -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,21 @@
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
+ }
@@ -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 + 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 start # start production server
15
+ ```
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,10 @@
1
+ import React from 'react'
2
+ import './globals.css'
3
+
4
+ export default function RootLayout({ children }) {
5
+ return (
6
+ <html lang="en">
7
+ <body>{children}</body>
8
+ </html>
9
+ )
10
+ }
@@ -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,22 @@
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
+ "tailwindcss": "^3.4.14",
19
+ "postcss": "^8.4.47",
20
+ "autoprefixer": "^10.4.20"
21
+ }
22
+ }
@@ -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
+ - 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 start # start production server
15
+ ```
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+ import { Providers } from './providers'
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>
10
+ <Providers>{children}</Providers>
11
+ </body>
12
+ </html>
13
+ )
14
+ }
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ import { useDispatch, useSelector } from 'react-redux'
3
+ import { increment } from '../src/store/counterSlice'
4
+
5
+ export default function Home() {
6
+ const count = useSelector((state) => state.counter.value)
7
+ const dispatch = useDispatch()
8
+ return (
9
+ <main>
10
+ <h1>create-stackit</h1>
11
+ <p>Count: {count}</p>
12
+ <button onClick={() => dispatch(increment())}>Increment</button>
13
+ </main>
14
+ )
15
+ }
@@ -0,0 +1,16 @@
1
+ 'use client'
2
+ import { Provider } from 'react-redux'
3
+ import { store } from '../src/store/store'
4
+ import { ThemeProvider, CssBaseline } from '@mui/material'
5
+ import { theme } from '../src/theme'
6
+
7
+ export function Providers({ children }: { children: React.ReactNode }) {
8
+ return (
9
+ <Provider store={store}>
10
+ <ThemeProvider theme={theme}>
11
+ <CssBaseline />
12
+ {children}
13
+ </ThemeProvider>
14
+ </Provider>
15
+ )
16
+ }
@@ -0,0 +1,27 @@
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
+ "@reduxjs/toolkit": "^2.3.0",
16
+ "react-redux": "^9.1.2",
17
+ "@mui/material": "^6.1.6",
18
+ "@emotion/react": "^11.13.3",
19
+ "@emotion/styled": "^11.13.0"
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^20",
23
+ "@types/react": "^18.3.10",
24
+ "@types/react-dom": "^18.3.0",
25
+ "typescript": "^5.6.2"
26
+ }
27
+ }
@@ -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
+ - Next.js + 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 start # start production server
15
+ ```
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,15 @@
1
+ import React from 'react'
2
+ import { Providers } from './providers'
3
+ import './globals.css'
4
+
5
+ export const metadata = { title: 'create-stackit app', description: 'Generated by create-stackit' }
6
+
7
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
8
+ return (
9
+ <html lang="en">
10
+ <body>
11
+ <Providers>{children}</Providers>
12
+ </body>
13
+ </html>
14
+ )
15
+ }
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ import { useDispatch, useSelector } from 'react-redux'
3
+ import { increment } from '../src/store/counterSlice'
4
+
5
+ export default function Home() {
6
+ const count = useSelector((state) => state.counter.value)
7
+ const dispatch = useDispatch()
8
+ return (
9
+ <main>
10
+ <h1>create-stackit</h1>
11
+ <p>Count: {count}</p>
12
+ <button onClick={() => dispatch(increment())}>Increment</button>
13
+ </main>
14
+ )
15
+ }
@@ -0,0 +1,11 @@
1
+ 'use client'
2
+ import { Provider } from 'react-redux'
3
+ import { store } from '../src/store/store'
4
+
5
+ export function Providers({ children }: { children: React.ReactNode }) {
6
+ return (
7
+ <Provider store={store}>
8
+ {children}
9
+ </Provider>
10
+ )
11
+ }
@@ -0,0 +1,27 @@
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
+ "@reduxjs/toolkit": "^2.3.0",
16
+ "react-redux": "^9.1.2"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^20",
20
+ "@types/react": "^18.3.10",
21
+ "@types/react-dom": "^18.3.0",
22
+ "typescript": "^5.6.2",
23
+ "tailwindcss": "^3.4.14",
24
+ "postcss": "^8.4.47",
25
+ "autoprefixer": "^10.4.20"
26
+ }
27
+ }
@@ -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,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
+ - Material 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,18 @@
1
+ import React from 'react'
2
+ import { ThemeProvider, CssBaseline } from '@mui/material'
3
+ import { theme } from '../src/theme'
4
+
5
+ export const metadata = { title: 'create-stackit app', description: 'Generated by create-stackit' }
6
+
7
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
8
+ return (
9
+ <html lang="en">
10
+ <body>
11
+ <ThemeProvider theme={theme}>
12
+ <CssBaseline />
13
+ {children}
14
+ </ThemeProvider>
15
+ </body>
16
+ </html>
17
+ )
18
+ }