bsmnt 0.2.9 → 0.2.11

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 (197) hide show
  1. package/README.md +84 -146
  2. package/dist/configs/skills.d.ts +27 -0
  3. package/dist/configs/skills.d.ts.map +1 -0
  4. package/dist/configs/skills.js +18 -0
  5. package/dist/configs/skills.js.map +1 -0
  6. package/dist/configs/skills.json +26 -0
  7. package/dist/helpers/add/hooks-config.d.ts.map +1 -1
  8. package/dist/helpers/add/hooks-config.js +0 -6
  9. package/dist/helpers/add/hooks-config.js.map +1 -1
  10. package/dist/helpers/create/setup-agent.d.ts.map +1 -1
  11. package/dist/helpers/create/setup-agent.js +15 -5
  12. package/dist/helpers/create/setup-agent.js.map +1 -1
  13. package/dist/helpers/integrate/merge-config.d.ts.map +1 -1
  14. package/dist/helpers/integrate/merge-config.js +1 -0
  15. package/dist/helpers/integrate/merge-config.js.map +1 -1
  16. package/dist/helpers/integrate/sanity/config.d.ts.map +1 -1
  17. package/dist/helpers/integrate/sanity/config.js +8 -2
  18. package/dist/helpers/integrate/sanity/config.js.map +1 -1
  19. package/dist/helpers/integrate/sanity/mergers/layout-merger.d.ts.map +1 -1
  20. package/dist/helpers/integrate/sanity/mergers/layout-merger.js +13 -12
  21. package/dist/helpers/integrate/sanity/mergers/layout-merger.js.map +1 -1
  22. package/dist/helpers/skills/index.d.ts +10 -0
  23. package/dist/helpers/skills/index.d.ts.map +1 -0
  24. package/dist/helpers/skills/index.js +136 -0
  25. package/dist/helpers/skills/index.js.map +1 -0
  26. package/dist/index.js +18 -0
  27. package/dist/index.js.map +1 -1
  28. package/package.json +4 -3
  29. package/src/helpers/integrate/sanity/files/app/api/blog/[slug]/route.ts +2 -1
  30. package/src/helpers/integrate/sanity/files/lib/integrations/sanity/confirm-publish-action.ts +31 -0
  31. package/src/helpers/integrate/sanity/files/lib/integrations/sanity/sanity.config.ts +17 -0
  32. package/src/helpers/integrate/sanity/files/lib/utils/json-ld.tsx +249 -0
  33. package/src/template-hooks/config.js +0 -6
  34. package/src/templates/next-default/README.md +28 -199
  35. package/src/templates/next-default/app/layout.tsx +20 -3
  36. package/src/templates/next-default/biome.json +1 -14
  37. package/src/templates/next-default/components/layout/theme/index.tsx +2 -5
  38. package/src/templates/next-default/components/layout/wrapper/index.tsx +1 -2
  39. package/src/templates/next-default/components/ui/README.md +2 -3
  40. package/src/templates/next-default/components/ui/image/index.tsx +3 -3
  41. package/src/templates/next-default/lib/README.md +3 -3
  42. package/src/templates/next-default/lib/hooks/use-device-detection.ts +4 -3
  43. package/src/templates/next-default/lib/hooks/use-media-breakpoint.ts +11 -4
  44. package/src/templates/next-default/lib/hooks/use-media.ts +29 -0
  45. package/src/templates/next-default/lib/scripts/dev.ts +9 -29
  46. package/src/templates/next-default/lib/styles/README.md +7 -58
  47. package/src/templates/next-default/lib/styles/fonts.ts +7 -15
  48. package/src/templates/next-default/lib/styles/global.css +198 -0
  49. package/src/templates/next-default/lib/styles/index.css +3 -0
  50. package/src/templates/next-default/lib/styles/tokens.css +179 -0
  51. package/src/templates/next-default/lib/utils/global-css.d.ts +1 -0
  52. package/src/templates/next-default/lib/utils/json-ld.tsx +199 -0
  53. package/src/templates/next-default/lib/utils/viewport.ts +11 -5
  54. package/src/templates/next-default/next.config.ts +0 -1
  55. package/src/templates/next-default/package.json +11 -18
  56. package/src/templates/next-default/postcss.config.mjs +0 -14
  57. package/src/templates/next-default/tsconfig.json +1 -0
  58. package/src/templates/next-default/tsconfig.tsbuildinfo +1 -0
  59. package/src/templates/next-experiments/README.md +29 -200
  60. package/src/templates/next-experiments/app/layout.tsx +20 -3
  61. package/src/templates/next-experiments/app/page.tsx +46 -39
  62. package/src/templates/next-experiments/biome.json +1 -14
  63. package/src/templates/next-experiments/components/layout/theme/index.tsx +2 -5
  64. package/src/templates/next-experiments/components/layout/wrapper/index.tsx +1 -2
  65. package/src/templates/next-experiments/components/ui/README.md +2 -3
  66. package/src/templates/next-experiments/components/ui/image/index.tsx +3 -2
  67. package/src/templates/next-experiments/lib/README.md +3 -3
  68. package/src/templates/next-experiments/lib/hooks/use-device-detection.ts +4 -3
  69. package/src/templates/next-experiments/lib/hooks/use-media-breakpoint.ts +11 -4
  70. package/src/templates/next-experiments/lib/hooks/use-media.ts +29 -0
  71. package/src/templates/next-experiments/lib/scripts/dev.ts +9 -29
  72. package/src/templates/next-experiments/lib/styles/README.md +7 -58
  73. package/src/templates/next-experiments/lib/styles/fonts.ts +7 -15
  74. package/src/templates/next-experiments/lib/styles/global.css +198 -0
  75. package/src/templates/next-experiments/lib/styles/index.css +3 -0
  76. package/src/templates/next-experiments/lib/styles/tokens.css +179 -0
  77. package/src/templates/next-experiments/lib/utils/global-css.d.ts +1 -0
  78. package/src/templates/next-experiments/lib/utils/json-ld.tsx +199 -0
  79. package/src/templates/next-experiments/lib/utils/viewport.ts +11 -5
  80. package/src/templates/next-experiments/next.config.ts +0 -1
  81. package/src/templates/next-experiments/package.json +11 -22
  82. package/src/templates/next-experiments/postcss.config.mjs +0 -14
  83. package/src/templates/next-experiments/tsconfig.json +1 -0
  84. package/src/templates/next-experiments/tsconfig.tsbuildinfo +1 -0
  85. package/src/templates/next-webgl/README.md +30 -200
  86. package/src/templates/next-webgl/app/layout.tsx +20 -3
  87. package/src/templates/next-webgl/biome.json +1 -14
  88. package/src/templates/next-webgl/components/layout/theme/index.tsx +2 -5
  89. package/src/templates/next-webgl/components/layout/wrapper/index.tsx +1 -2
  90. package/src/templates/next-webgl/components/ui/README.md +2 -3
  91. package/src/templates/next-webgl/components/ui/image/index.tsx +3 -3
  92. package/src/templates/next-webgl/lib/README.md +3 -3
  93. package/src/templates/next-webgl/lib/hooks/use-device-detection.ts +4 -3
  94. package/src/templates/next-webgl/lib/hooks/use-media-breakpoint.ts +11 -4
  95. package/src/templates/next-webgl/lib/hooks/use-media.ts +29 -0
  96. package/src/templates/next-webgl/lib/scripts/dev.ts +9 -29
  97. package/src/templates/next-webgl/lib/styles/README.md +7 -58
  98. package/src/templates/next-webgl/lib/styles/fonts.ts +7 -15
  99. package/src/templates/next-webgl/lib/styles/global.css +198 -0
  100. package/src/templates/next-webgl/lib/styles/index.css +3 -0
  101. package/src/templates/next-webgl/lib/styles/tokens.css +179 -0
  102. package/src/templates/next-webgl/lib/utils/global-css.d.ts +1 -0
  103. package/src/templates/next-webgl/lib/utils/json-ld.tsx +199 -0
  104. package/src/templates/next-webgl/lib/utils/viewport.ts +11 -5
  105. package/src/templates/next-webgl/next.config.ts +0 -1
  106. package/src/templates/next-webgl/package.json +11 -20
  107. package/src/templates/next-webgl/postcss.config.mjs +0 -14
  108. package/src/templates/next-webgl/tsconfig.json +1 -0
  109. package/src/templates/next-webgl/tsconfig.tsbuildinfo +1 -0
  110. package/plugins/no-anchor-element.grit +0 -11
  111. package/plugins/no-relative-parent-imports.grit +0 -6
  112. package/plugins/no-unnecessary-forwardref.grit +0 -5
  113. package/src/template-hooks/use-media.ts +0 -33
  114. package/src/templates/next-default/components/ui/image/image.module.css +0 -5
  115. package/src/templates/next-default/lib/scripts/generate-component.ts +0 -322
  116. package/src/templates/next-default/lib/scripts/generate-page.ts +0 -193
  117. package/src/templates/next-default/lib/scripts/generate.ts +0 -79
  118. package/src/templates/next-default/lib/store/app.ts +0 -11
  119. package/src/templates/next-default/lib/store/index.ts +0 -11
  120. package/src/templates/next-default/lib/styles/colors.ts +0 -63
  121. package/src/templates/next-default/lib/styles/config.ts +0 -34
  122. package/src/templates/next-default/lib/styles/css/global.css +0 -85
  123. package/src/templates/next-default/lib/styles/css/index.css +0 -6
  124. package/src/templates/next-default/lib/styles/css/reset.css +0 -166
  125. package/src/templates/next-default/lib/styles/css/root.css +0 -68
  126. package/src/templates/next-default/lib/styles/css/tailwind.css +0 -132
  127. package/src/templates/next-default/lib/styles/easings.ts +0 -21
  128. package/src/templates/next-default/lib/styles/index.ts +0 -12
  129. package/src/templates/next-default/lib/styles/layout.mjs +0 -27
  130. package/src/templates/next-default/lib/styles/scripts/README.md +0 -29
  131. package/src/templates/next-default/lib/styles/scripts/generate-root.ts +0 -57
  132. package/src/templates/next-default/lib/styles/scripts/generate-tailwind.ts +0 -162
  133. package/src/templates/next-default/lib/styles/scripts/postcss-functions.mjs +0 -168
  134. package/src/templates/next-default/lib/styles/scripts/setup-styles.ts +0 -24
  135. package/src/templates/next-default/lib/styles/scripts/utils.ts +0 -20
  136. package/src/templates/next-default/lib/styles/typography.ts +0 -36
  137. package/src/templates/next-default/lib/utils/css.d.ts +0 -21
  138. package/src/templates/next-default/lib/utils/math.test.ts +0 -221
  139. package/src/templates/next-default/lib/utils/strings.test.ts +0 -166
  140. package/src/templates/next-default/lib/utils/viewport.test.ts +0 -256
  141. package/src/templates/next-default/public/fonts/geist/Geist-Mono.woff2 +0 -0
  142. package/src/templates/next-experiments/components/ui/image/image.module.css +0 -5
  143. package/src/templates/next-experiments/lib/scripts/generate-component.ts +0 -322
  144. package/src/templates/next-experiments/lib/scripts/generate-page.ts +0 -193
  145. package/src/templates/next-experiments/lib/scripts/generate.ts +0 -79
  146. package/src/templates/next-experiments/lib/store/app.ts +0 -11
  147. package/src/templates/next-experiments/lib/store/index.ts +0 -11
  148. package/src/templates/next-experiments/lib/styles/colors.ts +0 -63
  149. package/src/templates/next-experiments/lib/styles/config.ts +0 -34
  150. package/src/templates/next-experiments/lib/styles/css/global.css +0 -85
  151. package/src/templates/next-experiments/lib/styles/css/index.css +0 -6
  152. package/src/templates/next-experiments/lib/styles/css/reset.css +0 -166
  153. package/src/templates/next-experiments/lib/styles/css/root.css +0 -68
  154. package/src/templates/next-experiments/lib/styles/css/tailwind.css +0 -132
  155. package/src/templates/next-experiments/lib/styles/easings.ts +0 -21
  156. package/src/templates/next-experiments/lib/styles/index.ts +0 -12
  157. package/src/templates/next-experiments/lib/styles/layout.mjs +0 -27
  158. package/src/templates/next-experiments/lib/styles/scripts/README.md +0 -29
  159. package/src/templates/next-experiments/lib/styles/scripts/generate-root.ts +0 -57
  160. package/src/templates/next-experiments/lib/styles/scripts/generate-tailwind.ts +0 -162
  161. package/src/templates/next-experiments/lib/styles/scripts/postcss-functions.mjs +0 -168
  162. package/src/templates/next-experiments/lib/styles/scripts/setup-styles.ts +0 -24
  163. package/src/templates/next-experiments/lib/styles/scripts/utils.ts +0 -20
  164. package/src/templates/next-experiments/lib/styles/typography.ts +0 -36
  165. package/src/templates/next-experiments/lib/utils/css.d.ts +0 -21
  166. package/src/templates/next-experiments/lib/utils/math.test.ts +0 -221
  167. package/src/templates/next-experiments/lib/utils/strings.test.ts +0 -166
  168. package/src/templates/next-experiments/lib/utils/viewport.test.ts +0 -256
  169. package/src/templates/next-experiments/public/fonts/geist/Geist-Mono.woff2 +0 -0
  170. package/src/templates/next-webgl/components/ui/image/image.module.css +0 -5
  171. package/src/templates/next-webgl/lib/scripts/generate-component.ts +0 -322
  172. package/src/templates/next-webgl/lib/scripts/generate-page.ts +0 -193
  173. package/src/templates/next-webgl/lib/scripts/generate.ts +0 -79
  174. package/src/templates/next-webgl/lib/store/app.ts +0 -11
  175. package/src/templates/next-webgl/lib/store/index.ts +0 -11
  176. package/src/templates/next-webgl/lib/styles/colors.ts +0 -63
  177. package/src/templates/next-webgl/lib/styles/config.ts +0 -34
  178. package/src/templates/next-webgl/lib/styles/css/global.css +0 -85
  179. package/src/templates/next-webgl/lib/styles/css/index.css +0 -6
  180. package/src/templates/next-webgl/lib/styles/css/reset.css +0 -166
  181. package/src/templates/next-webgl/lib/styles/css/root.css +0 -68
  182. package/src/templates/next-webgl/lib/styles/css/tailwind.css +0 -132
  183. package/src/templates/next-webgl/lib/styles/easings.ts +0 -21
  184. package/src/templates/next-webgl/lib/styles/index.ts +0 -12
  185. package/src/templates/next-webgl/lib/styles/layout.mjs +0 -27
  186. package/src/templates/next-webgl/lib/styles/scripts/README.md +0 -29
  187. package/src/templates/next-webgl/lib/styles/scripts/generate-root.ts +0 -57
  188. package/src/templates/next-webgl/lib/styles/scripts/generate-tailwind.ts +0 -162
  189. package/src/templates/next-webgl/lib/styles/scripts/postcss-functions.mjs +0 -168
  190. package/src/templates/next-webgl/lib/styles/scripts/setup-styles.ts +0 -24
  191. package/src/templates/next-webgl/lib/styles/scripts/utils.ts +0 -20
  192. package/src/templates/next-webgl/lib/styles/typography.ts +0 -36
  193. package/src/templates/next-webgl/lib/utils/css.d.ts +0 -21
  194. package/src/templates/next-webgl/lib/utils/math.test.ts +0 -221
  195. package/src/templates/next-webgl/lib/utils/strings.test.ts +0 -166
  196. package/src/templates/next-webgl/lib/utils/viewport.test.ts +0 -256
  197. package/src/templates/next-webgl/public/fonts/geist/Geist-Mono.woff2 +0 -0
@@ -1,221 +1,50 @@
1
1
  # Basement Next Starter
2
2
 
3
- A production-ready Next.js starter with React 19, Tailwind CSS v4, TypeScript strict mode, and everything you need to build modern web applications.
4
-
5
- ## Tech Stack
6
-
7
- | Technology | Version | Description |
8
- |------------|---------|-------------|
9
- | Next.js | 16.1 | App Router, Turbopack |
10
- | React | 19 | React Compiler enabled |
11
- | TypeScript | 5.9 | Strict mode, `noUncheckedIndexedAccess` |
12
- | Tailwind CSS | 4 | CSS-first configuration |
13
- | Biome | 2.3 | Linting and formatting |
14
- | Bun | 1.3 | Package manager and runtime |
15
- | Zustand | 5.0 | State management |
3
+ Minimal Next.js starter with Tailwind CSS, TypeScript, and Basement defaults.
16
4
 
17
5
  ## Quick Start
18
6
 
19
7
  ```bash
20
- # Clone the template
21
- bunx degit basementstudio/next-starter my-project
22
-
23
- # Install dependencies
24
- cd my-project && bun install
25
-
26
- # Start development
8
+ bun install
27
9
  bun dev
28
10
  ```
29
11
 
30
- Open [http://localhost:3000](http://localhost:3000) to see the result.
31
-
32
12
  ## Scripts
33
13
 
34
14
  | Command | Description |
35
15
  |---------|-------------|
36
- | `bun dev` | Start development server with Turbopack |
37
- | `bun dev:https` | Start with HTTPS (for secure contexts) |
16
+ | `bun dev` | Start the development server |
17
+ | `bun dev:https` | Start the development server with HTTPS |
38
18
  | `bun build` | Build for production |
39
- | `bun start` | Start production server |
40
- | `bun generate` | Scaffold new components/hooks |
41
- | `bun lint` | Run Biome linter |
42
- | `bun lint:fix` | Fix lint issues |
43
- | `bun format` | Format code with Biome |
44
- | `bun typecheck` | Type check with tsgo |
45
- | `bun test` | Run tests with Bun |
46
- | `bun analyze` | Analyze bundle size |
19
+ | `bun start` | Start the production server |
20
+ | `bun lint` | Run Biome |
21
+ | `bun lint:fix` | Run Biome with fixes |
22
+ | `bun format` | Format the codebase |
23
+ | `bun typecheck` | Run TypeScript |
24
+ | `bun analyze` | Analyze the Next.js bundle |
47
25
 
48
26
  ## Project Structure
49
27
 
50
- ```
51
- app/ # Next.js App Router pages and routes
52
- ├── api/ # API routes (draft-mode, revalidate)
53
- ├── layout.tsx # Root layout with metadata, fonts
54
- ├── page.tsx # Homepage
55
- ├── sitemap.ts # Dynamic sitemap generation
56
- └── robots.ts # SEO robots.txt
57
-
28
+ ```txt
29
+ app/
58
30
  components/
59
- ├── layout/
60
- │ ├── header/ # Navigation header
61
- │ ├── footer/ # Page footer
62
- │ ├── wrapper/ # Page wrapper with theme
63
- │ └── theme/ # Theme context provider
64
- └── ui/
65
- ├── image/ # Enhanced Next.js Image wrapper
66
- └── link/ # Smart Link component
67
-
68
31
  lib/
69
- ├── hooks/ # Custom React hooks
70
- │ ├── use-device-detection/ # Device/capability detection
71
- │ ├── use-media-breakpoint/ # Responsive breakpoint hook
72
- │ └── use-prefetch/ # Prefetch utilities
73
- ├── integrations/ # Third-party integrations
74
- ├── scripts/ # Build and dev scripts
75
- ├── store/ # Zustand global state
76
- ├── styles/ # Design tokens, CSS config
77
- │ ├── colors.ts # Theme colors
78
- │ ├── layout.mjs # Breakpoints, grid, spacing
79
- │ ├── easings.ts # CSS easing variables
80
- │ └── fonts.ts # Font loading (Geist Mono)
81
- └── utils/ # Utility functions
82
- ├── easings.ts # 30+ animation easing functions
83
- ├── math.ts # Math utilities
84
- ├── strings.ts # String utilities
85
- └── fetch.ts # Fetch utilities
86
- ```
87
-
88
- ## Features
89
-
90
- ### Design System
91
-
92
- Pre-configured design tokens ready to use:
93
-
94
- **Breakpoints:**
95
- - `mobile`: 375px
96
- - `tablet`: 620px
97
- - `tablet-lg`: 1024px
98
- - `desktop`: 1440px
99
- - `desktop-large`: 1920px
100
-
101
- **Grid:**
102
- - Mobile: 4 columns
103
- - Desktop: 12 columns
104
- - Gap: 16px
105
-
106
- **Colors:**
107
- - Theme colors: `primary`, `secondary`, `contrast`
108
- - Accent colors: `red`, `blue`, `green`, `violet`, `pink`
109
- - Light/dark mode support
110
-
111
- **Easings:**
112
- 30+ easing functions (quad, cubic, quart, quint, sine, expo, circ, back, elastic, bounce)
113
-
114
- ### Smart Components
115
-
116
- **`<Image>`** - Enhanced Next.js Image wrapper:
117
- - Automatic responsive sizes based on breakpoints
118
- - Blur placeholder with shimmer effect
119
- - Preload support for LCP images
120
- - SVG handling
121
-
122
- **`<Link>`** - Intelligent link component:
123
- - Auto-detects external links (opens in new tab)
124
- - Connection-aware prefetching (4G only, respects data saver)
125
- - Falls back to button/div when no href
126
- - Active state detection
127
-
128
- **`<Wrapper>`** - Page layout component:
129
- - Includes Header and Footer
130
- - Theme provider integration
131
- - Flexible content area
132
-
133
- ### Theme Support
134
-
135
- Light/dark theme with CSS custom properties:
136
-
137
- ```tsx
138
- import { Wrapper } from "@/components/layout/wrapper"
139
-
140
- export default function Page() {
141
- return (
142
- <Wrapper theme="dark">
143
- <section>Your content</section>
144
- </Wrapper>
145
- )
146
- }
32
+ hooks/
33
+ integrations/
34
+ scripts/
35
+ store/
36
+ styles/
37
+ index.css
38
+ tokens.css
39
+ global.css
40
+ fonts.ts
41
+ cn.ts
42
+ utils/
147
43
  ```
148
44
 
149
- Access theme in components:
150
-
151
- ```tsx
152
- import { useTheme } from "@/components/layout/theme"
153
-
154
- function Component() {
155
- const { name, setThemeName } = useTheme()
156
- // ...
157
- }
158
- ```
159
-
160
- ### Performance Optimizations
161
-
162
- - **React Compiler** - Automatic memoization (no manual `useMemo`/`useCallback`)
163
- - **Turbopack** - Fast development builds
164
- - **Bundle Analyzer** - `bun analyze` to inspect bundle size
165
- - **Optimized Imports** - Auto-optimization for GSAP, Three.js, Lenis, Zustand
166
- - **Security Headers** - CSP, HSTS, XSS protection pre-configured
167
- - **Image Optimization** - AVIF, WebP with custom quality settings
168
-
169
- ### Developer Experience
170
-
171
- - **Component Scaffolding** - `bun generate` to create components/hooks
172
- - **HTTPS Dev Server** - `bun dev:https` for secure contexts
173
- - **Strict TypeScript** - `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`
174
- - **Biome** - Fast linting and formatting with custom rules
175
- - **Tests** - Bun test runner with utilities
176
-
177
- ## Configuration
178
-
179
- ### Styles
180
-
181
- Edit design tokens in `lib/styles/`:
182
-
183
- - `colors.ts` - Theme and accent colors
184
- - `layout.mjs` - Breakpoints, grid, spacing
185
- - `typography.ts` - Font definitions
186
- - `easings.ts` - CSS easing variables
187
-
188
- After editing, regenerate CSS:
189
-
190
- ```bash
191
- bun setup:styles
192
- ```
193
-
194
- ### Next.js
195
-
196
- Configuration in `next.config.ts`:
197
-
198
- - React Compiler enabled
199
- - Typed routes
200
- - SVG loader (@svgr/webpack)
201
- - Security headers
202
- - Image optimization settings
203
-
204
- ## Deployment
205
-
206
- ### Vercel (Recommended)
207
-
208
- [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/basementstudio/next-starter)
209
-
210
- ### Other Platforms
211
-
212
- ```bash
213
- bun build
214
- bun start
215
- ```
216
-
217
- The app runs on port 3000 by default.
218
-
219
- ## License
45
+ ## Styling
220
46
 
221
- MIT
47
+ - Import `@/lib/styles/index.css` once in `app/layout.tsx`.
48
+ - Edit `lib/styles/tokens.css` for theme variables, breakpoints, and custom Tailwind utilities.
49
+ - Edit `lib/styles/global.css` for reset rules and app-wide global styles.
50
+ - `lib/styles/fonts.ts` handles font variables.
@@ -2,11 +2,15 @@ import type { Metadata, Viewport } from "next";
2
2
  import { Geist } from "next/font/google";
3
3
  import { type PropsWithChildren, Suspense } from "react";
4
4
  import { Link } from "@/components/ui/link";
5
- import { themes } from "@/lib/styles/colors";
6
5
  import { fontsVariable } from "@/lib/styles/fonts";
7
6
  import AppData from "@/package.json";
8
- import "@/lib/styles/css/index.css";
7
+ import "@/lib/styles/index.css";
9
8
  import { cn } from "@/lib/styles/cn";
9
+ import {
10
+ JsonLd,
11
+ generateWebSiteJsonLd,
12
+ generateOrganizationJsonLd,
13
+ } from "@/lib/utils/json-ld";
10
14
 
11
15
  const APP_NAME = AppData.name;
12
16
  const APP_DEFAULT_TITLE = "Basement Starter";
@@ -74,7 +78,7 @@ export const metadata: Metadata = {
74
78
 
75
79
  export const viewport: Viewport = {
76
80
  colorScheme: "normal",
77
- themeColor: themes.dark.primary,
81
+ themeColor: "#000000",
78
82
  };
79
83
 
80
84
  export default async function Layout({ children }: PropsWithChildren) {
@@ -87,6 +91,19 @@ export default async function Layout({ children }: PropsWithChildren) {
87
91
  suppressHydrationWarning
88
92
  >
89
93
  <body>
94
+ <JsonLd
95
+ data={generateWebSiteJsonLd({
96
+ name: APP_DEFAULT_TITLE,
97
+ description: APP_DESCRIPTION,
98
+ })}
99
+ />
100
+ <JsonLd
101
+ data={generateOrganizationJsonLd({
102
+ name: APP_NAME,
103
+ logo: "/opengraph-image.jpg",
104
+ })}
105
+ />
106
+
90
107
  {/* Skip link for keyboard navigation accessibility */}
91
108
  <Suspense fallback={null}>
92
109
  <Link
@@ -214,20 +214,7 @@
214
214
  }
215
215
  },
216
216
  {
217
- "includes": ["**/*.module.css"],
218
- "linter": {
219
- "rules": {
220
- "correctness": {
221
- "noUnknownProperty": "off"
222
- },
223
- "style": {
224
- "noDescendingSpecificity": "off"
225
- }
226
- }
227
- }
228
- },
229
- {
230
- "includes": ["lib/styles/css/root.css"],
217
+ "includes": ["lib/styles/tokens.css"],
231
218
  "linter": {
232
219
  "rules": {
233
220
  "suspicious": {
@@ -2,16 +2,14 @@
2
2
 
3
3
  import { usePathname } from "next/navigation"
4
4
  import { createContext, useContext, useEffect, useState } from "react"
5
- import type { Themes } from "@/lib/styles/colors"
6
- import { type ThemeName, themes } from "@/lib/styles/config"
5
+
6
+ export type ThemeName = "light" | "dark"
7
7
 
8
8
  export const ThemeContext = createContext<{
9
9
  name: ThemeName
10
- theme: Themes[ThemeName]
11
10
  setThemeName: (theme: ThemeName) => void
12
11
  }>({
13
12
  name: "light",
14
- theme: themes.light,
15
13
  setThemeName: () => {
16
14
  void 0
17
15
  },
@@ -55,7 +53,6 @@ export function Theme({
55
53
  <ThemeContext.Provider
56
54
  value={{
57
55
  name: currentTheme,
58
- theme: themes[currentTheme],
59
56
  setThemeName: setCurrentTheme,
60
57
  }}
61
58
  >
@@ -6,8 +6,7 @@
6
6
  import cn from "clsx"
7
7
  import { Footer } from "@/components/layout/footer"
8
8
  import { Header } from "@/components/layout/header"
9
- import { Theme } from "@/components/layout/theme"
10
- import type { ThemeName } from "@/lib/styles/config"
9
+ import { Theme, type ThemeName } from "@/components/layout/theme"
11
10
 
12
11
  /**
13
12
  * Props for the Wrapper component.
@@ -65,9 +65,8 @@ import { Link } from '@/components/ui/link'
65
65
  <Link href="/about">Internal</Link>
66
66
  <Link href="https://example.com">External</Link>
67
67
 
68
- // ✅ CSS Modules + Tailwind
69
- import s from './component.module.css'
70
- <div className={cn(s.wrapper, 'flex items-center')} />
68
+ // ✅ Tailwind only
69
+ <div className="flex items-center" />
71
70
  ```
72
71
 
73
72
  ## Related
@@ -9,7 +9,8 @@
9
9
  import cn from "clsx"
10
10
  import NextImage, { type ImageProps as NextImageProps } from "next/image"
11
11
  import type { CSSProperties, Ref } from "react"
12
- import { breakpoints } from "@/lib/styles/config"
12
+
13
+ const DESKTOP_BREAKPOINT = 1440
13
14
 
14
15
  /**
15
16
  * Enhanced Image component props extending Next.js Image.
@@ -166,8 +167,7 @@ export function Image({
166
167
  }: ImageProps) {
167
168
  // Generate responsive sizes if not provided
168
169
  const finalSizes =
169
- sizes ||
170
- `(max-width: ${breakpoints.desktop}px) ${mobileSize}, ${desktopSize}`
170
+ sizes || `(max-width: ${DESKTOP_BREAKPOINT}px) ${mobileSize}, ${desktopSize}`
171
171
 
172
172
  // Early return after hooks
173
173
  if (!src) return null
@@ -27,7 +27,7 @@ import { colors, themes, breakpoints } from '@/lib/styles/config'
27
27
 
28
28
  ```bash
29
29
  bun dev # Start dev server
30
- bun run generate # Generate pages/components
31
- bun run setup:project # Configure integrations
32
- bun setup:styles # Regenerate CSS
30
+ bun build # Create production build
31
+ bun lint:fix # Fix lint issues
32
+ bun typecheck # Run type checks
33
33
  ```
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from "react"
2
- import { useMedia } from "react-use"
3
- import { breakpoints } from "@/lib/styles/config"
2
+ import { useMedia } from "./use-media"
3
+
4
+ const MOBILE_BREAKPOINT = 640
4
5
 
5
6
  /**
6
7
  * Hook for detecting device capabilities and characteristics.
@@ -58,7 +59,7 @@ import { breakpoints } from "@/lib/styles/config"
58
59
  * ```
59
60
  */
60
61
  export function useDeviceDetection() {
61
- const isMobile = useMedia(`(max-width: ${breakpoints.mobile - 1}px)`, true)
62
+ const isMobile = useMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`, true)
62
63
  const isReducedMotion = useMedia("(prefers-reduced-motion: reduce)")
63
64
  const [dpr, setDpr] = useState<number | undefined>(undefined)
64
65
  const [isSafari, setIsSafari] = useState<boolean | undefined>(undefined)
@@ -1,5 +1,12 @@
1
- import { useMedia } from "react-use"
2
- import { breakpoints } from "@/lib/styles/config"
1
+ import { useMedia } from "./use-media"
2
+
3
+ const BREAKPOINTS = {
4
+ "desktop-large": 1920,
5
+ desktop: 1440,
6
+ "tablet-lg": 1024,
7
+ tablet: 768,
8
+ mobile: 640,
9
+ } as const
3
10
 
4
11
  /**
5
12
  * Hook for detecting if the viewport is at a specific breakpoint.
@@ -8,8 +15,8 @@ import { breakpoints } from "@/lib/styles/config"
8
15
  * @returns True if the viewport is at the breakpoint
9
16
  */
10
17
  export function useMediaBreakpoint(
11
- breakpoint: keyof typeof breakpoints,
18
+ breakpoint: keyof typeof BREAKPOINTS,
12
19
  defaultState = false
13
20
  ) {
14
- return useMedia(`(min-width: ${breakpoints[breakpoint]}px)`, defaultState)
21
+ return useMedia(`(min-width: ${BREAKPOINTS[breakpoint]}px)`, defaultState)
15
22
  }
@@ -0,0 +1,29 @@
1
+ import { useEffect, useState } from "react"
2
+
3
+ export function useMedia(mediaQuery: string, initialValue?: boolean) {
4
+ const [isVerified, setIsVerified] = useState<boolean | undefined>(initialValue)
5
+
6
+ useEffect(() => {
7
+ if (typeof window === "undefined" || !("matchMedia" in window)) {
8
+ console.warn("matchMedia is not supported by your current browser")
9
+ return
10
+ }
11
+ const mediaQueryList = window.matchMedia(mediaQuery)
12
+ const changeHandler = () => setIsVerified(!!mediaQueryList.matches)
13
+
14
+ changeHandler()
15
+ if (typeof mediaQueryList.addEventListener === "function") {
16
+ mediaQueryList.addEventListener("change", changeHandler)
17
+ return () => {
18
+ mediaQueryList.removeEventListener("change", changeHandler)
19
+ }
20
+ } else if (typeof mediaQueryList.addListener === "function") {
21
+ mediaQueryList.addListener(changeHandler)
22
+ return () => {
23
+ mediaQueryList.removeListener(changeHandler)
24
+ }
25
+ }
26
+ }, [mediaQuery])
27
+
28
+ return isVerified
29
+ }
@@ -1,7 +1,5 @@
1
1
  /**
2
- * Cross-platform parallel dev script
3
- * Replaces npm-run-all for running multiple processes simultaneously
4
- * Works on Windows, macOS, and Linux using Bun's native APIs
2
+ * Cross-platform Next.js dev launcher.
5
3
  */
6
4
 
7
5
  import { bunExecutable, colorEnv } from "./utils"
@@ -14,39 +12,21 @@ const nextDevArgs = [bunExecutable, "next", "dev"]
14
12
  if (isHttps) nextDevArgs.push("--experimental-https")
15
13
  if (isInspect) nextDevArgs.push("--inspect")
16
14
 
17
- // Build environment with FORCE_COLOR
18
15
  const devEnv = colorEnv()
19
16
 
20
- const processes = [
21
- // Style watcher
22
- Bun.spawn(
23
- [bunExecutable, "--watch", "./lib/styles/scripts/setup-styles.ts"],
24
- {
25
- stdout: "inherit",
26
- stderr: "inherit",
27
- env: devEnv,
28
- }
29
- ),
30
-
31
- // Next.js dev server
32
- Bun.spawn(nextDevArgs, {
33
- stdout: "inherit",
34
- stderr: "inherit",
35
- env: devEnv,
36
- }),
37
- ]
38
-
39
- // Handle graceful shutdown
17
+ const nextDevProcess = Bun.spawn(nextDevArgs, {
18
+ stdout: "inherit",
19
+ stderr: "inherit",
20
+ env: devEnv,
21
+ })
22
+
40
23
  const cleanup = () => {
41
- for (const proc of processes) {
42
- proc.kill()
43
- }
24
+ nextDevProcess.kill()
44
25
  process.exit(0)
45
26
  }
46
27
 
47
28
  process.on("SIGINT", cleanup)
48
29
  process.on("SIGTERM", cleanup)
49
30
 
50
- // Wait for any process to exit (if one crashes, we want to know)
51
- await Promise.race(processes.map((p) => p.exited))
31
+ await nextDevProcess.exited
52
32
  cleanup()
@@ -1,64 +1,13 @@
1
1
  # Styles
2
2
 
3
- Hybrid styling with Tailwind CSS v4 and custom PostCSS functions.
3
+ Minimal Tailwind setup for the starter.
4
4
 
5
- ## PostCSS Functions
6
-
7
- ```css
8
- /* Viewport-relative sizing */
9
- .element {
10
- width: tovw(100); /* 6.94vw (100px at 1440px) */
11
- width: tovw(100, 50); /* max(50px, 6.94vw) */
12
- width: tovw(16, undefined, 'mobile'); /* 4.27vw (16px at 375px) */
13
- }
14
-
15
- /* Relative units */
16
- .text {
17
- font-size: torem(24); /* 1.5rem (24px / 16px) */
18
- padding: toem(16, 14); /* 1.14em (16px / 14px) */
19
- }
20
-
21
- /* Grid columns */
22
- .sidebar {
23
- width: columns(3); /* Spans 3 columns + gaps */
24
- }
25
- ```
26
-
27
- ## Custom Utilities (`dr-*`)
28
-
29
- ```tsx
30
- // Responsive sizing (scales with viewport)
31
- <div className="dr-w-150 dr-h-100" />
32
-
33
- // Column-based sizing
34
- <div className="dr-w-col-4" /> {/* 4 columns wide */}
35
-
36
- // Grid layout
37
- <div className="dr-grid" /> {/* 4 cols mobile, 12 cols desktop */}
38
- ```
39
-
40
- ## Breakpoints
41
-
42
- ```css
43
- @media (--mobile) { /* <= 799px */ }
44
- @media (--desktop) { /* >= 800px */ }
45
- ```
46
-
47
- ## Configuration
5
+ ## Files
48
6
 
49
7
  | File | Purpose |
50
8
  |------|---------|
51
- | `colors.ts` | Color palette & themes |
52
- | `typography.ts` | Font sizes & weights |
53
- | `layout.mjs` | Grid, breakpoints, spacing |
54
- | `easings.ts` | Animation curves |
55
- | `fonts.ts` | Font loading |
56
-
57
- After changing config: `bun setup:styles`
58
-
59
- ## Generated Files (Don't Edit)
60
-
61
- - `css/root.css` — CSS custom properties
62
- - `css/tailwind.css` — Tailwind utilities
63
-
64
- See [scripts/README.md](scripts/README.md) for generation details.
9
+ | `index.css` | Single stylesheet entrypoint imported by `app/layout.tsx` |
10
+ | `tokens.css` | Theme variables, breakpoints, and custom Tailwind utilities |
11
+ | `global.css` | Reset and global app styles |
12
+ | `fonts.ts` | Font variable setup |
13
+ | `cn.ts` | Tailwind class merging helper |
@@ -1,17 +1,9 @@
1
- import localFont from "next/font/local"
1
+ import { Geist_Mono } from "next/font/google";
2
2
 
3
- const mono = localFont({
4
- src: [
5
- {
6
- path: "../../public/fonts/geist/Geist-Mono.woff2",
7
- weight: "400",
8
- style: "normal",
9
- },
10
- ],
3
+ const mono = Geist_Mono({
4
+ subsets: ["latin"],
11
5
  display: "swap",
12
6
  variable: "--geist-mono",
13
- preload: true,
14
- adjustFontFallback: "Arial",
15
7
  fallback: [
16
8
  "ui-monospace",
17
9
  "SFMono-Regular",
@@ -20,9 +12,9 @@ const mono = localFont({
20
12
  "Menlo",
21
13
  "monospace",
22
14
  ],
23
- })
15
+ });
24
16
 
25
- const fonts = [mono]
26
- const fontsVariable = fonts.map((font) => font.variable).join(" ")
17
+ const fonts = [mono];
18
+ const fontsVariable = fonts.map((font) => font.variable).join(" ");
27
19
 
28
- export { fontsVariable }
20
+ export { fontsVariable };