From 7bde328b968146c43077bbf52b1d891c8363f9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Tue, 30 Jul 2024 23:59:06 +0200 Subject: [PATCH] perf!: monorepo setup + fully static + webp images BREAKING CHANGE: minimum supported Node.js >= 22.0.0 and pnpm >= 9.5.0 --- .commitlintrc.json | 1 - .dockerignore | 17 + .env.example | 5 +- .eslintrc.json | 38 - .github/workflows/build.yml | 25 - .github/workflows/chromatic.yml | 33 + .github/workflows/ci.yml | 43 + .github/workflows/lint.yml | 42 - .github/workflows/release.yml | 22 +- .github/workflows/test.yml | 48 - .gitignore | 59 +- .html-w3c-validatorrc.json | 6 - .husky/commit-msg | 3 - .husky/pre-commit | 3 - .lintstagedrc.json | 7 - .npmrc | 2 +- .prettierrc.json | 11 +- .releaserc.json | 32 +- .vscode/extensions.json | 1 + .vscode/react.code-snippets | 43 + .vscode/settings.json | 10 +- CONTRIBUTING.md | 38 +- Dockerfile | 28 - README.md | 4 +- app/blog/[slug]/loading.tsx | 11 - app/blog/loading.tsx | 11 - app/blog/page.tsx | 42 - app/error.tsx | 32 - app/globals.css | 80 - app/layout.tsx | 80 - app/loading.tsx | 11 - app/not-found.tsx | 32 - app/page.tsx | 59 - apps/storybook/.eslintrc.json | 4 + apps/storybook/.storybook/main.ts | 34 + apps/storybook/.storybook/preview.tsx | 52 + apps/storybook/.storybook/test-runner.ts | 35 + apps/storybook/chromatic.config.json | 7 + apps/storybook/package.json | 55 + .../storybook/postcss.config.js | 5 +- apps/storybook/stories/Colors.mdx | 31 + apps/storybook/tailwind.config.js | 9 + apps/website/.env.example | 3 + apps/website/.eslintrc.json | 15 + apps/website/Dockerfile | 36 + apps/website/app/[locale]/[...rest]/page.tsx | 7 + .../app/[locale]}/blog/[slug]/page.tsx | 26 +- apps/website/app/[locale]/blog/page.tsx | 55 + apps/website/app/[locale]/error.tsx | 10 + apps/website/app/[locale]/layout.tsx | 91 + apps/website/app/[locale]/loading.tsx | 12 + apps/website/app/[locale]/not-found.tsx | 10 + apps/website/app/[locale]/page.tsx | 42 + {app => apps/website/app}/favicon.ico | Bin apps/website/app/layout.tsx | 7 + apps/website/app/not-found.tsx | 20 + apps/website/i18n.ts | 3 + apps/website/middleware.ts | 23 + apps/website/next-env.d.ts | 5 + apps/website/next.config.js | 22 + apps/website/package.json | 40 + apps/website/postcss.config.js | 7 + .../website/public}/.gitkeep | 0 .../curriculum-vitae/index-BFUlhOmZ.css | 1 + .../public/curriculum-vitae/index-C1jSdDgn.js | 1 + .../public/curriculum-vitae/index.html | 1 + .../website/public}/images/locales/en-US.svg | 0 .../website/public}/images/locales/fr-FR.svg | 0 apps/website/public/images/logo.webp | Bin 0 -> 5248 bytes .../public/images/logo_background.webp | Bin 0 -> 3616 bytes .../public/images/portfolio/Carolo.webp | Bin 0 -> 23922 bytes .../images/portfolio/FunctionProject.webp | Bin 0 -> 41132 bytes .../website/public/images/portfolio/Leon.webp | Bin 0 -> 41496 bytes .../public/images/portfolio/Thream.webp | Bin 0 -> 20314 bytes .../big-o-chart-notations.webp | Bin .../thream-v1-0-0/http-communication.webp | Bin 0 -> 13008 bytes .../posts/thream-v1-0-0/social-project.webp | Bin 0 -> 22910 bytes .../images/posts/thream-v1-0-0/thream-ui.webp | Bin 0 -> 21494 bytes .../public/images/skills/ArchLinux.webp | Bin 0 -> 24452 bytes apps/website/public/images/skills/C-Cpp.webp | Bin 0 -> 9572 bytes apps/website/public/images/skills/CSS.webp | Bin 0 -> 10582 bytes apps/website/public/images/skills/Dart.webp | Bin 0 -> 8756 bytes apps/website/public/images/skills/Docker.webp | Bin 0 -> 15272 bytes .../public/images/skills/Fastify-dark.webp | Bin 0 -> 10828 bytes .../public/images/skills/Fastify-light.webp | Bin 0 -> 5130 bytes .../public}/images/skills/Flutter.webp | Bin .../public/images/skills/GNU-Linux.webp | Bin 0 -> 64118 bytes apps/website/public/images/skills/Git.webp | Bin 0 -> 2254 bytes apps/website/public/images/skills/HTML.webp | Bin 0 -> 5088 bytes .../public/images/skills/JavaScript.webp | Bin 0 -> 4032 bytes .../website/public/images/skills/Laravel.webp | Bin 0 -> 35916 bytes apps/website/public/images/skills/MySQL.webp | Bin 0 -> 11982 bytes apps/website/public/images/skills/NodeJS.webp | Bin 0 -> 7672 bytes apps/website/public/images/skills/PHP.webp | Bin 0 -> 50638 bytes .../public/images/skills/PostgreSQL.webp | Bin 0 -> 10804 bytes .../public/images/skills/Prisma-dark.webp | Bin 0 -> 20242 bytes .../public/images/skills/Prisma-light.webp | Bin 0 -> 40352 bytes apps/website/public/images/skills/Python.webp | Bin 0 -> 8388 bytes .../website/public/images/skills/ReactJS.webp | Bin 0 -> 2764 bytes .../website/public}/images/skills/SASS.svg | 0 apps/website/public/images/skills/Strapi.webp | Bin 0 -> 5338 bytes .../public/images/skills/TailwindCSS.webp | Bin 0 -> 3706 bytes .../public/images/skills/TypeScript.webp | Bin 0 -> 6898 bytes apps/website/public/images/skills/Ubuntu.webp | Bin 0 -> 31398 bytes .../images/skills/VisualStudioCode.webp | Bin 0 -> 9028 bytes apps/website/tailwind.config.js | 9 + tsconfig.json => apps/website/tsconfig.json | 22 +- blog/BlogPost.tsx | 37 - blog/BlogPosts.tsx | 42 - components/Footer/FooterText.tsx | 19 - components/Footer/FooterVersion.tsx | 28 - components/Footer/index.tsx | 15 - components/Header/Locales/LocaleFlag.tsx | 30 - components/Header/Locales/index.tsx | 100 - components/Header/index.tsx | 52 - components/Interests/InterestParagraph.tsx | 30 - .../Interests/InterestsList/InterestItem.tsx | 20 - components/Interests/InterestsList/index.tsx | 29 - components/Interests/index.tsx | 25 - components/OpenSource/Repository.tsx | 28 - components/OpenSource/index.tsx | 37 - components/Portfolio/index.tsx | 21 - .../Profile/ProfileDescriptionBottom.tsx | 21 - components/Profile/ProfileInfo.tsx | 16 - .../Profile/ProfileList/ProfileItem.tsx | 29 - components/Profile/ProfileList/index.tsx | 55 - components/Profile/ProfileLogo.tsx | 11 - components/Profile/index.tsx | 21 - components/Skills/Skill.tsx | 49 - components/Skills/SkillsSection.tsx | 27 - components/Skills/index.tsx | 41 - components/design/Loader.tsx | 28 - components/design/Section/SectionHeading.tsx | 14 - components/design/Section/index.tsx | 66 - components/design/ShadowContainer.tsx | 19 - compose.yaml | 9 +- curriculum-vitae/.gitignore | 22 - curriculum-vitae/build.js | 20 - curriculum-vitae/curriculum-vitae.jsonc | 181 - curriculum-vitae/images/building-columns.svg | 2 - curriculum-vitae/images/graduation-cap.svg | 2 - curriculum-vitae/images/heart.svg | 2 - curriculum-vitae/images/toolbox.svg | 2 - curriculum-vitae/images/user.svg | 2 - curriculum-vitae/index.html | 244 - curriculum-vitae/package-lock.json | 1871 -- curriculum-vitae/package.json | 21 - curriculum-vitae/scripts/main.js | 5 - curriculum-vitae/styles/global.css | 229 - curriculum-vitae/vite.config.ts | 42 - cypress.config.ts | 17 - cypress/component/utils/getAge.cy.ts | 17 - cypress/e2e/common/Header.cy.ts | 62 - cypress/e2e/pages/404.cy.ts | 11 - cypress/e2e/pages/blog/[slug].cy.ts | 14 - cypress/e2e/pages/blog/index.cy.ts | 24 - cypress/e2e/pages/index.cy.ts | 18 - cypress/support/commands.ts | 3 - cypress/support/component-index.html | 14 - cypress/support/component.ts | 14 - i18n/i18n.client.ts | 12 - i18n/i18n.server.ts | 21 - i18n/i18n.ts | 30 - i18n/translations/en-US/common.json | 6 - i18n/translations/en-US/errors.json | 6 - i18n/translations/en-US/home.json | 51 - i18n/translations/fr-FR/common.json | 6 - i18n/translations/fr-FR/errors.json | 6 - i18n/translations/fr-FR/home.json | 51 - middleware.ts | 58 - next.config.js | 12 - package-lock.json | 21880 ---------------- package.json | 102 +- packages/blog/.eslintrc.json | 14 + packages/blog/package.json | 54 + packages/blog/postcss.config.js | 7 + {blog => packages/blog}/posts/clean-code.md | 0 .../blog}/posts/git-ultimate-guide.md | 0 {blog => packages/blog}/posts/hello-world.md | 0 .../posts/mistakes-as-junior-developer.md | 0 .../blog}/posts/programming-challenges.md | 2 +- .../blog}/posts/thream-v1-0-0.md | 6 +- packages/blog/src/BlogPost.ts | 25 + .../blog/src}/BlogPostComments.tsx | 14 +- .../blog/src}/BlogPostContent.tsx | 102 +- packages/blog/src/BlogPostUI.tsx | 29 + packages/blog/src/BlogPosts.tsx | 42 + {blog => packages/blog/src}/blog.ts | 46 +- .../blog/src/stories/BlogPostUI.stories.tsx | 19 + .../blog/src/stories/BlogPosts.stories.tsx | 19 + packages/blog/tailwind.config.js | 9 + packages/blog/tsconfig.json | 18 + packages/config-eslint/.eslintrc.json | 3 + packages/config-eslint/nextjs/.eslintrc.json | 57 + packages/config-eslint/package.json | 22 + packages/config-tailwind/.eslintrc.json | 14 + packages/config-tailwind/classNames.ts | 6 + packages/config-tailwind/index.d.ts | 3 + packages/config-tailwind/package.json | 31 + packages/config-tailwind/postcss.config.js | 7 + packages/config-tailwind/styles.css | 162 + packages/config-tailwind/tailwind.config.js | 57 + packages/config-tailwind/tsconfig.json | 10 + packages/config-typescript/package.json | 8 + packages/config-typescript/tsconfig.json | 20 + packages/i18n/.eslintrc.json | 14 + packages/i18n/package.json | 33 + packages/i18n/src/config.tsx | 30 + packages/i18n/src/i18n.ts | 27 + packages/i18n/src/messages.d.ts | 10 + packages/i18n/src/navigation.ts | 9 + packages/i18n/src/translations/en-US.json | 75 + packages/i18n/src/translations/fr-FR.json | 75 + packages/i18n/tsconfig.json | 14 + packages/react-hooks/.eslintrc.json | 14 + packages/react-hooks/package.json | 35 + .../react-hooks/src/tests/useBoolean.test.ts | 83 + .../src/tests/useIsMounted.test.ts | 16 + packages/react-hooks/src/useBoolean.ts | 50 + .../react-hooks/src}/useIsMounted.ts | 4 +- packages/react-hooks/tsconfig.json | 17 + packages/react-hooks/vitest.config.ts | 15 + packages/ui/.eslintrc.json | 14 + packages/ui/package.json | 55 + packages/ui/postcss.config.js | 7 + packages/ui/src/About/About.stories.tsx | 16 + packages/ui/src/About/About.tsx | 27 + packages/ui/src/About/AboutDescription.tsx | 21 + packages/ui/src/About/AboutIntroduction.tsx | 20 + packages/ui/src/About/AboutList/AboutItem.tsx | 26 + .../About/AboutList/AboutItemBirthDate.tsx | 27 + packages/ui/src/About/AboutList/AboutList.tsx | 30 + packages/ui/src/About/AboutLogo.tsx | 21 + .../SocialMediaIcons/EmailIcon.tsx | 4 +- .../SocialMediaIcons/GitHubIcon.tsx | 4 +- .../SocialMediaIcons/GitLabIcon.tsx | 4 +- .../SocialMediaList/SocialMediaIcons/Icon.tsx | 4 +- .../SocialMediaIcons/NPMIcon.tsx | 2 +- .../SocialMediaIcons/TwitchIcon.tsx | 4 +- .../SocialMediaIcons/TwitterIcon.tsx | 4 +- .../SocialMediaIcons/YouTubeIcon.tsx | 4 +- .../SocialMediaList/SocialMediaItem.tsx | 5 +- .../About/SocialMediaList/SocialMediaList.tsx | 22 +- .../ErrorNotFound/ErrorNotFound.stories.tsx | 16 + .../Errors/ErrorNotFound/ErrorNotFound.tsx | 26 + .../ErrorServer/ErrorServer.stories.tsx | 22 + .../ui/src/Errors/ErrorServer/ErrorServer.tsx | 37 + packages/ui/src/Footer/Footer.stories.tsx | 18 + packages/ui/src/Footer/Footer.tsx | 34 + packages/ui/src/Header/Header.stories.tsx | 16 + packages/ui/src/Header/Header.tsx | 38 + .../ui/src}/Header/Locales/Arrow.tsx | 2 +- packages/ui/src/Header/Locales/LocaleFlag.tsx | 26 + packages/ui/src/Header/Locales/Locales.tsx | 86 + .../ui/src}/Header/SwitchTheme.tsx | 64 +- packages/ui/src/Interests/InterestItem.tsx | 26 + .../ui/src/Interests/Interests.stories.tsx | 16 + packages/ui/src/Interests/Interests.tsx | 74 + packages/ui/src/MainLayout/MainLayout.tsx | 24 + .../ui/src/OpenSource/OpenSource.stories.tsx | 16 + packages/ui/src/OpenSource/OpenSource.tsx | 47 + packages/ui/src/OpenSource/Repository.tsx | 32 + .../ui/src/Portfolio/Portfolio.stories.tsx | 16 + packages/ui/src/Portfolio/Portfolio.tsx | 38 + .../ui/src}/Portfolio/PortfolioItem.tsx | 30 +- packages/ui/src/Skills/SkillItem.tsx | 51 + packages/ui/src/Skills/Skills.stories.tsx | 16 + packages/ui/src/Skills/Skills.tsx | 45 + packages/ui/src/Skills/SkillsSection.tsx | 25 + .../ui/src}/Skills/skills.ts | 50 +- .../ui/src/design/Button/Button.stories.tsx | 148 + packages/ui/src/design/Button/Button.tsx | 111 + packages/ui/src/design/Button/Ripple.tsx | 91 + packages/ui/src/design/Link/Link.stories.tsx | 29 + packages/ui/src/design/Link/Link.tsx | 35 + .../ui/src/design/Section}/RevealFade.tsx | 12 +- packages/ui/src/design/Section/Section.tsx | 88 + .../ui/src/design/Spinner/Spinner.stories.tsx | 17 + packages/ui/src/design/Spinner/Spinner.tsx | 32 + .../design/Typography/Typography.stories.tsx | 101 + .../ui/src/design/Typography/Typography.tsx | 45 + packages/ui/tailwind.config.js | 9 + packages/ui/tsconfig.json | 14 + packages/utils/.eslintrc.json | 14 + packages/utils/package.json | 28 + packages/utils/src/constants.ts | 17 + .../getAge.ts => packages/utils/src/dates.ts | 18 +- packages/utils/src/strings.ts | 3 + packages/utils/src/tests/constants.test.ts | 36 + packages/utils/src/tests/dates.test.ts | 79 + packages/utils/src/tests/strings.test.ts | 41 + packages/utils/tsconfig.json | 13 + packages/utils/vitest.config.ts | 10 + pnpm-lock.yaml | 18527 +++++++++++++ pnpm-workspace.yaml | 87 + public/images/error.png | Bin 160561 -> 0 bytes public/images/logo.png | Bin 6480 -> 0 bytes public/images/logo_background.png | Bin 3869 -> 0 bytes public/images/portfolio/Carolo.png | Bin 98710 -> 0 bytes public/images/portfolio/FunctionProject.png | Bin 112504 -> 0 bytes public/images/portfolio/Leon.png | Bin 193732 -> 0 bytes public/images/portfolio/Thream.png | Bin 67630 -> 0 bytes .../thream-v1-0-0/http-communication.png | Bin 20864 -> 0 bytes .../posts/thream-v1-0-0/social-project.jpg | Bin 48832 -> 0 bytes .../images/posts/thream-v1-0-0/thream-ui.png | Bin 87448 -> 0 bytes public/images/skills/ArchLinux.png | Bin 41798 -> 0 bytes public/images/skills/C-Cpp.png | Bin 27494 -> 0 bytes public/images/skills/CSS.png | Bin 12120 -> 0 bytes public/images/skills/Dart.png | Bin 7343 -> 0 bytes public/images/skills/Docker.png | Bin 18566 -> 0 bytes public/images/skills/Fastify-dark.png | Bin 11697 -> 0 bytes public/images/skills/Fastify-light.png | Bin 8902 -> 0 bytes public/images/skills/GNU-Linux.png | Bin 296869 -> 0 bytes public/images/skills/Git.png | Bin 2383 -> 0 bytes public/images/skills/HTML.png | Bin 9277 -> 0 bytes public/images/skills/JavaScript.png | Bin 4801 -> 0 bytes public/images/skills/Laravel.png | Bin 22730 -> 0 bytes public/images/skills/MySQL.png | Bin 15126 -> 0 bytes public/images/skills/NodeJS.png | Bin 11425 -> 0 bytes public/images/skills/PHP.png | Bin 186100 -> 0 bytes public/images/skills/PostgreSQL.png | Bin 27728 -> 0 bytes public/images/skills/Prisma-dark.png | Bin 40517 -> 0 bytes public/images/skills/Prisma-light.png | Bin 85755 -> 0 bytes public/images/skills/Python.png | Bin 9349 -> 0 bytes public/images/skills/ReactJS.png | Bin 4883 -> 0 bytes public/images/skills/Strapi.png | Bin 26235 -> 0 bytes public/images/skills/TailwindCSS.png | Bin 13490 -> 0 bytes public/images/skills/TypeScript.png | Bin 6769 -> 0 bytes public/images/skills/Ubuntu.png | Bin 76840 -> 0 bytes public/images/skills/VisualStudioCode.png | Bin 11464 -> 0 bytes tailwind.config.js | 50 - theme/theme.client.ts | 9 - theme/theme.server.ts | 21 - turbo.json | 35 + utils/constants.ts | 11 - utils/getVersion.ts | 8 - 336 files changed, 22933 insertions(+), 26923 deletions(-) delete mode 100644 .commitlintrc.json delete mode 100644 .eslintrc.json delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/chromatic.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .html-w3c-validatorrc.json delete mode 100755 .husky/commit-msg delete mode 100755 .husky/pre-commit delete mode 100644 .lintstagedrc.json mode change 100644 => 100755 .prettierrc.json create mode 100644 .vscode/react.code-snippets delete mode 100644 Dockerfile delete mode 100644 app/blog/[slug]/loading.tsx delete mode 100644 app/blog/loading.tsx delete mode 100644 app/blog/page.tsx delete mode 100644 app/error.tsx delete mode 100644 app/globals.css delete mode 100644 app/layout.tsx delete mode 100644 app/loading.tsx delete mode 100644 app/not-found.tsx delete mode 100644 app/page.tsx create mode 100644 apps/storybook/.eslintrc.json create mode 100644 apps/storybook/.storybook/main.ts create mode 100644 apps/storybook/.storybook/preview.tsx create mode 100644 apps/storybook/.storybook/test-runner.ts create mode 100644 apps/storybook/chromatic.config.json create mode 100644 apps/storybook/package.json rename postcss.config.js => apps/storybook/postcss.config.js (50%) create mode 100644 apps/storybook/stories/Colors.mdx create mode 100644 apps/storybook/tailwind.config.js create mode 100644 apps/website/.env.example create mode 100644 apps/website/.eslintrc.json create mode 100644 apps/website/Dockerfile create mode 100644 apps/website/app/[locale]/[...rest]/page.tsx rename {app => apps/website/app/[locale]}/blog/[slug]/page.tsx (56%) create mode 100644 apps/website/app/[locale]/blog/page.tsx create mode 100644 apps/website/app/[locale]/error.tsx create mode 100644 apps/website/app/[locale]/layout.tsx create mode 100644 apps/website/app/[locale]/loading.tsx create mode 100644 apps/website/app/[locale]/not-found.tsx create mode 100644 apps/website/app/[locale]/page.tsx rename {app => apps/website/app}/favicon.ico (100%) create mode 100644 apps/website/app/layout.tsx create mode 100644 apps/website/app/not-found.tsx create mode 100644 apps/website/i18n.ts create mode 100644 apps/website/middleware.ts create mode 100644 apps/website/next-env.d.ts create mode 100644 apps/website/next.config.js create mode 100644 apps/website/package.json create mode 100644 apps/website/postcss.config.js rename {public/curriculum-vitae => apps/website/public}/.gitkeep (100%) create mode 100644 apps/website/public/curriculum-vitae/index-BFUlhOmZ.css create mode 100644 apps/website/public/curriculum-vitae/index-C1jSdDgn.js create mode 100644 apps/website/public/curriculum-vitae/index.html rename {public => apps/website/public}/images/locales/en-US.svg (100%) rename {public => apps/website/public}/images/locales/fr-FR.svg (100%) create mode 100644 apps/website/public/images/logo.webp create mode 100644 apps/website/public/images/logo_background.webp create mode 100644 apps/website/public/images/portfolio/Carolo.webp create mode 100644 apps/website/public/images/portfolio/FunctionProject.webp create mode 100644 apps/website/public/images/portfolio/Leon.webp create mode 100644 apps/website/public/images/portfolio/Thream.webp rename {public => apps/website/public}/images/posts/programming-challenges/big-o-chart-notations.webp (100%) create mode 100644 apps/website/public/images/posts/thream-v1-0-0/http-communication.webp create mode 100644 apps/website/public/images/posts/thream-v1-0-0/social-project.webp create mode 100644 apps/website/public/images/posts/thream-v1-0-0/thream-ui.webp create mode 100644 apps/website/public/images/skills/ArchLinux.webp create mode 100644 apps/website/public/images/skills/C-Cpp.webp create mode 100644 apps/website/public/images/skills/CSS.webp create mode 100644 apps/website/public/images/skills/Dart.webp create mode 100644 apps/website/public/images/skills/Docker.webp create mode 100644 apps/website/public/images/skills/Fastify-dark.webp create mode 100644 apps/website/public/images/skills/Fastify-light.webp rename {public => apps/website/public}/images/skills/Flutter.webp (100%) create mode 100644 apps/website/public/images/skills/GNU-Linux.webp create mode 100644 apps/website/public/images/skills/Git.webp create mode 100644 apps/website/public/images/skills/HTML.webp create mode 100644 apps/website/public/images/skills/JavaScript.webp create mode 100644 apps/website/public/images/skills/Laravel.webp create mode 100644 apps/website/public/images/skills/MySQL.webp create mode 100644 apps/website/public/images/skills/NodeJS.webp create mode 100644 apps/website/public/images/skills/PHP.webp create mode 100644 apps/website/public/images/skills/PostgreSQL.webp create mode 100644 apps/website/public/images/skills/Prisma-dark.webp create mode 100644 apps/website/public/images/skills/Prisma-light.webp create mode 100644 apps/website/public/images/skills/Python.webp create mode 100644 apps/website/public/images/skills/ReactJS.webp rename {public => apps/website/public}/images/skills/SASS.svg (100%) create mode 100644 apps/website/public/images/skills/Strapi.webp create mode 100644 apps/website/public/images/skills/TailwindCSS.webp create mode 100644 apps/website/public/images/skills/TypeScript.webp create mode 100644 apps/website/public/images/skills/Ubuntu.webp create mode 100644 apps/website/public/images/skills/VisualStudioCode.webp create mode 100644 apps/website/tailwind.config.js rename tsconfig.json => apps/website/tsconfig.json (65%) delete mode 100644 blog/BlogPost.tsx delete mode 100644 blog/BlogPosts.tsx delete mode 100644 components/Footer/FooterText.tsx delete mode 100644 components/Footer/FooterVersion.tsx delete mode 100644 components/Footer/index.tsx delete mode 100644 components/Header/Locales/LocaleFlag.tsx delete mode 100644 components/Header/Locales/index.tsx delete mode 100644 components/Header/index.tsx delete mode 100644 components/Interests/InterestParagraph.tsx delete mode 100644 components/Interests/InterestsList/InterestItem.tsx delete mode 100644 components/Interests/InterestsList/index.tsx delete mode 100644 components/Interests/index.tsx delete mode 100644 components/OpenSource/Repository.tsx delete mode 100644 components/OpenSource/index.tsx delete mode 100644 components/Portfolio/index.tsx delete mode 100644 components/Profile/ProfileDescriptionBottom.tsx delete mode 100644 components/Profile/ProfileInfo.tsx delete mode 100644 components/Profile/ProfileList/ProfileItem.tsx delete mode 100644 components/Profile/ProfileList/index.tsx delete mode 100644 components/Profile/ProfileLogo.tsx delete mode 100644 components/Profile/index.tsx delete mode 100644 components/Skills/Skill.tsx delete mode 100644 components/Skills/SkillsSection.tsx delete mode 100644 components/Skills/index.tsx delete mode 100644 components/design/Loader.tsx delete mode 100644 components/design/Section/SectionHeading.tsx delete mode 100644 components/design/Section/index.tsx delete mode 100644 components/design/ShadowContainer.tsx delete mode 100644 curriculum-vitae/.gitignore delete mode 100644 curriculum-vitae/build.js delete mode 100644 curriculum-vitae/curriculum-vitae.jsonc delete mode 100644 curriculum-vitae/images/building-columns.svg delete mode 100644 curriculum-vitae/images/graduation-cap.svg delete mode 100644 curriculum-vitae/images/heart.svg delete mode 100644 curriculum-vitae/images/toolbox.svg delete mode 100644 curriculum-vitae/images/user.svg delete mode 100644 curriculum-vitae/index.html delete mode 100644 curriculum-vitae/package-lock.json delete mode 100644 curriculum-vitae/package.json delete mode 100644 curriculum-vitae/scripts/main.js delete mode 100644 curriculum-vitae/styles/global.css delete mode 100644 curriculum-vitae/vite.config.ts delete mode 100644 cypress.config.ts delete mode 100644 cypress/component/utils/getAge.cy.ts delete mode 100644 cypress/e2e/common/Header.cy.ts delete mode 100644 cypress/e2e/pages/404.cy.ts delete mode 100644 cypress/e2e/pages/blog/[slug].cy.ts delete mode 100644 cypress/e2e/pages/blog/index.cy.ts delete mode 100644 cypress/e2e/pages/index.cy.ts delete mode 100644 cypress/support/commands.ts delete mode 100644 cypress/support/component-index.html delete mode 100644 cypress/support/component.ts delete mode 100644 i18n/i18n.client.ts delete mode 100644 i18n/i18n.server.ts delete mode 100644 i18n/i18n.ts delete mode 100644 i18n/translations/en-US/common.json delete mode 100644 i18n/translations/en-US/errors.json delete mode 100644 i18n/translations/en-US/home.json delete mode 100644 i18n/translations/fr-FR/common.json delete mode 100644 i18n/translations/fr-FR/errors.json delete mode 100644 i18n/translations/fr-FR/home.json delete mode 100644 middleware.ts delete mode 100644 next.config.js delete mode 100644 package-lock.json create mode 100644 packages/blog/.eslintrc.json create mode 100644 packages/blog/package.json create mode 100644 packages/blog/postcss.config.js rename {blog => packages/blog}/posts/clean-code.md (100%) rename {blog => packages/blog}/posts/git-ultimate-guide.md (100%) rename {blog => packages/blog}/posts/hello-world.md (100%) rename {blog => packages/blog}/posts/mistakes-as-junior-developer.md (100%) rename {blog => packages/blog}/posts/programming-challenges.md (99%) rename {blog => packages/blog}/posts/thream-v1-0-0.md (97%) create mode 100644 packages/blog/src/BlogPost.ts rename {blog => packages/blog/src}/BlogPostComments.tsx (56%) rename {blog => packages/blog/src}/BlogPostContent.tsx (53%) create mode 100644 packages/blog/src/BlogPostUI.tsx create mode 100644 packages/blog/src/BlogPosts.tsx rename {blog => packages/blog/src}/blog.ts (62%) create mode 100644 packages/blog/src/stories/BlogPostUI.stories.tsx create mode 100644 packages/blog/src/stories/BlogPosts.stories.tsx create mode 100644 packages/blog/tailwind.config.js create mode 100644 packages/blog/tsconfig.json create mode 100644 packages/config-eslint/.eslintrc.json create mode 100644 packages/config-eslint/nextjs/.eslintrc.json create mode 100644 packages/config-eslint/package.json create mode 100644 packages/config-tailwind/.eslintrc.json create mode 100644 packages/config-tailwind/classNames.ts create mode 100644 packages/config-tailwind/index.d.ts create mode 100644 packages/config-tailwind/package.json create mode 100644 packages/config-tailwind/postcss.config.js create mode 100644 packages/config-tailwind/styles.css create mode 100644 packages/config-tailwind/tailwind.config.js create mode 100644 packages/config-tailwind/tsconfig.json create mode 100644 packages/config-typescript/package.json create mode 100644 packages/config-typescript/tsconfig.json create mode 100644 packages/i18n/.eslintrc.json create mode 100644 packages/i18n/package.json create mode 100644 packages/i18n/src/config.tsx create mode 100644 packages/i18n/src/i18n.ts create mode 100644 packages/i18n/src/messages.d.ts create mode 100644 packages/i18n/src/navigation.ts create mode 100644 packages/i18n/src/translations/en-US.json create mode 100644 packages/i18n/src/translations/fr-FR.json create mode 100644 packages/i18n/tsconfig.json create mode 100644 packages/react-hooks/.eslintrc.json create mode 100644 packages/react-hooks/package.json create mode 100644 packages/react-hooks/src/tests/useBoolean.test.ts create mode 100644 packages/react-hooks/src/tests/useIsMounted.test.ts create mode 100644 packages/react-hooks/src/useBoolean.ts rename {hooks => packages/react-hooks/src}/useIsMounted.ts (68%) create mode 100644 packages/react-hooks/tsconfig.json create mode 100644 packages/react-hooks/vitest.config.ts create mode 100644 packages/ui/.eslintrc.json create mode 100644 packages/ui/package.json create mode 100644 packages/ui/postcss.config.js create mode 100644 packages/ui/src/About/About.stories.tsx create mode 100644 packages/ui/src/About/About.tsx create mode 100644 packages/ui/src/About/AboutDescription.tsx create mode 100644 packages/ui/src/About/AboutIntroduction.tsx create mode 100644 packages/ui/src/About/AboutList/AboutItem.tsx create mode 100644 packages/ui/src/About/AboutList/AboutItemBirthDate.tsx create mode 100644 packages/ui/src/About/AboutList/AboutList.tsx create mode 100644 packages/ui/src/About/AboutLogo.tsx rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/EmailIcon.tsx (90%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/GitHubIcon.tsx (90%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/GitLabIcon.tsx (90%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/Icon.tsx (69%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/NPMIcon.tsx (80%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/TwitchIcon.tsx (78%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/TwitterIcon.tsx (87%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaIcons/YouTubeIcon.tsx (84%) rename {components/Profile => packages/ui/src/About}/SocialMediaList/SocialMediaItem.tsx (68%) rename components/Profile/SocialMediaList/index.tsx => packages/ui/src/About/SocialMediaList/SocialMediaList.tsx (89%) create mode 100644 packages/ui/src/Errors/ErrorNotFound/ErrorNotFound.stories.tsx create mode 100644 packages/ui/src/Errors/ErrorNotFound/ErrorNotFound.tsx create mode 100644 packages/ui/src/Errors/ErrorServer/ErrorServer.stories.tsx create mode 100644 packages/ui/src/Errors/ErrorServer/ErrorServer.tsx create mode 100644 packages/ui/src/Footer/Footer.stories.tsx create mode 100644 packages/ui/src/Footer/Footer.tsx create mode 100644 packages/ui/src/Header/Header.stories.tsx create mode 100644 packages/ui/src/Header/Header.tsx rename {components => packages/ui/src}/Header/Locales/Arrow.tsx (89%) create mode 100644 packages/ui/src/Header/Locales/LocaleFlag.tsx create mode 100644 packages/ui/src/Header/Locales/Locales.tsx rename {components => packages/ui/src}/Header/SwitchTheme.tsx (58%) create mode 100644 packages/ui/src/Interests/InterestItem.tsx create mode 100644 packages/ui/src/Interests/Interests.stories.tsx create mode 100644 packages/ui/src/Interests/Interests.tsx create mode 100644 packages/ui/src/MainLayout/MainLayout.tsx create mode 100644 packages/ui/src/OpenSource/OpenSource.stories.tsx create mode 100644 packages/ui/src/OpenSource/OpenSource.tsx create mode 100644 packages/ui/src/OpenSource/Repository.tsx create mode 100644 packages/ui/src/Portfolio/Portfolio.stories.tsx create mode 100644 packages/ui/src/Portfolio/Portfolio.tsx rename {components => packages/ui/src}/Portfolio/PortfolioItem.tsx (59%) create mode 100644 packages/ui/src/Skills/SkillItem.tsx create mode 100644 packages/ui/src/Skills/Skills.stories.tsx create mode 100644 packages/ui/src/Skills/Skills.tsx create mode 100644 packages/ui/src/Skills/SkillsSection.tsx rename {components => packages/ui/src}/Skills/skills.ts (61%) create mode 100644 packages/ui/src/design/Button/Button.stories.tsx create mode 100644 packages/ui/src/design/Button/Button.tsx create mode 100644 packages/ui/src/design/Button/Ripple.tsx create mode 100644 packages/ui/src/design/Link/Link.stories.tsx create mode 100644 packages/ui/src/design/Link/Link.tsx rename {components/design => packages/ui/src/design/Section}/RevealFade.tsx (65%) create mode 100644 packages/ui/src/design/Section/Section.tsx create mode 100644 packages/ui/src/design/Spinner/Spinner.stories.tsx create mode 100644 packages/ui/src/design/Spinner/Spinner.tsx create mode 100644 packages/ui/src/design/Typography/Typography.stories.tsx create mode 100644 packages/ui/src/design/Typography/Typography.tsx create mode 100644 packages/ui/tailwind.config.js create mode 100644 packages/ui/tsconfig.json create mode 100644 packages/utils/.eslintrc.json create mode 100644 packages/utils/package.json create mode 100644 packages/utils/src/constants.ts rename utils/getAge.ts => packages/utils/src/dates.ts (51%) create mode 100644 packages/utils/src/strings.ts create mode 100644 packages/utils/src/tests/constants.test.ts create mode 100644 packages/utils/src/tests/dates.test.ts create mode 100644 packages/utils/src/tests/strings.test.ts create mode 100644 packages/utils/tsconfig.json create mode 100644 packages/utils/vitest.config.ts create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml delete mode 100644 public/images/error.png delete mode 100644 public/images/logo.png delete mode 100644 public/images/logo_background.png delete mode 100644 public/images/portfolio/Carolo.png delete mode 100644 public/images/portfolio/FunctionProject.png delete mode 100644 public/images/portfolio/Leon.png delete mode 100644 public/images/portfolio/Thream.png delete mode 100644 public/images/posts/thream-v1-0-0/http-communication.png delete mode 100644 public/images/posts/thream-v1-0-0/social-project.jpg delete mode 100644 public/images/posts/thream-v1-0-0/thream-ui.png delete mode 100644 public/images/skills/ArchLinux.png delete mode 100644 public/images/skills/C-Cpp.png delete mode 100644 public/images/skills/CSS.png delete mode 100644 public/images/skills/Dart.png delete mode 100644 public/images/skills/Docker.png delete mode 100644 public/images/skills/Fastify-dark.png delete mode 100644 public/images/skills/Fastify-light.png delete mode 100644 public/images/skills/GNU-Linux.png delete mode 100644 public/images/skills/Git.png delete mode 100644 public/images/skills/HTML.png delete mode 100644 public/images/skills/JavaScript.png delete mode 100644 public/images/skills/Laravel.png delete mode 100644 public/images/skills/MySQL.png delete mode 100644 public/images/skills/NodeJS.png delete mode 100644 public/images/skills/PHP.png delete mode 100644 public/images/skills/PostgreSQL.png delete mode 100644 public/images/skills/Prisma-dark.png delete mode 100644 public/images/skills/Prisma-light.png delete mode 100644 public/images/skills/Python.png delete mode 100644 public/images/skills/ReactJS.png delete mode 100644 public/images/skills/Strapi.png delete mode 100644 public/images/skills/TailwindCSS.png delete mode 100644 public/images/skills/TypeScript.png delete mode 100644 public/images/skills/Ubuntu.png delete mode 100644 public/images/skills/VisualStudioCode.png delete mode 100644 tailwind.config.js delete mode 100644 theme/theme.client.ts delete mode 100644 theme/theme.server.ts create mode 100644 turbo.json delete mode 100644 utils/constants.ts delete mode 100644 utils/getVersion.ts diff --git a/.commitlintrc.json b/.commitlintrc.json deleted file mode 100644 index d3d7f0c..0000000 --- a/.commitlintrc.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": ["@commitlint/config-conventional"] } diff --git a/.dockerignore b/.dockerignore index ba056b2..b5a934d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,10 @@ +**/.git **/.turbo **/.next **/out +**/dist **/build +**/storybook-static **/coverage **/node_modules @@ -11,10 +14,24 @@ .env.development secrets +# IDEs and editors +.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace +.vscode + # misc .DS_Store *.pem Dockerfile +README.md + +# vercel +.vercel # typescript *.tsbuildinfo diff --git a/.env.example b/.env.example index 3958efe..1958f4a 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1 @@ -COMPOSE_PROJECT_NAME=theoludwig -HOSTNAME=0.0.0.0 -PORT=3000 -NEXT_TELEMETRY_DISABLED=1 +WEBSITE_PORT=3000 diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 5f49665..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "root": true, - "extends": [ - "conventions", - "next/core-web-vitals", - "plugin:tailwindcss/recommended" - ], - "plugins": ["import", "promise", "unicorn"], - "settings": { - "tailwindcss": { - "callees": ["classNames"] - }, - "react": { - "version": "detect" - } - }, - "rules": { - "react/self-closing-comp": [ - "error", - { - "component": true, - "html": true - } - ], - "react/void-dom-elements-no-children": "error", - "react/jsx-boolean-value": "error" - }, - "overrides": [ - { - "files": ["*.ts", "*.tsx"], - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "parserOptions": { - "project": "./tsconfig.json" - } - } - ] -} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 86829a2..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "Build" - -on: - push: - branches: [develop] - pull_request: - branches: [main, develop] - -jobs: - build: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v4.1.6" - - - name: "Setup Node.js" - uses: "actions/setup-node@v4.0.2" - with: - node-version: "20.x" - cache: "npm" - - - name: "Install dependencies" - run: "npm clean-install" - - - name: "Build" - run: "npm run build" diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 0000000..135ae5b --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,33 @@ +name: "Chromatic" + +on: + push: + branches: [develop] + pull_request: + branches: [develop, staging, main] + +jobs: + chromatic: + timeout-minutes: 30 + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4.1.7" + with: + fetch-depth: 0 + + - uses: "pnpm/action-setup@v4.0.0" + + - name: "Setup Node.js" + uses: "actions/setup-node@v4.0.3" + with: + node-version: "22.x" + cache: "pnpm" + + - name: "Install dependencies" + run: "pnpm install --frozen-lockfile" + + - name: "Run Chromatic" + uses: "chromaui/action@latest" + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: "apps/storybook" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aeafcae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: "CI" + +on: + push: + branches: [develop] + pull_request: + branches: [develop, staging, main] + +jobs: + ci: + timeout-minutes: 30 + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4.1.7" + + - uses: "pnpm/action-setup@v4.0.0" + + - name: "Setup Node.js" + uses: "actions/setup-node@v4.0.3" + with: + node-version: "22.x" + cache: "pnpm" + + - name: "Install dependencies" + run: "pnpm install --frozen-lockfile" + + - name: "Install Playwright" + run: "pnpm exec playwright install --with-deps" + + - run: "node --run lint:editorconfig" + - run: "node --run lint:markdown" + - run: "node --run lint:prettier" + - run: "node --run lint:eslint" + - run: "node --run lint:typescript" + - run: "node --run test" + - run: "node --run build" + + commitlint: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4.1.7" + + - uses: "wagoid/commitlint-github-action@v6.0.1" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index f1fee09..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: "Lint" - -on: - push: - branches: [develop] - pull_request: - branches: [main, develop] - -jobs: - lint: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v4.1.6" - - - name: "Setup Node.js" - uses: "actions/setup-node@v4.0.2" - with: - node-version: "20.x" - cache: "npm" - - - name: "Install dependencies" - run: "npm clean-install" - - - name: "lint:commit" - run: 'npm run lint:commit -- --to "${{ github.sha }}"' - - - name: "lint:editorconfig" - run: "npm run lint:editorconfig" - - - name: "lint:markdown" - run: "npm run lint:markdown" - - - name: "lint:eslint" - run: "npm run lint:eslint" - - - name: "lint:prettier" - run: "npm run lint:prettier" - - - name: "lint:dotenv" - uses: "dotenv-linter/action-dotenv-linter@v2.21.0" - with: - github_token: ${{ secrets.github_token }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68491f2..ea4cec3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,13 +2,19 @@ name: "Release" on: push: - branches: [main] + branches: [main, staging] jobs: release: + timeout-minutes: 30 runs-on: "ubuntu-latest" + permissions: + contents: "write" + issues: "write" + pull-requests: "write" + id-token: "write" steps: - - uses: "actions/checkout@v4.1.6" + - uses: "actions/checkout@v4.1.7" with: fetch-depth: 0 persist-credentials: false @@ -20,17 +26,19 @@ jobs: git_user_signingkey: true git_commit_gpgsign: true + - uses: "pnpm/action-setup@v4.0.0" + - name: "Setup Node.js" - uses: "actions/setup-node@v4.0.2" + uses: "actions/setup-node@v4.0.3" with: - node-version: "20.x" - cache: "npm" + node-version: "22.x" + cache: "pnpm" - name: "Install dependencies" - run: "npm clean-install" + run: "pnpm install --frozen-lockfile" - name: "Release" - run: "npm run release" + run: "node --run release" env: GH_TOKEN: ${{ secrets.GH_TOKEN }} GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d46e37e..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "Test" - -on: - push: - branches: [develop] - pull_request: - branches: [main, develop] - -jobs: - test-unit: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v4.1.6" - - - name: "Setup Node.js" - uses: "actions/setup-node@v4.0.2" - with: - node-version: "20.x" - cache: "npm" - - - name: "Install dependencies" - run: "npm clean-install" - - - name: "Unit Test" - run: "npm run test:unit" - - test-e2e: - runs-on: "ubuntu-latest" - steps: - - uses: "actions/checkout@v4.1.6" - - - name: "Setup Node.js" - uses: "actions/setup-node@v4.0.2" - with: - node-version: "20.x" - cache: "npm" - - - name: "Install dependencies" - run: "npm clean-install" - - - name: "Build" - run: "npm run build" - - - name: "html-w3c-validator" - run: "npm run test:html-w3c-validator" - - - name: "End To End (e2e) Test" - run: "npm run test:e2e" diff --git a/.gitignore b/.gitignore index e09c58a..cbec9be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,39 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - # dependencies node_modules .npm - -# next.js -.next -out - -# production -build -dist -public/curriculum-vitae +package-lock.json +.pnpm-store +.pnp +.pnp.js +.yarn/install-state.gz # testing coverage -cypress/screenshots -cypress/videos -cypress/downloads -# envs -.env -.env.production +# production +.next/ +out/ +dist/ +build/ +# apps/website/public/curriculum-vitae/ + +# misc +.DS_Store +*.pem +.turbo +bin/ # debug npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Storybook +*storybook.log +storybook-static # IDEs and editors -/.idea +.idea .project .classpath .c9/ @@ -35,17 +41,14 @@ npm-debug.log* .settings/ *.sublime-workspace -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json +# local env files +.env +.env.production +.env*.local -# misc -.DS_Store -.lighthouseci +# vercel +.vercel # typescript *.tsbuildinfo -next-env.d.ts +# next-env.d.ts diff --git a/.html-w3c-validatorrc.json b/.html-w3c-validatorrc.json deleted file mode 100644 index 724c149..0000000 --- a/.html-w3c-validatorrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/theoludwig/html-w3c-validator/master/schema/html-w3c-validatorrc-schema.json", - "urls": ["http://127.0.0.1:3000/", "http://127.0.0.1:3000/blog"], - "files": ["./public/curriculum-vitae/index.html"], - "severities": ["error"] -} diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index f5d969d..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -npm run lint:commit -- --edit diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 20e719e..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -npm run lint:staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json deleted file mode 100644 index ebbecc7..0000000 --- a/.lintstagedrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "**/*": ["editorconfig-checker", "prettier --write --ignore-unknown"], - "**/*.md": ["markdownlint-cli2 --fix --no-globs"], - "**/*.{js,jsx,ts,tsx}": [ - "eslint --fix --max-warnings 0 --report-unused-disable-directives" - ] -} diff --git a/.npmrc b/.npmrc index cffe8cd..1dab4ed 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -save-exact=true +save-exact = true diff --git a/.prettierrc.json b/.prettierrc.json old mode 100644 new mode 100755 index 4d9a0bb..30351be --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,13 @@ { "semi": false, - "plugins": ["prettier-plugin-tailwindcss"] + "plugins": ["prettier-plugin-tailwindcss"], + "tailwindFunctions": ["classNames", "cva"], + "overrides": [ + { + "files": "pnpm-lock.yaml", + "options": { + "rangeEnd": 0 + } + } + ] } diff --git a/.releaserc.json b/.releaserc.json index c5979ae..fb75ef7 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,28 +1,22 @@ { - "branches": ["main"], + "branches": ["main", { "name": "staging", "prerelease": true }], "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", [ - "@semantic-release/commit-analyzer", + "@semantic-release/exec", { - "preset": "conventionalcommits" - } - ], - [ - "@semantic-release/release-notes-generator", - { - "preset": "conventionalcommits" - } - ], - [ - "@semantic-release/npm", - { - "npmPublish": false + "prepareCmd": "replace-in-files --regex='version\": *\"[^\"]*' --replacement='\"version\": \"${nextRelease.version}\"' '**/package.json' '!**/node_modules/**'" } ], [ "@semantic-release/git", { - "assets": ["package.json", "package-lock.json"], + "assets": [ + "package.json", + "apps/*/package.json", + "packages/*/package.json" + ], "message": "chore(release): ${nextRelease.version} [skip ci]" } ], @@ -30,8 +24,10 @@ [ "@saithodev/semantic-release-backmerge", { - "branches": [{ "from": "main", "to": "develop" }], - "backmergeStrategy": "merge" + "branches": [ + { "from": "main", "to": "develop" }, + { "from": "staging", "to": "develop" } + ] } ] ] diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 8aae002..3cd506d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ + "Vercel.turbo-vsc", "editorconfig.editorconfig", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", diff --git a/.vscode/react.code-snippets b/.vscode/react.code-snippets new file mode 100644 index 0000000..38f5c1c --- /dev/null +++ b/.vscode/react.code-snippets @@ -0,0 +1,43 @@ +{ + "React Component": { + "scope": "typescriptreact", + "prefix": "rfc", + "body": [ + "export interface ${1:ComponentName}Props {}", + "", + "export const ${1:ComponentName}: React.FC<${1:ComponentName}Props> = () => {", + " return (", + "
", + "

${1:ComponentName}

", + "
", + " )", + "}", + "", + ], + "description": "React Component", + }, + "React Component Story": { + "scope": "typescriptreact", + "prefix": "rfcs", + "body": [ + "import type { Meta, StoryObj } from \"@storybook/react\"", + "", + "import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}\"", + "", + "const meta = {", + " title: \"${1:ComponentName}\",", + " component: ${1:ComponentName}Component", + "} satisfies Meta", + "", + "export default meta", + "", + "type Story = StoryObj", + "", + "export const ${1:ComponentName}: Story = {", + " args: {}", + "}", + "", + ], + "description": "React Component Story", + }, +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3240653..f6ffb0a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,14 +1,20 @@ { "typescript.tsdk": "node_modules/typescript/lib", "editor.bracketPairColorization.enabled": true, + "editor.wordWrap": "on", "prettier.configPath": ".prettierrc.json", "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll": "explicit" + "source.fixAll": "explicit", + "source.organizeImports": "explicit" }, "eslint.options": { "ignorePath": ".gitignore" }, - "prettier.ignorePath": ".gitignore" + "prettier.ignorePath": ".gitignore", + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cb9e67..afa3894 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,8 +31,8 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv ### Prerequisites -- [Node.js](https://nodejs.org/) >= 20.0.0 -- [npm](https://www.npmjs.com/) >= 10.0.0 +- [Node.js](https://nodejs.org/) >= 22.0.0 +- [pnpm](https://pnpm.io/) >= 9.5.0 ### Installation @@ -40,21 +40,35 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv # Clone the repository git clone git@github.com:theoludwig/theoludwig.git -# Go to the project root -cd theoludwig - # Configure environment variables cp .env.example .env +cp apps/website/.env.example apps/website/.env -# Install -npm clean-install +# Install dependencies +pnpm install --frozen-lockfile + +# Install Playwright browser binaries and their dependencies (tests) +pnpm exec playwright install --with-deps ``` -### Local Development environment +### Development ```sh -# Run website -npm run dev +# Start the development server +node --run dev + +# Lint +node --run lint:editorconfig +node --run lint:markdown +node --run lint:prettier +node --run lint:eslint +node --run lint:typescript + +# Tests +node --run test + +# Build +node --run build ``` ### Production environment with [Docker](https://www.docker.com/) @@ -64,6 +78,6 @@ npm run dev docker compose up --build ``` -### Service started +#### Services started -`website`: +`theoludwig`: diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c58cad1..0000000 --- a/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM node:20.15.1 AS builder-dependencies -WORKDIR /usr/src/application -COPY ./package*.json ./ -RUN npm clean-install - -FROM node:20.15.1 AS builder -ENV NEXT_TELEMETRY_DISABLED=1 -ENV IS_STANDALONE=true -WORKDIR /usr/src/application -COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules -COPY ./ ./ -RUN npm run build - -FROM node:20.15.1-slim AS runner -ENV NODE_ENV=production -ENV HOSTNAME=0.0.0.0 -ENV NEXT_TELEMETRY_DISABLED=1 -ENV IS_STANDALONE=true -WORKDIR /usr/src/application -RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 applicationrunner -USER applicationrunner -COPY --from=builder-dependencies --chown=applicationrunner:nodejs /usr/src/application/node_modules ./node_modules -COPY --from=builder --chown=applicationrunner:nodejs /usr/src/application/.next/standalone ./ -COPY --from=builder --chown=applicationrunner:nodejs /usr/src/application/.next/static ./.next/static -COPY --from=builder --chown=applicationrunner:nodejs /usr/src/application/public ./public -COPY --from=builder --chown=applicationrunner:nodejs /usr/src/application/i18n/translations ./i18n/translations -COPY --from=builder --chown=applicationrunner:nodejs /usr/src/application/next.config.js ./next.config.js -CMD ["./server.js"] diff --git a/README.md b/README.md index ff68a0f..64dc285 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ GitHub GitLab npm - Twitter + Twitter YouTube Twitch Website @@ -23,7 +23,7 @@ { "name": "Théo LUDWIG", "pronouns": "He/Him", - "birthDate": "31/03/2003", + "birthDate": "2003-03-31", "nationality": "Alsace, France", "interests": ["Developer Full Stack", "Open-Source Enthusiast"], "skills": { diff --git a/app/blog/[slug]/loading.tsx b/app/blog/[slug]/loading.tsx deleted file mode 100644 index 94a0104..0000000 --- a/app/blog/[slug]/loading.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Loader } from "@/components/design/Loader" - -const Loading = (): JSX.Element => { - return ( -
- -
- ) -} - -export default Loading diff --git a/app/blog/loading.tsx b/app/blog/loading.tsx deleted file mode 100644 index 94a0104..0000000 --- a/app/blog/loading.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Loader } from "@/components/design/Loader" - -const Loading = (): JSX.Element => { - return ( -
- -
- ) -} - -export default Loading diff --git a/app/blog/page.tsx b/app/blog/page.tsx deleted file mode 100644 index 7a4dc30..0000000 --- a/app/blog/page.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { Suspense } from "react" -import type { Metadata } from "next" - -import { BlogPosts } from "@/blog/BlogPosts" -import { Loader } from "@/components/design/Loader" - -const title = "Blog | Théo LUDWIG" -const description = - "The latest news about my journey of learning computer science." - -export const metadata: Metadata = { - title, - description, - openGraph: { - title, - description, - }, - twitter: { - title, - description, - }, -} - -const BlogPage = async (): Promise => { - return ( -
-
-

- Blog -

-

- {description} -

-
- }> - - -
- ) -} - -export default BlogPage diff --git a/app/error.tsx b/app/error.tsx deleted file mode 100644 index ae26055..0000000 --- a/app/error.tsx +++ /dev/null @@ -1,32 +0,0 @@ -"use client" - -import { useEffect } from "react" - -export interface ErrorHandlingProps { - error: Error -} - -const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => { - const { error } = props - - useEffect(() => { - console.error(error) - }, [error]) - - return ( -
-

- Error{" "} - - 500 - -

-

Server error

-
- ) -} - -export default ErrorHandling diff --git a/app/globals.css b/app/globals.css deleted file mode 100644 index 9ea82ac..0000000 --- a/app/globals.css +++ /dev/null @@ -1,80 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -.break-wrap-words { - word-wrap: break-word; - word-break: break-word; -} - -.text-base { - line-height: 1.75rem; -} - -.prose { - @apply !max-w-5xl scroll-smooth text-gray dark:text-gray-300; -} - -.prose p { - @apply text-justify; -} - -.prose [id]::before { - content: ""; - display: block; - height: 90px; - margin-top: -90px; - visibility: hidden; -} - -.prose a, -.prose strong { - @apply !font-semibold text-primary dark:text-primary-dark; -} - -strong, -b { - @apply font-bold; -} - -.prose h2, -.prose h3, -.prose h4, -.prose h5, -.prose h6 { - @apply mt-1 text-gray dark:text-gray-dark; -} - -.prose code { - color: #ce9178; -} -.prose :where(code):not(:where([class~="not-prose"] *))::before, -.prose :where(code):not(:where([class~="not-prose"] *))::after { - content: ""; -} -.shiki { - white-space: pre-wrap !important; -} -code { - counter-reset: step; - counter-increment: step 0; -} -code .line::before { - content: counter(step); - counter-increment: step; - margin-right: 1rem; - text-align: right; - color: rgba(133, 133, 133, 0.8); - word-wrap: normal; - word-break: normal; -} - -code .line:last-child { - display: none; -} - -.katex .base { - display: inline !important; - white-space: normal !important; - width: 100% !important; -} diff --git a/app/layout.tsx b/app/layout.tsx deleted file mode 100644 index 22876f6..0000000 --- a/app/layout.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import type { Metadata } from "next" -import classNames from "clsx" - -import "@fontsource/montserrat/400.css" -import "@fontsource/montserrat/600.css" -import "./globals.css" - -import { Header } from "@/components/Header" -import { Footer } from "@/components/Footer" -import { getI18n } from "@/i18n/i18n.server" -import { getTheme } from "@/theme/theme.server" - -const title = "Théo LUDWIG" -const description = - "Théo LUDWIG - Developer Full Stack • Open-Source Enthusiast" -const image = "/images/logo.png" -const url = new URL("https://theoludwig.fr") -const locale = "fr-FR, en-US" - -export const metadata: Metadata = { - title, - description, - metadataBase: url, - openGraph: { - title, - description, - url, - siteName: title, - images: [ - { - url: image, - width: 96, - height: 96, - }, - ], - locale, - type: "website", - }, - twitter: { - card: "summary", - title, - description, - images: [image], - }, -} - -interface RootLayoutProps { - children: React.ReactNode -} - -const RootLayout = (props: RootLayoutProps): JSX.Element => { - const { children } = props - - const i18n = getI18n() - const theme = getTheme() - - return ( - - -
- {children} -