@undp/create-app 0.1.1 → 0.2.1
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 +31 -8
- package/bin/generateFiles/generateIndexHtml.js +18 -0
- package/bin/generateFiles/generatePackageJson.js +160 -0
- package/bin/{generateTemplates/templates/configFiles/staticwebapp.config.json → generateFiles/generateStaticWebAppConfig.js} +4 -1
- package/bin/{generateTemplates/templates/configFiles/vite.config.ts.txt → generateFiles/generateViteConfig.js} +14 -12
- package/bin/generateFiles/index.js +4 -0
- package/bin/index.js +46 -14
- package/bin/promptUser.js +60 -37
- package/bin/templates/next/withDataViz/auth/README.md +108 -0
- package/bin/templates/next/withDataViz/auth/app/about/page.tsx +33 -0
- package/bin/templates/next/withDataViz/auth/app/api/auth/[...all]/route.ts +5 -0
- package/bin/templates/next/withDataViz/auth/app/favicon.ico +0 -0
- package/bin/templates/next/withDataViz/auth/app/globals.css +3 -0
- package/bin/templates/next/withDataViz/auth/app/layout.tsx +30 -0
- package/bin/templates/next/withDataViz/auth/app/login/page.tsx +45 -0
- package/bin/templates/next/withDataViz/auth/app/page.tsx +33 -0
- package/bin/templates/next/withDataViz/auth/app/user/page.tsx +86 -0
- package/bin/templates/next/withDataViz/auth/components/Footer.tsx +16 -0
- package/bin/templates/next/withDataViz/auth/components/Header.tsx +56 -0
- package/bin/templates/next/withDataViz/auth/eslint.config.mjs +103 -0
- package/bin/templates/next/withDataViz/auth/lib/auth-client.ts +7 -0
- package/bin/templates/next/withDataViz/auth/lib/auth.ts +30 -0
- package/bin/templates/next/withDataViz/auth/next.config.ts +10 -0
- package/bin/templates/next/withDataViz/auth/postcss.config.mjs +7 -0
- package/bin/templates/next/withDataViz/auth/public/next.svg +1 -0
- package/bin/templates/next/withDataViz/auth/tsconfig.json +34 -0
- package/bin/templates/next/withDataViz/basic/.prettierrc +10 -0
- package/bin/templates/next/withDataViz/basic/README.md +56 -0
- package/bin/templates/next/withDataViz/basic/app/about/page.tsx +33 -0
- package/bin/templates/next/withDataViz/basic/app/favicon.ico +0 -0
- package/bin/templates/next/withDataViz/basic/app/globals.css +3 -0
- package/bin/templates/next/withDataViz/basic/app/layout.tsx +31 -0
- package/bin/templates/next/withDataViz/basic/app/page.tsx +33 -0
- package/bin/templates/next/withDataViz/basic/components/Footer.tsx +16 -0
- package/bin/templates/next/withDataViz/basic/components/Header.tsx +27 -0
- package/bin/templates/next/withDataViz/basic/eslint.config.mjs +103 -0
- package/bin/templates/next/withDataViz/basic/next.config.ts +7 -0
- package/bin/templates/next/withDataViz/basic/postcss.config.mjs +7 -0
- package/bin/templates/next/withDataViz/basic/public/next.svg +1 -0
- package/bin/templates/next/withDataViz/basic/public/undp-logo-blue.svg +1 -0
- package/bin/templates/next/withDataViz/basic/tailwind.config.js +7 -0
- package/bin/templates/next/withDataViz/basic/tsconfig.json +34 -0
- package/bin/templates/next/withoutDataViz/auth/.prettierrc +10 -0
- package/bin/templates/next/withoutDataViz/auth/README.md +107 -0
- package/bin/templates/next/withoutDataViz/auth/app/about/page.tsx +33 -0
- package/bin/templates/next/withoutDataViz/auth/app/api/auth/[...all]/route.ts +5 -0
- package/bin/templates/next/withoutDataViz/auth/app/favicon.ico +0 -0
- package/bin/templates/next/withoutDataViz/auth/app/globals.css +3 -0
- package/bin/templates/next/withoutDataViz/auth/app/layout.tsx +30 -0
- package/bin/templates/next/withoutDataViz/auth/app/login/page.tsx +45 -0
- package/bin/templates/next/withoutDataViz/auth/app/page.tsx +33 -0
- package/bin/templates/next/withoutDataViz/auth/app/user/page.tsx +86 -0
- package/bin/templates/next/withoutDataViz/auth/components/Footer.tsx +16 -0
- package/bin/templates/next/withoutDataViz/auth/components/Header.tsx +56 -0
- package/bin/templates/next/withoutDataViz/auth/eslint.config.mjs +103 -0
- package/bin/templates/next/withoutDataViz/auth/lib/auth-client.ts +7 -0
- package/bin/templates/next/withoutDataViz/auth/lib/auth.ts +30 -0
- package/bin/templates/next/withoutDataViz/auth/next.config.ts +10 -0
- package/bin/templates/next/withoutDataViz/auth/postcss.config.mjs +7 -0
- package/bin/templates/next/withoutDataViz/auth/public/next.svg +1 -0
- package/bin/templates/next/withoutDataViz/auth/public/undp-logo-blue.svg +1 -0
- package/bin/templates/next/withoutDataViz/auth/tailwind.config.js +7 -0
- package/bin/templates/next/withoutDataViz/auth/tsconfig.json +34 -0
- package/bin/templates/next/withoutDataViz/basic/.prettierrc +10 -0
- package/bin/templates/next/withoutDataViz/basic/README.md +55 -0
- package/bin/templates/next/withoutDataViz/basic/app/about/page.tsx +33 -0
- package/bin/templates/next/withoutDataViz/basic/app/favicon.ico +0 -0
- package/bin/templates/next/withoutDataViz/basic/app/globals.css +3 -0
- package/bin/templates/next/withoutDataViz/basic/app/layout.tsx +31 -0
- package/bin/templates/next/withoutDataViz/basic/app/page.tsx +33 -0
- package/bin/templates/next/withoutDataViz/basic/components/Footer.tsx +16 -0
- package/bin/templates/next/withoutDataViz/basic/components/Header.tsx +27 -0
- package/bin/templates/next/withoutDataViz/basic/eslint.config.mjs +103 -0
- package/bin/templates/next/withoutDataViz/basic/next.config.ts +7 -0
- package/bin/templates/next/withoutDataViz/basic/postcss.config.mjs +7 -0
- package/bin/templates/next/withoutDataViz/basic/public/next.svg +1 -0
- package/bin/templates/next/withoutDataViz/basic/public/undp-logo-blue.svg +1 -0
- package/bin/templates/next/withoutDataViz/basic/tailwind.config.js +7 -0
- package/bin/templates/next/withoutDataViz/basic/tsconfig.json +34 -0
- package/bin/templates/vite/withDataViz/basic/.prettierrc +10 -0
- package/bin/templates/vite/withDataViz/basic/README.md +76 -0
- package/bin/{generateTemplates/generateIndexHtml.js → templates/vite/withDataViz/basic/index.html} +3 -5
- package/bin/templates/vite/withDataViz/basic/public/favicon.ico +0 -0
- package/bin/templates/vite/withDataViz/basic/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withDataViz/basic/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withDataViz/basic/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/basic/src/App.tsx +38 -0
- package/bin/templates/vite/withDataViz/basic/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/basic/src/components/Footer.tsx +14 -0
- package/bin/{generateTemplates/templates/router/components/Header.txt → templates/vite/withDataViz/basic/src/components/Header.tsx} +8 -12
- package/bin/templates/vite/withDataViz/basic/src/styles/style.css +4 -0
- package/bin/templates/vite/withDataViz/basic/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withDataViz/basic/tailwind.config.js +7 -0
- package/bin/{generateTemplates/templates/configFiles → templates/vite/withDataViz/basic}/tsconfig.json +1 -1
- package/bin/{generateTemplates/templates/configFiles/viteWithoutPostCss.config.ts.txt → templates/vite/withDataViz/basic/vite.config.ts} +17 -1
- package/bin/templates/vite/withDataViz/query/.prettierrc +10 -0
- package/bin/templates/vite/withDataViz/query/README.md +80 -0
- package/bin/templates/vite/withDataViz/query/eslint.config.mjs +97 -0
- package/bin/templates/vite/withDataViz/query/index.html +13 -0
- package/bin/templates/vite/withDataViz/query/public/favicon.ico +0 -0
- package/bin/templates/vite/withDataViz/query/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withDataViz/query/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withDataViz/query/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withDataViz/query/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/query/src/App.tsx +70 -0
- package/bin/templates/vite/withDataViz/query/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/query/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withDataViz/query/src/components/Header.tsx +25 -0
- package/bin/templates/vite/withDataViz/query/src/integration/tanstack-query.tsx +27 -0
- package/bin/templates/vite/withDataViz/query/src/main.tsx +21 -0
- package/bin/templates/vite/withDataViz/query/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withDataViz/query/src/styles/style.css +4 -0
- package/bin/templates/vite/withDataViz/query/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withDataViz/query/tailwind.config.js +7 -0
- package/bin/templates/vite/withDataViz/query/tsconfig.json +29 -0
- package/bin/templates/vite/withDataViz/query/tsconfig.node.json +9 -0
- package/bin/templates/vite/withDataViz/query/vite.config.ts +75 -0
- package/bin/templates/vite/withDataViz/query+router/.prettierrc +10 -0
- package/bin/templates/vite/withDataViz/query+router/README.md +112 -0
- package/bin/templates/vite/withDataViz/query+router/eslint.config.mjs +97 -0
- package/bin/templates/vite/withDataViz/query+router/index.html +13 -0
- package/bin/templates/vite/withDataViz/query+router/public/favicon.ico +0 -0
- package/bin/templates/vite/withDataViz/query+router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withDataViz/query+router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withDataViz/query+router/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withDataViz/query+router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/query+router/src/App.tsx +42 -0
- package/bin/templates/vite/withDataViz/query+router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/query+router/src/components/Footer.tsx +14 -0
- package/bin/{generateTemplates/templates/router+query/components/Header.txt → templates/vite/withDataViz/query+router/src/components/Header.tsx} +8 -12
- package/bin/{generateTemplates/templates/router+query/integration/tanstack-query.txt → templates/vite/withDataViz/query+router/src/integration/tanstack-query.tsx} +5 -5
- package/bin/{generateTemplates/templates/router+query/main.txt → templates/vite/withDataViz/query+router/src/main.tsx} +15 -11
- package/bin/templates/vite/withDataViz/query+router/src/routes/queryDemo.tsx +73 -0
- package/bin/templates/vite/withDataViz/query+router/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withDataViz/query+router/src/styles/style.css +4 -0
- package/bin/templates/vite/withDataViz/query+router/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withDataViz/query+router/tailwind.config.js +7 -0
- package/bin/templates/vite/withDataViz/query+router/tsconfig.json +29 -0
- package/bin/templates/vite/withDataViz/query+router/tsconfig.node.json +9 -0
- package/bin/templates/vite/withDataViz/query+router/vite.config.ts +75 -0
- package/bin/templates/vite/withDataViz/router/.prettierrc +10 -0
- package/bin/templates/vite/withDataViz/router/README.md +107 -0
- package/bin/templates/vite/withDataViz/router/eslint.config.mjs +97 -0
- package/bin/templates/vite/withDataViz/router/index.html +13 -0
- package/bin/templates/vite/withDataViz/router/public/favicon.ico +0 -0
- package/bin/templates/vite/withDataViz/router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withDataViz/router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withDataViz/router/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withDataViz/router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/router/src/App.tsx +51 -0
- package/bin/templates/vite/withDataViz/router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withDataViz/router/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withDataViz/router/src/components/Header.tsx +25 -0
- package/bin/{generateTemplates/templates/router/main.txt → templates/vite/withDataViz/router/src/main.tsx} +18 -12
- package/bin/templates/vite/withDataViz/router/src/routes/about.tsx +73 -0
- package/bin/templates/vite/withDataViz/router/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withDataViz/router/src/styles/style.css +4 -0
- package/bin/templates/vite/withDataViz/router/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withDataViz/router/tailwind.config.js +7 -0
- package/bin/templates/vite/withDataViz/router/tsconfig.json +29 -0
- package/bin/templates/vite/withDataViz/router/tsconfig.node.json +9 -0
- package/bin/templates/vite/withDataViz/router/vite.config.ts +75 -0
- package/bin/templates/vite/withoutDataViz/basic/.prettierrc +10 -0
- package/bin/templates/vite/withoutDataViz/basic/README.md +75 -0
- package/bin/templates/vite/withoutDataViz/basic/eslint.config.mjs +97 -0
- package/bin/templates/vite/withoutDataViz/basic/index.html +13 -0
- package/bin/templates/vite/withoutDataViz/basic/public/favicon.ico +0 -0
- package/bin/templates/vite/withoutDataViz/basic/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withoutDataViz/basic/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withoutDataViz/basic/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/basic/src/App.tsx +38 -0
- package/bin/templates/vite/withoutDataViz/basic/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/basic/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withoutDataViz/basic/src/components/Header.tsx +25 -0
- package/bin/templates/vite/withoutDataViz/basic/src/main.tsx +10 -0
- package/bin/templates/vite/withoutDataViz/basic/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withoutDataViz/basic/src/styles/style.css +3 -0
- package/bin/templates/vite/withoutDataViz/basic/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withoutDataViz/basic/tailwind.config.js +7 -0
- package/bin/templates/vite/withoutDataViz/basic/tsconfig.json +29 -0
- package/bin/templates/vite/withoutDataViz/basic/tsconfig.node.json +9 -0
- package/bin/templates/vite/withoutDataViz/basic/vite.config.ts +75 -0
- package/bin/templates/vite/withoutDataViz/query/.prettierrc +10 -0
- package/bin/templates/vite/withoutDataViz/query/README.md +80 -0
- package/bin/templates/vite/withoutDataViz/query/eslint.config.mjs +97 -0
- package/bin/templates/vite/withoutDataViz/query/index.html +13 -0
- package/bin/templates/vite/withoutDataViz/query/public/favicon.ico +0 -0
- package/bin/templates/vite/withoutDataViz/query/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withoutDataViz/query/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withoutDataViz/query/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query/src/App.tsx +70 -0
- package/bin/templates/vite/withoutDataViz/query/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withoutDataViz/query/src/components/Header.tsx +25 -0
- package/bin/templates/vite/withoutDataViz/query/src/integration/tanstack-query.tsx +27 -0
- package/bin/templates/vite/withoutDataViz/query/src/main.tsx +21 -0
- package/bin/templates/vite/withoutDataViz/query/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withoutDataViz/query/src/styles/style.css +3 -0
- package/bin/templates/vite/withoutDataViz/query/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withoutDataViz/query/tailwind.config.js +7 -0
- package/bin/templates/vite/withoutDataViz/query/tsconfig.json +29 -0
- package/bin/templates/vite/withoutDataViz/query/tsconfig.node.json +9 -0
- package/bin/templates/vite/withoutDataViz/query/vite.config.ts +75 -0
- package/bin/templates/vite/withoutDataViz/query+router/.prettierrc +10 -0
- package/bin/templates/vite/withoutDataViz/query+router/README.md +111 -0
- package/bin/templates/vite/withoutDataViz/query+router/eslint.config.mjs +97 -0
- package/bin/templates/vite/withoutDataViz/query+router/index.html +13 -0
- package/bin/templates/vite/withoutDataViz/query+router/public/favicon.ico +0 -0
- package/bin/templates/vite/withoutDataViz/query+router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query+router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withoutDataViz/query+router/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withoutDataViz/query+router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/App.tsx +42 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/components/Header.tsx +25 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/integration/tanstack-query.tsx +27 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/main.tsx +73 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/routes/queryDemo.tsx +73 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/styles/style.css +3 -0
- package/bin/templates/vite/withoutDataViz/query+router/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withoutDataViz/query+router/tailwind.config.js +7 -0
- package/bin/templates/vite/withoutDataViz/query+router/tsconfig.json +29 -0
- package/bin/templates/vite/withoutDataViz/query+router/tsconfig.node.json +9 -0
- package/bin/templates/vite/withoutDataViz/query+router/vite.config.ts +75 -0
- package/bin/templates/vite/withoutDataViz/router/.prettierrc +10 -0
- package/bin/templates/vite/withoutDataViz/router/README.md +106 -0
- package/bin/templates/vite/withoutDataViz/router/eslint.config.mjs +97 -0
- package/bin/templates/vite/withoutDataViz/router/index.html +13 -0
- package/bin/templates/vite/withoutDataViz/router/public/favicon.ico +0 -0
- package/bin/templates/vite/withoutDataViz/router/public/imgs/Tailwind_CSS_Logo.svg +1 -0
- package/bin/templates/vite/withoutDataViz/router/public/imgs/Vitejs-logo.svg +15 -0
- package/bin/templates/vite/withoutDataViz/router/public/imgs/logo-color-600.png +0 -0
- package/bin/templates/vite/withoutDataViz/router/public/imgs/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/router/src/App.tsx +51 -0
- package/bin/templates/vite/withoutDataViz/router/src/assets/undp-logo-blue.svg +1 -0
- package/bin/templates/vite/withoutDataViz/router/src/components/Footer.tsx +14 -0
- package/bin/templates/vite/withoutDataViz/router/src/components/Header.tsx +25 -0
- package/bin/templates/vite/withoutDataViz/router/src/main.tsx +66 -0
- package/bin/templates/vite/withoutDataViz/router/src/routes/about.tsx +73 -0
- package/bin/templates/vite/withoutDataViz/router/src/styles/fonts.css +213 -0
- package/bin/templates/vite/withoutDataViz/router/src/styles/style.css +4 -0
- package/bin/templates/vite/withoutDataViz/router/src/vite-env.d.ts +1 -0
- package/bin/templates/vite/withoutDataViz/router/tailwind.config.js +7 -0
- package/bin/templates/vite/withoutDataViz/router/tsconfig.json +29 -0
- package/bin/templates/vite/withoutDataViz/router/tsconfig.node.json +9 -0
- package/bin/templates/vite/withoutDataViz/router/vite.config.ts +75 -0
- package/bin/utils/printSuccess.js +0 -9
- package/package.json +6 -2
- package/bin/generateFiles.js +0 -65
- package/bin/generateTemplates/copyTemplate.js +0 -18
- package/bin/generateTemplates/generatePackageJson.js +0 -105
- package/bin/generateTemplates/generateReadme.js +0 -143
- package/bin/generateTemplates/generateStyleCss.js +0 -6
- package/bin/generateTemplates/index.js +0 -6
- package/bin/generateTemplates/templates/basic/App.txt +0 -32
- package/bin/generateTemplates/templates/basic/AppWithContainer.txt +0 -32
- package/bin/generateTemplates/templates/configFiles/vite-env.txt +0 -1
- package/bin/generateTemplates/templates/query/App.txt +0 -57
- package/bin/generateTemplates/templates/query/AppWithContainer.txt +0 -67
- package/bin/generateTemplates/templates/query/main.txt +0 -29
- package/bin/generateTemplates/templates/router/App.txt +0 -30
- package/bin/generateTemplates/templates/router/components/Footer.txt +0 -20
- package/bin/generateTemplates/templates/router/routes/About.txt +0 -28
- package/bin/generateTemplates/templates/router+query/App.txt +0 -30
- package/bin/generateTemplates/templates/router+query/components/Footer.txt +0 -20
- package/bin/generateTemplates/templates/router+query/routes/queryDemo.txt +0 -56
- /package/bin/{generateTemplates/templates/configFiles → templates/next/withDataViz/auth}/.prettierrc +0 -0
- /package/bin/{generateTemplates/templates/configFiles/icon.txt → templates/next/withDataViz/auth/public/undp-logo-blue.svg} +0 -0
- /package/bin/{generateTemplates/templates/configFiles → templates/next/withDataViz/auth}/tailwind.config.js +0 -0
- /package/bin/{generateTemplates/templates/configFiles → templates/vite/withDataViz/basic}/eslint.config.mjs +0 -0
- /package/bin/{generateTemplates/templates/basic/main.txt → templates/vite/withDataViz/basic/src/main.tsx} +0 -0
- /package/bin/{generateTemplates/templates/css → templates/vite/withDataViz/basic/src/styles}/fonts.css +0 -0
- /package/bin/{generateTemplates/templates/configFiles → templates/vite/withDataViz/basic}/tsconfig.node.json +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { H6, P } from '@undp/design-system-react/Typography';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
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='/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='/undp-logo-blue.svg'
|
|
22
|
+
alt='UNDP logo'
|
|
23
|
+
width={40}
|
|
24
|
+
height={20}
|
|
25
|
+
priority
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<H6 marginBottom='xl' className='text-center'>
|
|
29
|
+
To get started, edit the page.tsx file.
|
|
30
|
+
</H6>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { Spinner } from '@undp/design-system-react/Spinner';
|
|
5
|
+
import { H6, 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
|
+
if (!session)
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<div className='flex gap-4 items-center justify-center my-8 mx-auto'>
|
|
31
|
+
<Image
|
|
32
|
+
className='dark:invert'
|
|
33
|
+
src='/next.svg'
|
|
34
|
+
alt='Next.js logo'
|
|
35
|
+
width={100}
|
|
36
|
+
height={20}
|
|
37
|
+
priority
|
|
38
|
+
/>
|
|
39
|
+
<P marginBottom='none'>&</P>
|
|
40
|
+
<Image
|
|
41
|
+
className='dark:invert'
|
|
42
|
+
src='/undp-logo-blue.svg'
|
|
43
|
+
alt='UNDP logo'
|
|
44
|
+
width={40}
|
|
45
|
+
height={20}
|
|
46
|
+
priority
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<H6 marginBottom='xl' className='text-center'>
|
|
50
|
+
Please sign in to view this page
|
|
51
|
+
</H6>
|
|
52
|
+
<div className='flex justify-center'>
|
|
53
|
+
<Button variant='tertiary' onClick={handleSignIn}>
|
|
54
|
+
Sign In
|
|
55
|
+
</Button>
|
|
56
|
+
</div>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<>
|
|
62
|
+
<div className='flex gap-4 items-center justify-center my-8 mx-auto'>
|
|
63
|
+
<Image
|
|
64
|
+
className='dark:invert'
|
|
65
|
+
src='/next.svg'
|
|
66
|
+
alt='Next.js logo'
|
|
67
|
+
width={100}
|
|
68
|
+
height={20}
|
|
69
|
+
priority
|
|
70
|
+
/>
|
|
71
|
+
<P marginBottom='none'>&</P>
|
|
72
|
+
<Image
|
|
73
|
+
className='dark:invert'
|
|
74
|
+
src='/undp-logo-blue.svg'
|
|
75
|
+
alt='UNDP logo'
|
|
76
|
+
width={40}
|
|
77
|
+
height={20}
|
|
78
|
+
priority
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
<H6 marginBottom='xl' className='text-center'>
|
|
82
|
+
Welcome, {session.user.name || session.user.email}!
|
|
83
|
+
</H6>
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Footer,
|
|
5
|
+
FooterLogoUnit,
|
|
6
|
+
FooterCopyrightUnit,
|
|
7
|
+
} from '@undp/design-system-react/Footer';
|
|
8
|
+
|
|
9
|
+
export default function FooterEl() {
|
|
10
|
+
return (
|
|
11
|
+
<Footer>
|
|
12
|
+
<FooterLogoUnit>subscribe to email</FooterLogoUnit>
|
|
13
|
+
<FooterCopyrightUnit>Footnote can be added here</FooterCopyrightUnit>
|
|
14
|
+
</Footer>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Header,
|
|
5
|
+
HeaderActions,
|
|
6
|
+
HeaderLogoUnit,
|
|
7
|
+
HeaderMainNavUnit,
|
|
8
|
+
HeaderMenuUnit,
|
|
9
|
+
} from '@undp/design-system-react/Header';
|
|
10
|
+
import Link from 'next/link';
|
|
11
|
+
import { Spinner } from '@undp/design-system-react';
|
|
12
|
+
import { Button } from '@undp/design-system-react/Button';
|
|
13
|
+
|
|
14
|
+
import { signIn, useSession, signOut } from '@/lib/auth-client';
|
|
15
|
+
|
|
16
|
+
export default function HeaderEl() {
|
|
17
|
+
const { data: session, isPending } = useSession();
|
|
18
|
+
const handleSignIn = async () => {
|
|
19
|
+
await signIn.social({
|
|
20
|
+
provider: 'microsoft',
|
|
21
|
+
callbackURL: window.location.href,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const handleSignOut = async () => {
|
|
25
|
+
await signOut();
|
|
26
|
+
};
|
|
27
|
+
return (
|
|
28
|
+
<Header>
|
|
29
|
+
<HeaderLogoUnit
|
|
30
|
+
hyperlink='./'
|
|
31
|
+
siteName='Site name'
|
|
32
|
+
siteSubName='Sub-site name'
|
|
33
|
+
/>
|
|
34
|
+
<HeaderMainNavUnit>
|
|
35
|
+
<HeaderMenuUnit>
|
|
36
|
+
<Link href='/'>Home</Link>
|
|
37
|
+
<Link href='/about'>About</Link>
|
|
38
|
+
<Link href='/user'>User</Link>
|
|
39
|
+
</HeaderMenuUnit>
|
|
40
|
+
<HeaderActions>
|
|
41
|
+
{isPending ? (
|
|
42
|
+
<Spinner />
|
|
43
|
+
) : session ? (
|
|
44
|
+
<Button variant='tertiary' onClick={handleSignOut}>
|
|
45
|
+
Sign Out
|
|
46
|
+
</Button>
|
|
47
|
+
) : (
|
|
48
|
+
<Button variant='tertiary' onClick={handleSignIn}>
|
|
49
|
+
Sign In
|
|
50
|
+
</Button>
|
|
51
|
+
)}
|
|
52
|
+
</HeaderActions>
|
|
53
|
+
</HeaderMainNavUnit>
|
|
54
|
+
</Header>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import nextVitals from 'eslint-config-next/core-web-vitals';
|
|
2
|
+
import nextTs from 'eslint-config-next/typescript';
|
|
3
|
+
import js from '@eslint/js';
|
|
4
|
+
import tseslint from 'typescript-eslint';
|
|
5
|
+
import pluginReact from 'eslint-plugin-react';
|
|
6
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
7
|
+
import importPlugin from 'eslint-plugin-import';
|
|
8
|
+
import { defineConfig } from 'eslint/config';
|
|
9
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
10
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
11
|
+
|
|
12
|
+
export default defineConfig([
|
|
13
|
+
{
|
|
14
|
+
ignores: [
|
|
15
|
+
'node_modules/**',
|
|
16
|
+
'build/**',
|
|
17
|
+
'public/**',
|
|
18
|
+
'dist/**',
|
|
19
|
+
'storybook-static/**',
|
|
20
|
+
'dist-ssr/**',
|
|
21
|
+
'coverage/**',
|
|
22
|
+
'**/*.test.js',
|
|
23
|
+
'**/__snapshots__/**',
|
|
24
|
+
'.next/**',
|
|
25
|
+
'out/**',
|
|
26
|
+
'next-env.d.ts',
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
...nextVitals,
|
|
30
|
+
...nextTs,
|
|
31
|
+
js.configs.recommended,
|
|
32
|
+
reactHooks.configs.flat.recommended,
|
|
33
|
+
...tseslint.configs.recommended,
|
|
34
|
+
{
|
|
35
|
+
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx,ts}'],
|
|
36
|
+
plugins: {
|
|
37
|
+
react: pluginReact,
|
|
38
|
+
'react-hooks': reactHooks,
|
|
39
|
+
import: importPlugin,
|
|
40
|
+
prettier: prettierPlugin,
|
|
41
|
+
},
|
|
42
|
+
settings: {
|
|
43
|
+
react: {
|
|
44
|
+
version: 'detect',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
// React rules
|
|
49
|
+
'react/self-closing-comp': ['error', { component: true, html: true }],
|
|
50
|
+
'react/react-in-jsx-scope': 'off',
|
|
51
|
+
'react/jsx-uses-react': 'off',
|
|
52
|
+
'react/jsx-uses-vars': 'warn',
|
|
53
|
+
'react/jsx-no-undef': 'error',
|
|
54
|
+
'react/jsx-curly-brace-presence': 'error',
|
|
55
|
+
'react/prop-types': 'off',
|
|
56
|
+
'react/require-default-props': 0,
|
|
57
|
+
'react/jsx-filename-extension': 0,
|
|
58
|
+
'react/no-array-index-key': 0,
|
|
59
|
+
'react/jsx-props-no-spreading': 0,
|
|
60
|
+
|
|
61
|
+
// TypeScript rules
|
|
62
|
+
'no-unused-vars': 'off',
|
|
63
|
+
'@typescript-eslint/no-unused-vars': [
|
|
64
|
+
'error',
|
|
65
|
+
{ argsIgnorePattern: '^_' },
|
|
66
|
+
],
|
|
67
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
68
|
+
|
|
69
|
+
// Import rules
|
|
70
|
+
'import/order': [
|
|
71
|
+
'warn',
|
|
72
|
+
{
|
|
73
|
+
groups: [
|
|
74
|
+
'builtin',
|
|
75
|
+
'external',
|
|
76
|
+
'internal',
|
|
77
|
+
'parent',
|
|
78
|
+
'sibling',
|
|
79
|
+
'index',
|
|
80
|
+
],
|
|
81
|
+
'newlines-between': 'always',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
'import/no-unresolved': 0,
|
|
85
|
+
'import/no-extraneous-dependencies': ['warn', { devDependencies: true }],
|
|
86
|
+
'import/extensions': 0,
|
|
87
|
+
'import/prefer-default-export': 0,
|
|
88
|
+
'import/no-anonymous-default-export': 0,
|
|
89
|
+
|
|
90
|
+
// A11y rules
|
|
91
|
+
'jsx-a11y/alt-text': 'warn',
|
|
92
|
+
'jsx-a11y/anchor-is-valid': 'warn',
|
|
93
|
+
|
|
94
|
+
// General rules
|
|
95
|
+
'prefer-const': 'error',
|
|
96
|
+
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
97
|
+
'no-debugger': 'warn',
|
|
98
|
+
'no-nested-ternary': 0,
|
|
99
|
+
'prettier/prettier': 'error',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
prettierConfig,
|
|
103
|
+
]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { betterAuth } from 'better-auth';
|
|
2
|
+
import { nextCookies } from 'better-auth/next-js';
|
|
3
|
+
|
|
4
|
+
export const auth = betterAuth({
|
|
5
|
+
plugins: [nextCookies()],
|
|
6
|
+
secret: process.env.BETTER_AUTH_SECRET,
|
|
7
|
+
baseURL: process.env.BETTER_AUTH_URL,
|
|
8
|
+
session: {
|
|
9
|
+
strategy: 'jwt',
|
|
10
|
+
expiresIn: 60 * 60 * 24 * 7,
|
|
11
|
+
cookieCache: {
|
|
12
|
+
enabled: true,
|
|
13
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
emailAndPassword: {
|
|
17
|
+
enabled: false,
|
|
18
|
+
},
|
|
19
|
+
socialProviders: {
|
|
20
|
+
github: {
|
|
21
|
+
clientId: process.env.GITHUB_CLIENT_ID as string,
|
|
22
|
+
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
|
|
23
|
+
},
|
|
24
|
+
microsoft: {
|
|
25
|
+
clientId: process.env.AZURE_CLIENT_ID as string,
|
|
26
|
+
clientSecret: process.env.AZURE_CLIENT_SECRET as string,
|
|
27
|
+
tenantId: process.env.AZURE_TENANT_ID as string,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 60.8"><style>.st0{fill:#0468b1}.st1{fill:#fff}</style><path class="st0" d="M0 30.9h14.5v14.5H0z"/><path class="st1" d="M3.7 33.2v5.7c0 3 1.5 4.1 3.5 4.1 2.1 0 3.6-1.2 3.6-4.2v-5.7H9.6v5.8c0 2.1-1 3.1-2.4 3.1-1.3 0-2.3-.9-2.3-3.1v-5.7H3.7z"/><path class="st0" d="M15.4 30.9h14.5v14.5H15.4z"/><path class="st1" d="M20.2 43v-4.1c0-1.6 0-2.8-.1-4 .5 1.1 1.1 2.2 1.8 3.2L25 43h1.3v-9.6h-1.1v4.1c0 1.5 0 2.7.2 4-.4-1-1-2-1.7-3.2l-3.1-4.9h-1.4v9.7l1-.1z"/><path class="st0" d="M15.4 46.3h14.5v14.5H15.4z"/><path class="st1" d="M25.1 49.4c-.6-.5-1.5-.8-2.8-.8-1 0-1.8.1-2.4.2v9.6h1.2v-3.9c.3.1.6.1 1 .1 1.2 0 2.3-.4 2.9-1.1.5-.5.8-1.2.8-2.1.2-.8-.1-1.5-.7-2"/><path class="st0" d="M22.3 53.6c-.4 0-.8 0-1.1-.1v-3.7c.2 0 .6-.1 1.2-.1 1.4 0 2.3.6 2.3 1.9 0 1.3-.9 2-2.4 2M0 46.3h14.5v14.5H0z"/><path class="st1" d="M10.2 49.8c-.8-.8-2.1-1.2-3.9-1.2-1 0-1.9.1-2.7.2v9.6c.6.1 1.4.1 2.3.1 1.9 0 3.4-.5 4.3-1.4.9-.9 1.4-2.2 1.4-3.7 0-1.7-.5-2.8-1.4-3.6"/><path class="st0" d="M6.2 57.4c-.5 0-1 0-1.3-.1v-7.6c.3-.1.8-.2 1.5-.2 2.7 0 3.9 1.4 3.9 3.7 0 2.7-1.5 4.3-4.1 4.2M0 0h30v30H0z"/><path class="st1" d="M25.7 15.6c-.4.6-1 1.1-1.3 1.8 0-.5.1-1.1-.1-1.5-.3-1-.6-1.9-.7-3.1v-.4c.2 1.1 1.3 1.9 1.2 3.1 0 .3-.1.6-.2.8v-.1c.2-.6.2-1.2.5-1.8.4-.8.8-1.6.6-2.6.8 1.2.6 2.7 0 3.8"/><path class="st1" d="M25.1 9.4c.7 1 .9 2.5.3 3.6-.2.5-.3 1-.4 1.5 0-.1 0-.2-.1-.3-.2-1.1-1.3-1.9-1.7-2.8-.2-.3-.2-.6-.3-1.1.4.8 1.5 1.2 1.9 2.2.2.2.1.5.2.8-.2-1-.1-1.9 0-2.8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.2 0 .2 0l.6-.2c.2 0 .5 0 .6.2-.2.2-.3.2-.5.2-.3 0-.6.1-.9-.2m3.4.7c.1 0 .2.1.2.2s.1.2 0 .2c-.2.1-.2-.2-.4-.2v-.1c.1-.2.1 0 .2-.1"/></svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
This is a Next.js project powered by Tailwind CSS, and the UNDP Design System, bootstrapped with [@undp/create-app](https://www.npmjs.com/package/@undp/create-app).
|
|
2
|
+
|
|
3
|
+
It includes:
|
|
4
|
+
* Next 16.x with React compiler
|
|
5
|
+
* UNDP Design System
|
|
6
|
+
* TailwindCSS
|
|
7
|
+
* Code linting and formatting via ESLint and Prettier
|
|
8
|
+
|
|
9
|
+
## 🧩 Installation
|
|
10
|
+
|
|
11
|
+
This project uses `npm`.
|
|
12
|
+
|
|
13
|
+
For installation you will need to install `node` and `npm`, if you don't already have it. `node` and `npm` can be installed from [here](https://nodejs.org/en/download/).
|
|
14
|
+
|
|
15
|
+
To install the project, simply run `npm install` in the project folder in the terminal on Mac or Command Prompt on Windows.
|
|
16
|
+
|
|
17
|
+
## 🚀 Local Development
|
|
18
|
+
|
|
19
|
+
To start the project locally:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This is run the app in development mode. Open [http://localhost:3000/](http://localhost:3000/) to view it in the browser.
|
|
26
|
+
|
|
27
|
+
The page will reload if you make edits. You will also see any lint errors in the console.
|
|
28
|
+
|
|
29
|
+
## 📜 Available Scripts
|
|
30
|
+
|
|
31
|
+
- `npm run dev`: Executes `next dev` and start the local server for local deployment.
|
|
32
|
+
- `npm run build`: Executes `next build` and builds the app for production and deployment.
|
|
33
|
+
- `npm run preview`: Executes `next start` and serves the static build output locally.
|
|
34
|
+
- `npm run clean`: Executes `rimraf node_modules && rimraf .next && rimraf package-lock.json` and remove node_modules folder, dist folder and package-lock.json.
|
|
35
|
+
- `npm run lint`: Executes `npx eslint --fix && npx prettier . --write` and resolve all the linting and prettier errors.
|
|
36
|
+
|
|
37
|
+
## 🧰 Tooling Setup
|
|
38
|
+
|
|
39
|
+
This project uses ESLint integrated with Prettier to automatically format and lint your code.
|
|
40
|
+
|
|
41
|
+
If you’re using Visual Studio Code, install:
|
|
42
|
+
* [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
43
|
+
* [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
|
44
|
+
|
|
45
|
+
Your editor should now show linting errors and automatically fix issues where possible.
|
|
46
|
+
|
|
47
|
+
More info: [ESLint Integrations](http://eslint.org/docs/user-guide/integrations)
|
|
48
|
+
|
|
49
|
+
## 🎨 Styling
|
|
50
|
+
|
|
51
|
+
This project uses [Tailwind CSS](https://tailwindcss.com/) for styling and and includes pre-configured design tokens from the UNDP Design System.
|
|
52
|
+
|
|
53
|
+
## 📬 Contact us
|
|
54
|
+
|
|
55
|
+
For questions or feedback, contact us at [data@undp.org](mailto:data@undp.org).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { H6, P } from '@undp/design-system-react/Typography';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
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='/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='/undp-logo-blue.svg'
|
|
22
|
+
alt='UNDP logo'
|
|
23
|
+
width={40}
|
|
24
|
+
height={20}
|
|
25
|
+
priority
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<H6 marginBottom='xl' className='text-center'>
|
|
29
|
+
This is the about page.
|
|
30
|
+
</H6>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import '@undp/data-viz/style.css';
|
|
9
|
+
|
|
10
|
+
export const metadata: Metadata = {
|
|
11
|
+
title: 'My Next + UNDP app',
|
|
12
|
+
description: 'Generated by create undp app',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default function RootLayout({
|
|
16
|
+
children,
|
|
17
|
+
}: Readonly<{
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}>) {
|
|
20
|
+
return (
|
|
21
|
+
<html lang='en'>
|
|
22
|
+
<body className='flex flex-col gap-0 min-h-screen'>
|
|
23
|
+
<HeaderEl />
|
|
24
|
+
<main className='grow-1 flex flex-col justify-center'>
|
|
25
|
+
<div className='flex flex-col justify-center'>{children}</div>
|
|
26
|
+
</main>
|
|
27
|
+
<FooterEl />
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { H6, P } from '@undp/design-system-react/Typography';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
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='/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='/undp-logo-blue.svg'
|
|
22
|
+
alt='UNDP logo'
|
|
23
|
+
width={40}
|
|
24
|
+
height={20}
|
|
25
|
+
priority
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<H6 marginBottom='xl' className='text-center'>
|
|
29
|
+
To get started, edit the page.tsx file.
|
|
30
|
+
</H6>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Footer,
|
|
5
|
+
FooterLogoUnit,
|
|
6
|
+
FooterCopyrightUnit,
|
|
7
|
+
} from '@undp/design-system-react/Footer';
|
|
8
|
+
|
|
9
|
+
export default function FooterEl() {
|
|
10
|
+
return (
|
|
11
|
+
<Footer>
|
|
12
|
+
<FooterLogoUnit>subscribe to email</FooterLogoUnit>
|
|
13
|
+
<FooterCopyrightUnit>Footnote can be added here</FooterCopyrightUnit>
|
|
14
|
+
</Footer>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Header,
|
|
5
|
+
HeaderLogoUnit,
|
|
6
|
+
HeaderMainNavUnit,
|
|
7
|
+
HeaderMenuUnit,
|
|
8
|
+
} from '@undp/design-system-react/Header';
|
|
9
|
+
import Link from 'next/link';
|
|
10
|
+
|
|
11
|
+
export default function HeaderEl() {
|
|
12
|
+
return (
|
|
13
|
+
<Header>
|
|
14
|
+
<HeaderLogoUnit
|
|
15
|
+
hyperlink='./'
|
|
16
|
+
siteName='Site name'
|
|
17
|
+
siteSubName='Sub-site name'
|
|
18
|
+
/>
|
|
19
|
+
<HeaderMainNavUnit>
|
|
20
|
+
<HeaderMenuUnit>
|
|
21
|
+
<Link href='/'>Home</Link>
|
|
22
|
+
<Link href='/about'>About</Link>
|
|
23
|
+
</HeaderMenuUnit>
|
|
24
|
+
</HeaderMainNavUnit>
|
|
25
|
+
</Header>
|
|
26
|
+
);
|
|
27
|
+
}
|