create-nexora-next 0.3.7 → 0.4.8

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,46 +1,228 @@
1
- # create-nexora-next
2
-
3
- > The official Next.js scaffolding CLI by Rayan — batteries included.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx create-nexora-next
9
- pnpm dlx create-nexora-next
10
- bunx create-nexora-next
11
- ```
12
-
13
- ## What it sets up
14
-
15
- ### Always included
16
- - Next.js (TypeScript, Tailwind CSS v4, ESLint, App Router, `~/` alias)
17
- - shadcn/ui initialized with defaults
18
- - Custom `globals.css` (squircle utilities, container, skeleton animation)
19
- - `.prettierrc` with `prettier-plugin-tailwindcss`
20
- - `.env.local` pre-populated
21
- - Poppins font via `next/font/google`
22
- - `cn()`, `toSlug()`, `trycatch()`, and other utils
23
- - Typed constants (`TZ_COOKIE`, `SITE_URL`)
24
- - SEO metadata scaffold
25
- - `SileoToaster` component
26
- - Providers pattern (`src/components/providers/`)
27
- - nuqs adapter (URL state management)
28
- - Core deps: `zustand`, `zod`, `react-hook-form`, `date-fns`, `nuqs`, `cookies-next`, `nextjs-toploader`
29
- - Dev deps: `prettier`, `prettier-plugin-tailwindcss`, `babel-plugin-react-compiler`
30
-
31
- ### Optional features (prompted)
32
-
33
- | Feature | What gets installed / created |
34
- |---|---|
35
- | Husky | `husky`, `lint-staged`, pre-commit hook |
36
- | Localization | `next-intl`, `src/i18n/`, `locales/en.json`, `[locale]/page.tsx` |
37
- | TanStack Query | `@tanstack/react-query`, persist client, query-client provider |
38
- | Auth | proxy chain, auth validators, `src/apis/` |
39
- | Theming | `next-themes`, theme provider |
40
- | Animations | `motion`, `gsap` |
41
- | Axios | `axios`, `axios.client.ts`, `axios.server.ts` |
42
-
43
- ## Requirements
44
-
45
- - Node.js 18+
46
- - npm, pnpm, bun, or yarn
1
+ <div align="center">
2
+
3
+ ```
4
+ ███╗ ██╗███████╗██╗ ██╗ ██████╗ ██████╗ █████╗
5
+ ████╗ ██║██╔════╝╚██╗██╔╝██╔═══██╗██╔══██╗██╔══██╗
6
+ ██╔██╗ ██║█████╗ ╚███╔╝ ██║ ██║██████╔╝███████║
7
+ ██║╚██╗██║██╔══╝ ██╔██╗ ██║ ██║██╔══██╗██╔══██║
8
+ ██║ ╚████║███████╗██╔╝ ██╗╚██████╔╝██║ ██║██║ ██║
9
+ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
10
+ ```
11
+
12
+ **The opinionated Next.js scaffold CLI by Rayan.**
13
+ One command. Full setup. Ship faster.
14
+
15
+ [![npm version](https://img.shields.io/npm/v/create-nexora-next?color=cyan&style=flat-square)](https://www.npmjs.com/package/create-nexora-next)
16
+ [![npm downloads](https://img.shields.io/npm/dm/create-nexora-next?color=blue&style=flat-square)](https://www.npmjs.com/package/create-nexora-next)
17
+ [![license](https://img.shields.io/npm/l/create-nexora-next?style=flat-square)](./LICENSE)
18
+ [![node](https://img.shields.io/node/v/create-nexora-next?style=flat-square)](https://nodejs.org)
19
+
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## Usage
25
+
26
+ ```bash
27
+ # npm
28
+ npx create-nexora-next@latest
29
+
30
+ # pnpm
31
+ pnpm dlx create-nexora-next@latest
32
+
33
+ # bun
34
+ bunx create-nexora-next@latest
35
+
36
+ # yarn
37
+ yarn dlx create-nexora-next@latest
38
+ ```
39
+
40
+ The CLI will guide you through a short prompt sequence — pick your package manager, choose your features, and watch your project build itself.
41
+
42
+ ---
43
+
44
+ ## What's always included
45
+
46
+ Every project scaffolded with `create-nexora-next` comes with this baseline — no questions asked:
47
+
48
+ | What | Details |
49
+ |---|---|
50
+ | **Next.js 16** | TypeScript · Tailwind CSS v4 · ESLint · App Router · `src/` dir · `~/` path alias |
51
+ | **shadcn/ui** | Initialised with defaults · `components.json` patched to `~/lib/utils/index.ts` |
52
+ | **Custom globals.css** | Squircle utilities · responsive container · skeleton animation · reduced motion |
53
+ | **Prettier** | `prettier-plugin-tailwindcss` for automatic class sorting |
54
+ | **Poppins font** | Via `next/font/google` with full weight range |
55
+ | **Utility functions** | `cn()` · `toSlug()` · `createInitials()` · `normalizeEmail()` · `sanitizeName()` · `trycatch()` |
56
+ | **Constants** | `SITE_URL` · `TZ_COOKIE` · locale constants (if i18n opted in) |
57
+ | **SEO scaffold** | `src/lib/seo/index.ts` — locale-aware if i18n enabled |
58
+ | **Sitemap** | `src/app/sitemap.ts` pre-wired to `SITE_URL` |
59
+ | **ESLint config** | Clean flat config with Next.js core web vitals + TypeScript rules |
60
+ | **Providers pattern** | Dynamic `src/components/providers/index.ts` — only includes what you opted into |
61
+ | **SileoToaster** | Toast notifications via `sileo` |
62
+ | **nuqs** | Type-safe URL search params adapter |
63
+ | **nextjs-toploader** | Page transition progress bar |
64
+ | **Folder structure** | `hooks/` · `components/{atoms,molecules,organisms,primitives,adapters,providers,ui}/` |
65
+ | **Core deps** | `zustand` · `zod` · `react-hook-form` · `date-fns` · `@date-fns/tz` · `clsx` · `tailwind-merge` |
66
+ | **Dev deps** | `prettier` · `prettier-plugin-tailwindcss` · `babel-plugin-react-compiler` |
67
+ | **Scripts** | `type-check` added to `package.json` → `tsc --pretty --noEmit` |
68
+
69
+ ---
70
+
71
+ ## Optional features
72
+
73
+ Prompted during setup — only what you need gets installed:
74
+
75
+ ### 🌍 Localization (`next-intl`)
76
+ - `src/i18n/{routing,request,navigation}.ts`
77
+ - `locales/en.json` with base translation keys
78
+ - `src/app/[locale]/page.tsx` + `src/app/[locale]/layout.tsx`
79
+ - Root `layout.tsx` replaced with passthrough shell
80
+ - Default `src/app/page.tsx` removed
81
+ - `next-intl.ts` config with typed `AppConfig`
82
+ - `src/lib/utils/locale-date-formats.ts`
83
+ - `LocaleProvider` + `TzProvider` (auto-detects and persists device timezone)
84
+ - `next.config.ts` updated with `createNextIntlPlugin`
85
+
86
+ ### ⚡ TanStack Query
87
+ - `@tanstack/react-query` installed first (peer dep order guaranteed)
88
+ - `@tanstack/react-query-persist-client` + `@tanstack/query-async-storage-persister`
89
+ - Pre-configured `QueryClientProvider` with:
90
+ - 5-minute stale time
91
+ - Local storage persistence (24h)
92
+ - Mutation cache auto-invalidation via `meta.invalidateQueries`
93
+ - `@tanstack/eslint-plugin-query` as devDependency
94
+
95
+ ### 🎨 Theming (`next-themes`)
96
+ - `ThemeProvider` with system default, class attribute, smooth transitions
97
+
98
+ ### 🔐 Auth
99
+ - Proxy chain middleware (`src/proxy.ts`)
100
+ - `withProxyChain` + `authProxy` stub
101
+ - `src/lib/validators/{index,auth}.ts` — `LoginSchema`, `RegisterSchema`
102
+ - `src/apis/{client,server}/index.ts`
103
+ - `cookies-next` installed
104
+
105
+ ### 🎭 Animations
106
+ - `motion` (formerly Framer Motion)
107
+ - `gsap`
108
+
109
+ ### 🔄 Axios
110
+ - `axios` installed
111
+ - `src/lib/axios/axios.client.ts` — pre-configured client instance
112
+ - `src/lib/axios/axios.server.ts` — pre-configured server instance
113
+
114
+ ### 🐶 Husky pre-commit hooks
115
+ Runs three checks on every commit:
116
+ ```
117
+ 📝 Lint → bun lint
118
+ 🔍 Type check → bun type-check
119
+ 🏗️ Build → bun run build
120
+ ```
121
+ Fails fast with a clear error message. Shows timestamp on success.
122
+
123
+ ### ⚛️ React Compiler
124
+ - `babel-plugin-react-compiler` (always installed as devDep)
125
+ - `reactCompiler: true` added to `next.config.ts` if opted in
126
+
127
+ ---
128
+
129
+ ## Project structure
130
+
131
+ ```
132
+ my-app/
133
+ ├── locales/
134
+ │ └── en.json # (i18n)
135
+ ├── src/
136
+ │ ├── app/
137
+ │ │ ├── [locale]/
138
+ │ │ │ ├── layout.tsx # (i18n) full root layout
139
+ │ │ │ └── page.tsx # (i18n) localized home
140
+ │ │ ├── layout.tsx # passthrough shell (i18n) or full layout
141
+ │ │ ├── globals.css
142
+ │ │ └── sitemap.ts
143
+ │ ├── i18n/ # (i18n)
144
+ │ │ ├── routing.ts
145
+ │ │ ├── request.ts
146
+ │ │ └── navigation.ts
147
+ │ ├── components/
148
+ │ │ ├── adapters/
149
+ │ │ │ └── nuqs.adapter.tsx
150
+ │ │ ├── atoms/
151
+ │ │ ├── molecules/
152
+ │ │ ├── organisms/
153
+ │ │ ├── primitives/
154
+ │ │ ├── providers/
155
+ │ │ │ ├── index.ts # dynamic — opted-in providers only
156
+ │ │ │ ├── theme.provider.tsx # (theming)
157
+ │ │ │ ├── locale.provider.tsx # (i18n)
158
+ │ │ │ ├── tz.provider.tsx # (i18n)
159
+ │ │ │ └── query-client.provider.tsx # (query)
160
+ │ │ └── ui/
161
+ │ │ └── sileo.tsx
162
+ │ ├── constants/
163
+ │ │ └── index.ts
164
+ │ ├── hooks/
165
+ │ ├── lib/
166
+ │ │ ├── axios/ # (axios)
167
+ │ │ │ ├── axios.client.ts
168
+ │ │ │ └── axios.server.ts
169
+ │ │ ├── fonts.ts
170
+ │ │ ├── proxy/ # (auth or i18n)
171
+ │ │ │ ├── index.ts
172
+ │ │ │ └── auth.ts # (auth)
173
+ │ │ ├── seo/
174
+ │ │ │ └── index.ts
175
+ │ │ ├── utils/
176
+ │ │ │ ├── index.ts
177
+ │ │ │ └── locale-date-formats.ts # (i18n)
178
+ │ │ └── validators/ # (auth)
179
+ │ │ ├── index.ts
180
+ │ │ └── auth.ts
181
+ │ ├── apis/ # (auth)
182
+ │ │ ├── client/
183
+ │ │ └── server/
184
+ │ └── proxy.ts # (i18n or auth)
185
+ ├── .env.local
186
+ ├── .prettierrc
187
+ ├── .husky/pre-commit # (husky)
188
+ ├── components.json
189
+ ├── eslint.config.mjs
190
+ ├── next-intl.ts # (i18n)
191
+ └── next.config.ts
192
+ ```
193
+
194
+ ---
195
+
196
+ ## Error recovery
197
+
198
+ If any step fails during setup, the CLI **pauses and shows you the exact error**. Fix the issue then press **Enter** to retry that step — no need to restart from scratch.
199
+
200
+ ---
201
+
202
+ ## Requirements
203
+
204
+ - **Node.js** 18+
205
+ - **Package manager** — npm · pnpm · bun · yarn
206
+
207
+ ---
208
+
209
+ ## Part of the Nexora family
210
+
211
+ | Package | Stack |
212
+ |---|---|
213
+ | `create-nexora-next` | Next.js |
214
+ | `create-nexora-go` | *(coming soon)* |
215
+
216
+ ---
217
+
218
+ ## Author
219
+
220
+ **Chiatiah Rayan** · [rayanstudio.dev](https://rayanstudio.dev) · [@bbrainttech](https://github.com/bbrainttech)
221
+
222
+ ---
223
+
224
+ <div align="center">
225
+
226
+ Made with 🔥 by Rayan · MIT License
227
+
228
+ </div>
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "create-nexora-next",
3
- "version": "0.3.7",
4
- "description": "The official Next.js scaffolding CLI by Rayan — batteries included.",
5
- "type": "module",
6
- "bin": {
7
- "create-nexora-next": "src/index.js"
8
- },
9
- "files": [
10
- "src"
11
- ],
12
- "scripts": {
13
- "start": "node src/index.js",
14
- "dev": "node src/index.js"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/grimstack/create-nexora-next.git"
19
- },
20
- "contributors": [
21
- {
22
- "name": "Chiatiah Rayan",
23
- "email": "hello@rayanstudio.dev",
24
- "url": "https://github.com/bbrainttech"
25
- }
26
- ],
27
- "dependencies": {
28
- "@clack/prompts": "^0.9.0",
29
- "picocolors": "^1.1.1"
30
- },
31
- "engines": {
32
- "node": ">=18.0.0"
33
- },
34
- "keywords": [
35
- "nextjs",
36
- "scaffold",
37
- "cli",
38
- "create-app",
39
- "rayan",
40
- "next-intl",
41
- "shadcn",
42
- "tanstack"
43
- ],
44
- "author": "Rayan",
45
- "license": "MIT"
46
- }
1
+ {
2
+ "name": "create-nexora-next",
3
+ "version": "0.4.8",
4
+ "description": "The official Next.js scaffolding CLI by Rayan — batteries included.",
5
+ "type": "module",
6
+ "bin": {
7
+ "create-nexora-next": "src/index.js"
8
+ },
9
+ "files": [
10
+ "src"
11
+ ],
12
+ "scripts": {
13
+ "start": "node src/index.js",
14
+ "dev": "node src/index.js"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/grimstack/create-nexora-next.git"
19
+ },
20
+ "contributors": [
21
+ {
22
+ "name": "Chiatiah Rayan",
23
+ "email": "hello@rayanstudio.dev",
24
+ "url": "https://github.com/bbrainttech"
25
+ }
26
+ ],
27
+ "dependencies": {
28
+ "@clack/prompts": "^0.9.0",
29
+ "picocolors": "^1.1.1"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
33
+ },
34
+ "keywords": [
35
+ "nextjs",
36
+ "scaffold",
37
+ "cli",
38
+ "create-app",
39
+ "rayan",
40
+ "next-intl",
41
+ "shadcn",
42
+ "tanstack"
43
+ ],
44
+ "author": "Rayan",
45
+ "license": "MIT"
46
+ }