@undp/create-app 0.2.1 → 0.2.2

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 (276) hide show
  1. package/README.md +20 -20
  2. package/bin/generateFiles/generateEnv.js +21 -0
  3. package/bin/{templates/next/withoutDataViz/auth/app/layout.tsx → generateFiles/generateLayoutForNext.js} +35 -30
  4. package/bin/generateFiles/generateNextEnvTypes.js +9 -0
  5. package/bin/generateFiles/generatePackageJson.js +7 -4
  6. package/bin/generateFiles/generateStylesCss.js +8 -0
  7. package/bin/generateFiles/index.js +4 -0
  8. package/bin/index.js +13 -3
  9. package/bin/promptUser.js +8 -25
  10. package/bin/templates/next/auth/app/about/page.tsx +51 -0
  11. package/bin/templates/next/{withDataViz/auth → auth}/app/login/page.tsx +20 -2
  12. package/bin/templates/next/auth/app/page.tsx +75 -0
  13. package/bin/templates/next/auth/app/user/page.tsx +84 -0
  14. package/bin/templates/next/auth/public/imgs/Zustand-logo.svg +266 -0
  15. package/bin/templates/next/auth/stores/counter.ts +23 -0
  16. package/bin/templates/next/basic/app/about/page.tsx +51 -0
  17. package/bin/templates/next/basic/app/page.tsx +75 -0
  18. package/bin/templates/next/basic/public/imgs/Zustand-logo.svg +266 -0
  19. package/bin/templates/next/basic/stores/counter.ts +23 -0
  20. package/bin/templates/vite/basic/public/imgs/Zustand-logo.svg +266 -0
  21. package/bin/templates/vite/{withDataViz/query → basic}/src/App.tsx +30 -31
  22. package/bin/templates/vite/{withDataViz/basic → basic}/src/main.tsx +1 -1
  23. package/bin/templates/vite/basic/src/stores/counter.ts +23 -0
  24. package/bin/templates/vite/query/public/imgs/Zustand-logo.svg +266 -0
  25. package/bin/templates/vite/{withoutDataViz/query → query}/src/App.tsx +39 -10
  26. package/bin/templates/vite/query/src/stores/counter.ts +23 -0
  27. package/bin/templates/vite/query+router/public/imgs/Zustand-logo.svg +266 -0
  28. package/bin/templates/vite/query+router/src/App.tsx +73 -0
  29. package/bin/templates/vite/{withDataViz/query+router → query+router}/src/routes/queryDemo.tsx +12 -8
  30. package/bin/templates/vite/query+router/src/stores/counter.ts +23 -0
  31. package/bin/templates/vite/router/public/imgs/Zustand-logo.svg +266 -0
  32. package/bin/templates/vite/router/src/App.tsx +73 -0
  33. package/bin/templates/vite/{withDataViz/router → router}/src/main.tsx +2 -2
  34. package/bin/templates/vite/{withoutDataViz/router/src/App.tsx → router/src/routes/about.tsx} +14 -7
  35. package/bin/templates/vite/router/src/stores/counter.ts +23 -0
  36. package/bin/templates/vite/{withoutDataViz/router → router}/src/styles/style.css +0 -1
  37. package/package.json +1 -1
  38. package/bin/templates/next/withDataViz/auth/README.md +0 -108
  39. package/bin/templates/next/withDataViz/auth/app/about/page.tsx +0 -33
  40. package/bin/templates/next/withDataViz/auth/app/page.tsx +0 -33
  41. package/bin/templates/next/withDataViz/auth/app/user/page.tsx +0 -86
  42. package/bin/templates/next/withDataViz/basic/README.md +0 -56
  43. package/bin/templates/next/withDataViz/basic/app/about/page.tsx +0 -33
  44. package/bin/templates/next/withDataViz/basic/app/page.tsx +0 -33
  45. package/bin/templates/next/withoutDataViz/auth/app/about/page.tsx +0 -33
  46. package/bin/templates/next/withoutDataViz/auth/app/api/auth/[...all]/route.ts +0 -5
  47. package/bin/templates/next/withoutDataViz/auth/app/globals.css +0 -3
  48. package/bin/templates/next/withoutDataViz/auth/app/login/page.tsx +0 -45
  49. package/bin/templates/next/withoutDataViz/auth/app/page.tsx +0 -33
  50. package/bin/templates/next/withoutDataViz/auth/app/user/page.tsx +0 -86
  51. package/bin/templates/next/withoutDataViz/auth/components/Footer.tsx +0 -16
  52. package/bin/templates/next/withoutDataViz/auth/components/Header.tsx +0 -56
  53. package/bin/templates/next/withoutDataViz/auth/eslint.config.mjs +0 -103
  54. package/bin/templates/next/withoutDataViz/auth/lib/auth-client.ts +0 -7
  55. package/bin/templates/next/withoutDataViz/auth/lib/auth.ts +0 -30
  56. package/bin/templates/next/withoutDataViz/auth/next.config.ts +0 -10
  57. package/bin/templates/next/withoutDataViz/auth/postcss.config.mjs +0 -7
  58. package/bin/templates/next/withoutDataViz/auth/public/next.svg +0 -1
  59. package/bin/templates/next/withoutDataViz/auth/tsconfig.json +0 -34
  60. package/bin/templates/next/withoutDataViz/basic/app/about/page.tsx +0 -33
  61. package/bin/templates/next/withoutDataViz/basic/app/globals.css +0 -3
  62. package/bin/templates/next/withoutDataViz/basic/app/layout.tsx +0 -31
  63. package/bin/templates/next/withoutDataViz/basic/app/page.tsx +0 -33
  64. package/bin/templates/next/withoutDataViz/basic/components/Footer.tsx +0 -16
  65. package/bin/templates/next/withoutDataViz/basic/components/Header.tsx +0 -27
  66. package/bin/templates/next/withoutDataViz/basic/eslint.config.mjs +0 -103
  67. package/bin/templates/next/withoutDataViz/basic/next.config.ts +0 -7
  68. package/bin/templates/next/withoutDataViz/basic/postcss.config.mjs +0 -7
  69. package/bin/templates/next/withoutDataViz/basic/public/next.svg +0 -1
  70. package/bin/templates/next/withoutDataViz/basic/tsconfig.json +0 -34
  71. package/bin/templates/vite/withDataViz/basic/README.md +0 -76
  72. package/bin/templates/vite/withDataViz/basic/src/App.tsx +0 -38
  73. package/bin/templates/vite/withDataViz/basic/src/styles/style.css +0 -4
  74. package/bin/templates/vite/withDataViz/basic/vite.config.ts +0 -74
  75. package/bin/templates/vite/withDataViz/query/.prettierrc +0 -10
  76. package/bin/templates/vite/withDataViz/query/README.md +0 -80
  77. package/bin/templates/vite/withDataViz/query/public/favicon.ico +0 -0
  78. package/bin/templates/vite/withDataViz/query/src/styles/style.css +0 -4
  79. package/bin/templates/vite/withDataViz/query/tailwind.config.js +0 -7
  80. package/bin/templates/vite/withDataViz/query+router/README.md +0 -112
  81. package/bin/templates/vite/withDataViz/query+router/src/App.tsx +0 -42
  82. package/bin/templates/vite/withDataViz/query+router/src/styles/style.css +0 -4
  83. package/bin/templates/vite/withDataViz/router/.prettierrc +0 -10
  84. package/bin/templates/vite/withDataViz/router/README.md +0 -107
  85. package/bin/templates/vite/withDataViz/router/public/favicon.ico +0 -0
  86. package/bin/templates/vite/withDataViz/router/public/imgs/undp-logo-blue.svg +0 -1
  87. package/bin/templates/vite/withDataViz/router/src/App.tsx +0 -51
  88. package/bin/templates/vite/withDataViz/router/src/assets/undp-logo-blue.svg +0 -1
  89. package/bin/templates/vite/withDataViz/router/src/routes/about.tsx +0 -73
  90. package/bin/templates/vite/withDataViz/router/src/styles/style.css +0 -4
  91. package/bin/templates/vite/withDataViz/router/tailwind.config.js +0 -7
  92. package/bin/templates/vite/withoutDataViz/basic/.prettierrc +0 -10
  93. package/bin/templates/vite/withoutDataViz/basic/eslint.config.mjs +0 -97
  94. package/bin/templates/vite/withoutDataViz/basic/index.html +0 -13
  95. package/bin/templates/vite/withoutDataViz/basic/public/favicon.ico +0 -0
  96. package/bin/templates/vite/withoutDataViz/basic/public/imgs/Vitejs-logo.svg +0 -15
  97. package/bin/templates/vite/withoutDataViz/basic/public/imgs/undp-logo-blue.svg +0 -1
  98. package/bin/templates/vite/withoutDataViz/basic/src/App.tsx +0 -38
  99. package/bin/templates/vite/withoutDataViz/basic/src/assets/undp-logo-blue.svg +0 -1
  100. package/bin/templates/vite/withoutDataViz/basic/src/components/Footer.tsx +0 -14
  101. package/bin/templates/vite/withoutDataViz/basic/src/components/Header.tsx +0 -25
  102. package/bin/templates/vite/withoutDataViz/basic/src/main.tsx +0 -10
  103. package/bin/templates/vite/withoutDataViz/basic/src/styles/fonts.css +0 -213
  104. package/bin/templates/vite/withoutDataViz/basic/src/vite-env.d.ts +0 -1
  105. package/bin/templates/vite/withoutDataViz/basic/tailwind.config.js +0 -7
  106. package/bin/templates/vite/withoutDataViz/basic/tsconfig.json +0 -29
  107. package/bin/templates/vite/withoutDataViz/basic/tsconfig.node.json +0 -9
  108. package/bin/templates/vite/withoutDataViz/query/.prettierrc +0 -10
  109. package/bin/templates/vite/withoutDataViz/query/eslint.config.mjs +0 -97
  110. package/bin/templates/vite/withoutDataViz/query/index.html +0 -13
  111. package/bin/templates/vite/withoutDataViz/query/public/favicon.ico +0 -0
  112. package/bin/templates/vite/withoutDataViz/query/public/imgs/Tailwind_CSS_Logo.svg +0 -1
  113. package/bin/templates/vite/withoutDataViz/query/public/imgs/Vitejs-logo.svg +0 -15
  114. package/bin/templates/vite/withoutDataViz/query/public/imgs/logo-color-600.png +0 -0
  115. package/bin/templates/vite/withoutDataViz/query/public/imgs/undp-logo-blue.svg +0 -1
  116. package/bin/templates/vite/withoutDataViz/query/src/assets/undp-logo-blue.svg +0 -1
  117. package/bin/templates/vite/withoutDataViz/query/src/components/Footer.tsx +0 -14
  118. package/bin/templates/vite/withoutDataViz/query/src/components/Header.tsx +0 -25
  119. package/bin/templates/vite/withoutDataViz/query/src/integration/tanstack-query.tsx +0 -27
  120. package/bin/templates/vite/withoutDataViz/query/src/main.tsx +0 -21
  121. package/bin/templates/vite/withoutDataViz/query/src/styles/fonts.css +0 -213
  122. package/bin/templates/vite/withoutDataViz/query/src/vite-env.d.ts +0 -1
  123. package/bin/templates/vite/withoutDataViz/query/tailwind.config.js +0 -7
  124. package/bin/templates/vite/withoutDataViz/query/tsconfig.json +0 -29
  125. package/bin/templates/vite/withoutDataViz/query/tsconfig.node.json +0 -9
  126. package/bin/templates/vite/withoutDataViz/query/vite.config.ts +0 -75
  127. package/bin/templates/vite/withoutDataViz/query+router/.prettierrc +0 -10
  128. package/bin/templates/vite/withoutDataViz/query+router/eslint.config.mjs +0 -97
  129. package/bin/templates/vite/withoutDataViz/query+router/index.html +0 -13
  130. package/bin/templates/vite/withoutDataViz/query+router/public/favicon.ico +0 -0
  131. package/bin/templates/vite/withoutDataViz/query+router/public/imgs/Vitejs-logo.svg +0 -15
  132. package/bin/templates/vite/withoutDataViz/query+router/public/imgs/logo-color-600.png +0 -0
  133. package/bin/templates/vite/withoutDataViz/query+router/public/imgs/undp-logo-blue.svg +0 -1
  134. package/bin/templates/vite/withoutDataViz/query+router/src/App.tsx +0 -42
  135. package/bin/templates/vite/withoutDataViz/query+router/src/assets/undp-logo-blue.svg +0 -1
  136. package/bin/templates/vite/withoutDataViz/query+router/src/components/Footer.tsx +0 -14
  137. package/bin/templates/vite/withoutDataViz/query+router/src/components/Header.tsx +0 -25
  138. package/bin/templates/vite/withoutDataViz/query+router/src/integration/tanstack-query.tsx +0 -27
  139. package/bin/templates/vite/withoutDataViz/query+router/src/main.tsx +0 -73
  140. package/bin/templates/vite/withoutDataViz/query+router/src/routes/queryDemo.tsx +0 -73
  141. package/bin/templates/vite/withoutDataViz/query+router/src/styles/fonts.css +0 -213
  142. package/bin/templates/vite/withoutDataViz/query+router/src/vite-env.d.ts +0 -1
  143. package/bin/templates/vite/withoutDataViz/query+router/tailwind.config.js +0 -7
  144. package/bin/templates/vite/withoutDataViz/query+router/tsconfig.json +0 -29
  145. package/bin/templates/vite/withoutDataViz/query+router/tsconfig.node.json +0 -9
  146. package/bin/templates/vite/withoutDataViz/query+router/vite.config.ts +0 -75
  147. package/bin/templates/vite/withoutDataViz/router/.prettierrc +0 -10
  148. package/bin/templates/vite/withoutDataViz/router/eslint.config.mjs +0 -97
  149. package/bin/templates/vite/withoutDataViz/router/index.html +0 -13
  150. package/bin/templates/vite/withoutDataViz/router/public/favicon.ico +0 -0
  151. package/bin/templates/vite/withoutDataViz/router/public/imgs/Tailwind_CSS_Logo.svg +0 -1
  152. package/bin/templates/vite/withoutDataViz/router/public/imgs/Vitejs-logo.svg +0 -15
  153. package/bin/templates/vite/withoutDataViz/router/public/imgs/logo-color-600.png +0 -0
  154. package/bin/templates/vite/withoutDataViz/router/public/imgs/undp-logo-blue.svg +0 -1
  155. package/bin/templates/vite/withoutDataViz/router/src/assets/undp-logo-blue.svg +0 -1
  156. package/bin/templates/vite/withoutDataViz/router/src/components/Footer.tsx +0 -14
  157. package/bin/templates/vite/withoutDataViz/router/src/components/Header.tsx +0 -25
  158. package/bin/templates/vite/withoutDataViz/router/src/main.tsx +0 -66
  159. package/bin/templates/vite/withoutDataViz/router/src/routes/about.tsx +0 -73
  160. package/bin/templates/vite/withoutDataViz/router/src/styles/fonts.css +0 -213
  161. package/bin/templates/vite/withoutDataViz/router/src/vite-env.d.ts +0 -1
  162. package/bin/templates/vite/withoutDataViz/router/tailwind.config.js +0 -7
  163. package/bin/templates/vite/withoutDataViz/router/tsconfig.json +0 -29
  164. package/bin/templates/vite/withoutDataViz/router/tsconfig.node.json +0 -9
  165. package/bin/templates/vite/withoutDataViz/router/vite.config.ts +0 -75
  166. /package/bin/templates/next/{withDataViz/auth → auth}/.prettierrc +0 -0
  167. /package/bin/templates/next/{withoutDataViz/auth → auth}/README.md +0 -0
  168. /package/bin/templates/next/{withDataViz/auth → auth}/app/api/auth/[...all]/route.ts +0 -0
  169. /package/bin/templates/next/{withDataViz/auth → auth}/app/favicon.ico +0 -0
  170. /package/bin/templates/next/{withDataViz/auth → auth}/app/globals.css +0 -0
  171. /package/bin/templates/next/{withDataViz/auth → auth}/app/layout.tsx +0 -0
  172. /package/bin/templates/next/{withDataViz/auth → auth}/components/Footer.tsx +0 -0
  173. /package/bin/templates/next/{withDataViz/auth → auth}/components/Header.tsx +0 -0
  174. /package/bin/templates/next/{withDataViz/auth → auth}/eslint.config.mjs +0 -0
  175. /package/bin/templates/next/{withDataViz/auth → auth}/lib/auth-client.ts +0 -0
  176. /package/bin/templates/next/{withDataViz/auth → auth}/lib/auth.ts +0 -0
  177. /package/bin/templates/next/{withDataViz/auth → auth}/next.config.ts +0 -0
  178. /package/bin/templates/next/{withDataViz/auth → auth}/postcss.config.mjs +0 -0
  179. /package/bin/templates/{vite/withDataViz/basic → next/auth}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  180. /package/bin/templates/next/{withDataViz/auth/public → auth/public/imgs}/next.svg +0 -0
  181. /package/bin/templates/next/{withDataViz/auth/public → auth/public/imgs}/undp-logo-blue.svg +0 -0
  182. /package/bin/templates/next/{withDataViz/auth → auth}/tailwind.config.js +0 -0
  183. /package/bin/templates/next/{withDataViz/auth → auth}/tsconfig.json +0 -0
  184. /package/bin/templates/next/{withDataViz/basic → basic}/.prettierrc +0 -0
  185. /package/bin/templates/next/{withoutDataViz/basic → basic}/README.md +0 -0
  186. /package/bin/templates/next/{withDataViz/basic → basic}/app/favicon.ico +0 -0
  187. /package/bin/templates/next/{withDataViz/basic → basic}/app/globals.css +0 -0
  188. /package/bin/templates/next/{withDataViz/basic → basic}/app/layout.tsx +0 -0
  189. /package/bin/templates/next/{withDataViz/basic → basic}/components/Footer.tsx +0 -0
  190. /package/bin/templates/next/{withDataViz/basic → basic}/components/Header.tsx +0 -0
  191. /package/bin/templates/next/{withDataViz/basic → basic}/eslint.config.mjs +0 -0
  192. /package/bin/templates/next/{withDataViz/basic → basic}/next.config.ts +0 -0
  193. /package/bin/templates/next/{withDataViz/basic → basic}/postcss.config.mjs +0 -0
  194. /package/bin/templates/{vite/withDataViz/query+router → next/basic}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  195. /package/bin/templates/next/{withDataViz/basic/public → basic/public/imgs}/next.svg +0 -0
  196. /package/bin/templates/next/{withDataViz/basic/public → basic/public/imgs}/undp-logo-blue.svg +0 -0
  197. /package/bin/templates/next/{withDataViz/basic → basic}/tailwind.config.js +0 -0
  198. /package/bin/templates/next/{withDataViz/basic → basic}/tsconfig.json +0 -0
  199. /package/bin/templates/{next/withoutDataViz/auth → vite/basic}/.prettierrc +0 -0
  200. /package/bin/templates/vite/{withoutDataViz/basic → basic}/README.md +0 -0
  201. /package/bin/templates/vite/{withDataViz/basic → basic}/eslint.config.mjs +0 -0
  202. /package/bin/templates/vite/{withDataViz/basic → basic}/index.html +0 -0
  203. /package/bin/templates/{next/withoutDataViz/auth/app → vite/basic/public}/favicon.ico +0 -0
  204. /package/bin/templates/vite/{withDataViz/query → basic}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  205. /package/bin/templates/vite/{withDataViz/basic → basic}/public/imgs/Vitejs-logo.svg +0 -0
  206. /package/bin/templates/{next/withoutDataViz/auth/public → vite/basic/public/imgs}/undp-logo-blue.svg +0 -0
  207. /package/bin/templates/{next/withoutDataViz/basic/public → vite/basic/src/assets}/undp-logo-blue.svg +0 -0
  208. /package/bin/templates/vite/{withDataViz/basic → basic}/src/components/Footer.tsx +0 -0
  209. /package/bin/templates/vite/{withDataViz/basic → basic}/src/components/Header.tsx +0 -0
  210. /package/bin/templates/vite/{withDataViz/basic → basic}/src/styles/fonts.css +0 -0
  211. /package/bin/templates/vite/{withoutDataViz/basic → basic}/src/styles/style.css +0 -0
  212. /package/bin/templates/vite/{withDataViz/basic → basic}/src/vite-env.d.ts +0 -0
  213. /package/bin/templates/{next/withoutDataViz/auth → vite/basic}/tailwind.config.js +0 -0
  214. /package/bin/templates/vite/{withDataViz/basic → basic}/tsconfig.json +0 -0
  215. /package/bin/templates/vite/{withDataViz/basic → basic}/tsconfig.node.json +0 -0
  216. /package/bin/templates/vite/{withDataViz/query+router → basic}/vite.config.ts +0 -0
  217. /package/bin/templates/vite/{withDataViz/basic → query}/.prettierrc +0 -0
  218. /package/bin/templates/vite/{withoutDataViz/query → query}/README.md +0 -0
  219. /package/bin/templates/vite/{withDataViz/query → query}/eslint.config.mjs +0 -0
  220. /package/bin/templates/vite/{withDataViz/query → query}/index.html +0 -0
  221. /package/bin/templates/vite/{withDataViz/basic → query}/public/favicon.ico +0 -0
  222. /package/bin/templates/vite/{withoutDataViz/basic → query}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  223. /package/bin/templates/vite/{withDataViz/query/public/imgs/logo-color-600.png → query/public/imgs/Tanstack-logo.png} +0 -0
  224. /package/bin/templates/vite/{withDataViz/query → query}/public/imgs/Vitejs-logo.svg +0 -0
  225. /package/bin/templates/vite/{withDataViz/query+router → query}/public/imgs/undp-logo-blue.svg +0 -0
  226. /package/bin/templates/vite/{withDataViz/query+router → query}/src/assets/undp-logo-blue.svg +0 -0
  227. /package/bin/templates/vite/{withDataViz/query → query}/src/components/Footer.tsx +0 -0
  228. /package/bin/templates/vite/{withDataViz/query → query}/src/components/Header.tsx +0 -0
  229. /package/bin/templates/vite/{withDataViz/query → query}/src/integration/tanstack-query.tsx +0 -0
  230. /package/bin/templates/vite/{withDataViz/query → query}/src/main.tsx +0 -0
  231. /package/bin/templates/vite/{withDataViz/query → query}/src/styles/fonts.css +0 -0
  232. /package/bin/templates/vite/{withoutDataViz/query → query}/src/styles/style.css +0 -0
  233. /package/bin/templates/vite/{withDataViz/query → query}/src/vite-env.d.ts +0 -0
  234. /package/bin/templates/vite/{withDataViz/basic → query}/tailwind.config.js +0 -0
  235. /package/bin/templates/vite/{withDataViz/query → query}/tsconfig.json +0 -0
  236. /package/bin/templates/vite/{withDataViz/query → query}/tsconfig.node.json +0 -0
  237. /package/bin/templates/vite/{withDataViz/router → query}/vite.config.ts +0 -0
  238. /package/bin/templates/{next/withoutDataViz/basic → vite/query+router}/.prettierrc +0 -0
  239. /package/bin/templates/vite/{withoutDataViz/query+router → query+router}/README.md +0 -0
  240. /package/bin/templates/vite/{withDataViz/query+router → query+router}/eslint.config.mjs +0 -0
  241. /package/bin/templates/vite/{withDataViz/query+router → query+router}/index.html +0 -0
  242. /package/bin/templates/{next/withoutDataViz/basic/app → vite/query+router/public}/favicon.ico +0 -0
  243. /package/bin/templates/vite/{withDataViz/router → query+router}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  244. /package/bin/templates/vite/{withDataViz/query+router/public/imgs/logo-color-600.png → query+router/public/imgs/Tanstack-logo.png} +0 -0
  245. /package/bin/templates/vite/{withDataViz/query+router → query+router}/public/imgs/Vitejs-logo.svg +0 -0
  246. /package/bin/templates/vite/{withDataViz/basic → query+router}/public/imgs/undp-logo-blue.svg +0 -0
  247. /package/bin/templates/vite/{withDataViz/basic → query+router}/src/assets/undp-logo-blue.svg +0 -0
  248. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/components/Footer.tsx +0 -0
  249. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/components/Header.tsx +0 -0
  250. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/integration/tanstack-query.tsx +0 -0
  251. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/main.tsx +0 -0
  252. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/styles/fonts.css +0 -0
  253. /package/bin/templates/vite/{withoutDataViz/query+router → query+router}/src/styles/style.css +0 -0
  254. /package/bin/templates/vite/{withDataViz/query+router → query+router}/src/vite-env.d.ts +0 -0
  255. /package/bin/templates/{next/withoutDataViz/basic → vite/query+router}/tailwind.config.js +0 -0
  256. /package/bin/templates/vite/{withDataViz/query+router → query+router}/tsconfig.json +0 -0
  257. /package/bin/templates/vite/{withDataViz/query+router → query+router}/tsconfig.node.json +0 -0
  258. /package/bin/templates/vite/{withDataViz/query → query+router}/vite.config.ts +0 -0
  259. /package/bin/templates/vite/{withDataViz/query+router → router}/.prettierrc +0 -0
  260. /package/bin/templates/vite/{withoutDataViz/router → router}/README.md +0 -0
  261. /package/bin/templates/vite/{withDataViz/router → router}/eslint.config.mjs +0 -0
  262. /package/bin/templates/vite/{withDataViz/router → router}/index.html +0 -0
  263. /package/bin/templates/vite/{withDataViz/query+router → router}/public/favicon.ico +0 -0
  264. /package/bin/templates/vite/{withoutDataViz/query+router → router}/public/imgs/Tailwind_CSS_Logo.svg +0 -0
  265. /package/bin/templates/vite/{withDataViz/router/public/imgs/logo-color-600.png → router/public/imgs/Tanstack-logo.png} +0 -0
  266. /package/bin/templates/vite/{withDataViz/router → router}/public/imgs/Vitejs-logo.svg +0 -0
  267. /package/bin/templates/vite/{withDataViz/query → router}/public/imgs/undp-logo-blue.svg +0 -0
  268. /package/bin/templates/vite/{withDataViz/query → router}/src/assets/undp-logo-blue.svg +0 -0
  269. /package/bin/templates/vite/{withDataViz/router → router}/src/components/Footer.tsx +0 -0
  270. /package/bin/templates/vite/{withDataViz/router → router}/src/components/Header.tsx +0 -0
  271. /package/bin/templates/vite/{withDataViz/router → router}/src/styles/fonts.css +0 -0
  272. /package/bin/templates/vite/{withDataViz/router → router}/src/vite-env.d.ts +0 -0
  273. /package/bin/templates/vite/{withDataViz/query+router → router}/tailwind.config.js +0 -0
  274. /package/bin/templates/vite/{withDataViz/router → router}/tsconfig.json +0 -0
  275. /package/bin/templates/vite/{withDataViz/router → router}/tsconfig.node.json +0 -0
  276. /package/bin/templates/vite/{withoutDataViz/basic → router}/vite.config.ts +0 -0
package/README.md CHANGED
@@ -8,29 +8,29 @@
8
8
 
9
9
  ## 🚀 Features
10
10
 
11
- - ⚡ **React + TypeScript + TailwindCSS** setup out of the box
12
- - 🚀 **Vite support** for fast SPA development, including optional **state management**, and **routing** using **tanstack libraries**
13
- - 🌐 **Next.js support** for full-stack apps, including optional **authentication (Auth)** using **Better Auth**
14
- - 🧱 Preconfigured for UNDP’s Design System
15
- - 📊 Optional integration with **@undp/data-viz** for data visualization
16
- - 🧼 ESLint + Prettier ready
11
+ - ⚡ **React + TypeScript** setup out of the box
12
+ - 🎨 Includes **Tailwind CSS** for styling
13
+ - 🧠 Includes **Zustand** for state management
14
+ - 🚀 **Vite support** for fast SPA development, including optional **routing** and **data fetching** with **TanStack** libraries
15
+ - 🌐 **Next.js support** for full-stack apps, including optional **authentication** with **Better Auth**
16
+ - 🧱 Preconfigured for **UNDP’s Design System**
17
+ - 📊 Optional integration with **@undp/data-viz** for interactive data visualization
18
+ - 🧼 **ESLint** + **Prettier** preconfigured for consistent code style
17
19
 
18
20
  ---
19
21
 
20
22
  ## 🧩 Pre-configured setups
21
23
 
22
- - Vite + Tailwind
23
- - Lightweight and blazing fast React starter (ideal if you are planning to embed the SPA in another page)
24
- - Vite + Tailwind + Query
25
- - Optimized starter with data fetching powered by TanStack Query (ideal if you are planning to embed the SPA in another page)
26
- - Vite + Tailwind + Router
27
- - Fast starter with built-in routing support
28
- - Vite + Tailwind + Router + Query
29
- - Complete Vite setup for routing and data management
30
- - Next.js + Tailwind
31
- - Production-ready React framework with file-based routing and SSR
32
- - Next.js + Tailwind + Auth
33
- - Secure, full-stack framework with authentication and SSR
24
+ All setups include **Tailwind CSS** for styling and **Zustand** for state management.
25
+
26
+ | Framework | Variants | Description |
27
+ |------------|-----------|-------------|
28
+ | **Vite** | Basic | Minimal React + TypeScript setup |
29
+ | **Vite** | + Query | Adds TanStack Query for data fetching |
30
+ | **Vite** | + Router | Adds TanStack Router for routing |
31
+ | **Vite** | + Router + Query | Full-featured Vite setup |
32
+ | **Next.js** | Basic | SSR and file-based routing |
33
+ | **Next.js** | + Auth | Includes authentication via Better Auth |
34
34
 
35
35
  ---
36
36
 
@@ -39,7 +39,7 @@
39
39
  You don’t need to install it globally — just use **npx**:
40
40
 
41
41
  ```bash
42
- npx @undp/create-app my-project
42
+ npx @undp/create-app my-undp-app
43
43
  ```
44
44
 
45
45
  ---
@@ -49,7 +49,7 @@ npx @undp/create-app my-project
49
49
  After running the CLI, navigate into your project and start the dev server:
50
50
 
51
51
  ```bash
52
- cd my-project && npm run dev
52
+ cd my-undp-app && npm run dev
53
53
  ```
54
54
 
55
55
  *Please note: If you have not installed the dependencies then you might want to run `npm install` before `npm run dev`.*
@@ -0,0 +1,21 @@
1
+ export function generateEnv() {
2
+ return `# Secret key used by Better Auth for signing tokens and securing sessions
3
+ BETTER_AUTH_SECRET=
4
+
5
+ # The base URL where your Better Auth instance is running (e.g., localhost for dev)
6
+ BETTER_AUTH_URL=http://localhost:3000
7
+
8
+ # --- GitHub OAuth credentials ---
9
+ # Client ID from your GitHub OAuth app (used for GitHub login)
10
+ GITHUB_CLIENT_ID=
11
+ # Client Secret from your GitHub OAuth app
12
+ GITHUB_CLIENT_SECRET=
13
+
14
+ # --- Azure AD OAuth credentials ---
15
+ # Client ID from your Azure AD App Registration
16
+ AZURE_CLIENT_ID=
17
+ # Client Secret generated for your Azure AD App
18
+ AZURE_CLIENT_SECRET=
19
+ # Tenant ID of your Azure AD directory (found in Azure portal)
20
+ AZURE_TENANT_ID=`
21
+ }
@@ -1,30 +1,35 @@
1
- import type { Metadata } from 'next';
2
-
3
- import HeaderEl from '@/components/Header';
4
- import FooterEl from '@/components/Footer';
5
-
6
- import './globals.css';
7
- import '@undp/design-system-react/style.css';
8
-
9
- export const metadata: Metadata = {
10
- title: 'My Next + UNDP app',
11
- description: 'Generated by create undp app',
12
- };
13
-
14
- export default function RootLayout({
15
- children,
16
- }: Readonly<{
17
- children: React.ReactNode;
18
- }>) {
19
- return (
20
- <html lang='en'>
21
- <body className='flex flex-col gap-0 min-h-screen'>
22
- <HeaderEl />
23
- <main className='grow-1 flex flex-col justify-center'>
24
- <div className='flex flex-col justify-center'>{children}</div>
25
- </main>
26
- <FooterEl />
27
- </body>
28
- </html>
29
- );
30
- }
1
+ export function generateLayoutForNext(dataViz, projectName) {
2
+ return `import type { Metadata } from 'next';
3
+
4
+ import HeaderEl from '@/components/Header';
5
+ import FooterEl from '@/components/Footer';
6
+
7
+ import './globals.css';
8
+ import '@undp/design-system-react/style.css';${dataViz ? `
9
+ import '@undp/data-viz/style.css';` : ''}
10
+
11
+ export const metadata: Metadata = {
12
+ title: '${projectName}',
13
+ description: 'Generated by create undp app',
14
+ };
15
+
16
+ export default function RootLayout({
17
+ children,
18
+ }: Readonly<{
19
+ children: React.ReactNode;
20
+ }>) {
21
+ return (
22
+ <html lang='en'>
23
+ <body className='flex flex-col gap-0 min-h-screen'>
24
+ <HeaderEl />
25
+ <main className='grow-1 flex flex-col justify-center'>
26
+ <div className='flex flex-col justify-center'>{children}</div>
27
+ </main>
28
+ <FooterEl />
29
+ </body>
30
+ </html>
31
+ );
32
+ }
33
+ `
34
+ }
35
+
@@ -0,0 +1,9 @@
1
+ export function generateNextEnvTypes() {
2
+ return `/// <reference types='next' />
3
+ /// <reference types='next/image-types/global' />
4
+ import './.next/dev/types/routes.d.ts';
5
+
6
+ // NOTE: This file should not be edited
7
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
8
+ `
9
+ }
@@ -2,7 +2,6 @@ import { execSync } from 'child_process';
2
2
  import chalk from 'chalk';
3
3
 
4
4
  function getLatestVersion(pkg) {
5
- console.log(chalk.gray(` Fetching latest version for ${pkg}`));
6
5
  try {
7
6
  return execSync(`npm show ${pkg} version`).toString().trim();
8
7
  } catch {
@@ -11,7 +10,9 @@ function getLatestVersion(pkg) {
11
10
  }
12
11
 
13
12
  export function generatePackageJson(config) {
13
+ console.log(chalk.gray(` Fetching latest version for packages...`));
14
14
  const designSystemVer = `^${getLatestVersion('@undp/design-system-react')}`
15
+ const zustandVer = `^${getLatestVersion('zustand')}`
15
16
  const dependencies = config.libraries.includes('peer') && config.libraries.includes('@undp/data-viz') ? {
16
17
  "@undp/design-system-react": designSystemVer,
17
18
  "react": "^19.2.0",
@@ -27,11 +28,13 @@ export function generatePackageJson(config) {
27
28
  "math-expression-evaluator": "^2.0.7",
28
29
  "pmtiles": "^4.3.0",
29
30
  "react-globe.gl": "^2.37.0",
30
- "three": "^0.180.0"
31
+ "three": "^0.180.0",
32
+ "zustand": zustandVer
31
33
  } : {
32
34
  "@undp/design-system-react": designSystemVer,
33
35
  "react": "^19.2.0",
34
36
  "react-dom": "^19.2.0",
37
+ "zustand": zustandVer
35
38
  };
36
39
 
37
40
  switch (config.framework) {
@@ -63,7 +66,7 @@ export function generatePackageJson(config) {
63
66
  const lucideReactVer = `^${getLatestVersion('lucide-react')}`
64
67
  dependencies['lucide-react'] = lucideReactVer;
65
68
  }
66
- const devDependencies = config.framework !== 'next-basic' && config.framework !== 'next-auth' ? {
69
+ const devDependencies = config.framework.includes('vite') ? {
67
70
  "@eslint/config-array": "^0.21.1",
68
71
  "@eslint/js": "^9.39.1",
69
72
  "@nabla/vite-plugin-eslint": "^2.0.6",
@@ -138,7 +141,7 @@ export function generatePackageJson(config) {
138
141
  sideEffects: [
139
142
  '*.css'
140
143
  ],
141
- scripts: config.framework === 'next'
144
+ scripts: config.framework.includes('next')
142
145
  ? {
143
146
  dev: 'next dev',
144
147
  build: 'next build',
@@ -0,0 +1,8 @@
1
+ export function generateStylesCss(dataViz) {
2
+ return `@import '@undp/design-system-react/style.css';${dataViz ? `
3
+ @import '@undp/data-viz/style.css';` : ''}
4
+ @import 'tailwindcss';
5
+ @config '../../tailwind.config.js';
6
+ `
7
+ }
8
+
@@ -2,3 +2,7 @@ export { generatePackageJson } from './generatePackageJson.js';
2
2
  export { generateViteConfig } from './generateViteConfig.js';
3
3
  export { generateIndexHtml } from './generateIndexHtml.js';
4
4
  export { generateStaticWebAppConfig } from './generateStaticWebAppConfig.js';
5
+ export { generateLayoutForNext } from './generateLayoutForNext.js';
6
+ export { generateStylesCss } from './generateStylesCss.js';
7
+ export { generateNextEnvTypes } from './generateNextEnvTypes.js';
8
+ export { generateEnv } from './generateEnv.js';
package/bin/index.js CHANGED
@@ -13,6 +13,10 @@ import {
13
13
  generateViteConfig,
14
14
  generateIndexHtml,
15
15
  generateStaticWebAppConfig,
16
+ generateStylesCss,
17
+ generateLayoutForNext,
18
+ generateNextEnvTypes,
19
+ generateEnv,
16
20
  } from './generateFiles/index.js';
17
21
 
18
22
  function copyFolder(source, destination) {
@@ -37,7 +41,6 @@ async function main() {
37
41
 
38
42
  const baseFolder = config.framework.includes('vite') ? 'vite' : 'next';
39
43
 
40
- const secondaryFolder = config.libraries.includes('@undp/data-viz') ? 'withDataViz' : 'withoutDataViz';
41
44
 
42
45
  let tertiaryFolder = 'basic';
43
46
 
@@ -58,18 +61,25 @@ async function main() {
58
61
  break;
59
62
  }
60
63
 
61
- copyFolder(path.join(__dirname, `./templates/${baseFolder}/${secondaryFolder}/${tertiaryFolder}`), projectPath)
64
+
62
65
 
63
66
  if (config.framework.includes('vite')) {
67
+ copyFolder(path.join(__dirname, `./templates/${baseFolder}/${tertiaryFolder}`), projectPath);
64
68
  fs.writeFileSync('vite.config.ts', generateViteConfig(config));
65
69
  fs.writeFileSync('index.html', generateIndexHtml(config));
70
+ fs.writeFileSync('src/styles/style.css', generateStylesCss(config.libraries.includes('@undp/data-viz')));
66
71
  if (config.addStaticWebAppConfig) {
67
72
  fs.writeFileSync('staticwebapp.config.json', generateStaticWebAppConfig());
68
73
  }
74
+ } else {
75
+ copyFolder(path.join(__dirname, `./templates/${baseFolder}/${tertiaryFolder}`), projectPath);
76
+ fs.writeFileSync('app/layout.tsx', generateLayoutForNext(config.libraries.includes('@undp/data-viz'), config.projectName));
77
+ fs.writeFileSync('next-env.d.ts', generateNextEnvTypes());
78
+ if (config.framework === 'next-auth') fs.writeFileSync('.env.local', generateEnv());
69
79
  }
70
80
  fs.writeFileSync('package.json', JSON.stringify(generatePackageJson(config), null, 2));
71
81
 
72
- console.log(chalk.green(' ✓ Project folder and files generated'));
82
+ console.log(chalk.green(' ✓ Project folder and files generated\n'));
73
83
 
74
84
  const { installNow } = await inquirer.prompt([
75
85
  {
package/bin/promptUser.js CHANGED
@@ -22,32 +22,15 @@ export async function promptUser(name) {
22
22
  {
23
23
  type: 'list',
24
24
  name: 'framework',
25
- message: chalk.yellow('📦 Select the framework you prefer to use:\n'),
25
+ loop: false,
26
+ message: chalk.yellow('📦 Choose your setup (all include Tailwind for styling & Zustand for state management):\n'),
26
27
  choices: [
27
- {
28
- name: 'Vite + TailwindLightweight and blazing fast React starter (ideal if you are planning to embed the SPA in another page)',
29
- value: 'vite-basic'
30
- },
31
- {
32
- name: 'Vite + Tailwind + Query Optimized starter with data fetching powered by TanStack Query (ideal if you are planning to embed the SPA in another page)',
33
- value: 'vite-query'
34
- },
35
- {
36
- name: 'Vite + Tailwind + Router — Fast starter with built-in routing support',
37
- value: 'vite-router'
38
- },
39
- {
40
- name: 'Vite + Tailwind + Router + Query — Complete Vite setup for routing and data management',
41
- value: 'vite-full'
42
- },
43
- {
44
- name: 'Next.js + Tailwind — Production-ready React framework with file-based routing and SSR',
45
- value: 'next-basic'
46
- },
47
- {
48
- name: 'Next.js + Tailwind + Auth — Secure, full-stack framework with authentication and SSR',
49
- value: 'next-auth'
50
- },
28
+ { name: 'Vite — Basic React setup', value: 'vite-basic' },
29
+ { name: 'Vite + QueryWith TanStack Query', value: 'vite-query' },
30
+ { name: 'Vite + Router — With routing support', value: 'vite-router' },
31
+ { name: 'Vite + Router + Query — Full Vite setup', value: 'vite-full' },
32
+ { name: 'Next.js — SSR and file routing', value: 'next-basic' },
33
+ { name: 'Next.js + AuthWith authentication', value: 'next-auth' },
51
34
  ],
52
35
  default: 'vite-basic',
53
36
  },
@@ -0,0 +1,51 @@
1
+ 'use client';
2
+
3
+ import { P } from '@undp/design-system-react/Typography';
4
+ import Image from 'next/image';
5
+
6
+ export default function About() {
7
+ return (
8
+ <>
9
+ <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
10
+ <Image
11
+ className='dark:invert'
12
+ src='/imgs/next.svg'
13
+ alt='Next.js logo'
14
+ width={100}
15
+ height={20}
16
+ priority
17
+ />
18
+ <P marginBottom='none'>&</P>
19
+ <Image
20
+ className='dark:invert'
21
+ src='/imgs/Tailwind_CSS_Logo.svg'
22
+ alt='Tailwind logo'
23
+ width={40}
24
+ height={20}
25
+ priority
26
+ />
27
+ <P marginBottom='none'>&</P>
28
+ <Image
29
+ className='dark:invert'
30
+ src='/imgs/Zustand-logo.svg'
31
+ alt='Zustand logo'
32
+ width={40}
33
+ height={20}
34
+ priority
35
+ />
36
+ <P marginBottom='none'>&</P>
37
+ <Image
38
+ className='dark:invert'
39
+ src='/imgs/undp-logo-blue.svg'
40
+ alt='UNDP logo'
41
+ width={40}
42
+ height={20}
43
+ priority
44
+ />
45
+ </div>
46
+ <P marginBottom='xl' className='text-center'>
47
+ To edit this page, edit the page.tsx file in the about folder.
48
+ </P>
49
+ </>
50
+ );
51
+ }
@@ -19,7 +19,7 @@ export default function LoginPage() {
19
19
  <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
20
20
  <Image
21
21
  className='dark:invert'
22
- src='/next.svg'
22
+ src='/imgs/next.svg'
23
23
  alt='Next.js logo'
24
24
  width={100}
25
25
  height={20}
@@ -28,7 +28,25 @@ export default function LoginPage() {
28
28
  <P marginBottom='none'>&</P>
29
29
  <Image
30
30
  className='dark:invert'
31
- src='/undp-logo-blue.svg'
31
+ src='/imgs/Tailwind_CSS_Logo.svg'
32
+ alt='Tailwind logo'
33
+ width={40}
34
+ height={20}
35
+ priority
36
+ />
37
+ <P marginBottom='none'>&</P>
38
+ <Image
39
+ className='dark:invert'
40
+ src='/imgs/Zustand-logo.svg'
41
+ alt='Zustand logo'
42
+ width={40}
43
+ height={20}
44
+ priority
45
+ />
46
+ <P marginBottom='none'>&</P>
47
+ <Image
48
+ className='dark:invert'
49
+ src='/imgs/undp-logo-blue.svg'
32
50
  alt='UNDP logo'
33
51
  width={40}
34
52
  height={20}
@@ -0,0 +1,75 @@
1
+ 'use client';
2
+
3
+ import { P } from '@undp/design-system-react/Typography';
4
+ import { Button } from '@undp/design-system-react/Button';
5
+ import Image from 'next/image';
6
+
7
+ import { useCounterActions, useCounter } from '@/stores/counter';
8
+
9
+ export default function Home() {
10
+ const count = useCounter();
11
+ const { increment, decrement } = useCounterActions();
12
+ return (
13
+ <>
14
+ <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
15
+ <Image
16
+ className='dark:invert'
17
+ src='/imgs/next.svg'
18
+ alt='Next.js logo'
19
+ width={100}
20
+ height={20}
21
+ priority
22
+ />
23
+ <P marginBottom='none'>&</P>
24
+ <Image
25
+ className='dark:invert'
26
+ src='/imgs/Tailwind_CSS_Logo.svg'
27
+ alt='Tailwind logo'
28
+ width={40}
29
+ height={20}
30
+ priority
31
+ />
32
+ <P marginBottom='none'>&</P>
33
+ <Image
34
+ className='dark:invert'
35
+ src='/imgs/Zustand-logo.svg'
36
+ alt='Zustand logo'
37
+ width={40}
38
+ height={20}
39
+ priority
40
+ />
41
+ <P marginBottom='none'>&</P>
42
+ <Image
43
+ className='dark:invert'
44
+ src='/imgs/undp-logo-blue.svg'
45
+ alt='UNDP logo'
46
+ width={40}
47
+ height={20}
48
+ priority
49
+ />
50
+ </div>
51
+ <P marginBottom='xl' className='text-center'>
52
+ To get started, edit the App.tsx file.{' '}
53
+ <span className='font-bold'>Count: {count}</span>
54
+ </P>
55
+ <div className='flex gap-4 justify-center'>
56
+ <Button
57
+ variant='tertiary'
58
+ onClick={() => {
59
+ increment();
60
+ }}
61
+ >
62
+ Increase counter
63
+ </Button>
64
+ <Button
65
+ variant='tertiary'
66
+ onClick={() => {
67
+ decrement();
68
+ }}
69
+ >
70
+ Decrease counter
71
+ </Button>
72
+ </div>
73
+ </>
74
+ );
75
+ }
@@ -0,0 +1,84 @@
1
+ 'use client';
2
+
3
+ import Image from 'next/image';
4
+ import { Spinner } from '@undp/design-system-react/Spinner';
5
+ import { P } from '@undp/design-system-react/Typography';
6
+ import { Button } from '@undp/design-system-react/Button';
7
+
8
+ import { useSession, signIn } from '@/lib/auth-client';
9
+
10
+ export default function UserPage() {
11
+ const { data: session, isPending } = useSession();
12
+
13
+ if (isPending) {
14
+ return (
15
+ <div className='my-8 mx-aut'>
16
+ <Spinner />
17
+ </div>
18
+ );
19
+ }
20
+ const handleSignIn = async () => {
21
+ await signIn.social({
22
+ provider: 'microsoft',
23
+ callbackURL: '/user',
24
+ });
25
+ };
26
+
27
+ return (
28
+ <>
29
+ <div className='flex gap-4 items-center justify-center my-8 mx-auto'>
30
+ <Image
31
+ className='dark:invert'
32
+ src='/imgs/next.svg'
33
+ alt='Next.js logo'
34
+ width={100}
35
+ height={20}
36
+ priority
37
+ />
38
+ <P marginBottom='none'>&</P>
39
+ <Image
40
+ className='dark:invert'
41
+ src='/imgs/Tailwind_CSS_Logo.svg'
42
+ alt='Tailwind logo'
43
+ width={40}
44
+ height={20}
45
+ priority
46
+ />
47
+ <P marginBottom='none'>&</P>
48
+ <Image
49
+ className='dark:invert'
50
+ src='/imgs/Zustand-logo.svg'
51
+ alt='Zustand logo'
52
+ width={40}
53
+ height={20}
54
+ priority
55
+ />
56
+ <P marginBottom='none'>&</P>
57
+ <Image
58
+ className='dark:invert'
59
+ src='/imgs/undp-logo-blue.svg'
60
+ alt='UNDP logo'
61
+ width={40}
62
+ height={20}
63
+ priority
64
+ />
65
+ </div>
66
+ {!session ? (
67
+ <>
68
+ <P marginBottom='xl' className='text-center'>
69
+ Please sign in to view this page
70
+ </P>
71
+ <div className='flex justify-center'>
72
+ <Button variant='tertiary' onClick={handleSignIn}>
73
+ Sign In
74
+ </Button>
75
+ </div>
76
+ </>
77
+ ) : (
78
+ <P marginBottom='xl' className='text-center'>
79
+ Welcome, {session.user.name || session.user.email}!
80
+ </P>
81
+ )}
82
+ </>
83
+ );
84
+ }