Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
92eca82127
|
|||
4502e32250
|
|||
d6f2d9e3a6
|
|||
eeb5e8872f
|
|||
7d22880905
|
|||
49896bbaeb
|
|||
b3140dd977
|
|||
39ef3e80ce
|
|||
64a5ca73ad
|
|||
b16699f5aa
|
|||
e044b4caea
|
|||
d795025860
|
|||
a43bfb4a0d
|
|||
69af1bccc3
|
|||
cec70161f7
|
|||
f70a66e251
|
|||
38eb296088
|
|||
43d91bfc28
|
|||
b63cc3a66e
|
|||
|
270920111a
|
||
d91feb8de4
|
|||
e68cb08a6f
|
|||
|
09d677bd37
|
||
db1159f20c
|
|||
|
af5c845e4b
|
||
3f66dfe46e
|
|||
d52a0c6f08
|
|||
|
251b0b4038
|
||
a5baffe9eb
|
|||
1351e4122d
|
|||
4c69d5a852
|
|||
9e840b8dae
|
|||
59153a7a69
|
|||
0a7094005c
|
|||
12f1d6cdf2
|
|||
0d7b33727b
|
|||
386f407f21
|
@@ -9,3 +9,6 @@ end_of_line = lf
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
indent_size = 4
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
|
TZ=Europe/Paris
|
||||||
WEBSITE_PORT=3000
|
WEBSITE_PORT=3000
|
||||||
|
20
.github/ISSUE_TEMPLATE/BUG.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🐛 Bug Report"
|
|
||||||
about: "Report an unexpected problem or unintended behavior."
|
|
||||||
title: "[Bug]"
|
|
||||||
labels: "bug"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please provide a clear and concise description of what the bug is. Include
|
|
||||||
screenshots if needed. Please make sure your issue has not already been fixed.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Steps To Reproduce
|
|
||||||
|
|
||||||
1. Step 1
|
|
||||||
2. Step 2
|
|
||||||
|
|
||||||
## The current behavior
|
|
||||||
|
|
||||||
## The expected behavior
|
|
18
.github/ISSUE_TEMPLATE/DOCUMENTATION.md
vendored
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
name: "📜 Documentation"
|
|
||||||
about: "Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...)."
|
|
||||||
title: "[Documentation]"
|
|
||||||
labels: "documentation"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Please make sure your issue has not already been fixed. -->
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
<!-- Please uncomment the type of documentation problem this issue address -->
|
|
||||||
|
|
||||||
<!-- Documentation is Missing -->
|
|
||||||
<!-- Documentation is Confusing -->
|
|
||||||
<!-- Documentation has Typo errors -->
|
|
||||||
|
|
||||||
## Proposal
|
|
20
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: "✨ Feature Request"
|
|
||||||
about: "Suggest a new feature idea."
|
|
||||||
title: "[Feature]"
|
|
||||||
labels: "feature request"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Please make sure your issue has not already been fixed. -->
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
<!-- A clear and concise description of the problem or missing capability... -->
|
|
||||||
|
|
||||||
## Describe the solution you'd like
|
|
||||||
|
|
||||||
<!-- If you have a solution in mind, please describe it. -->
|
|
||||||
|
|
||||||
## Describe alternatives you've considered
|
|
||||||
|
|
||||||
<!-- Have you considered any alternative solutions or workarounds? -->
|
|
20
.github/ISSUE_TEMPLATE/IMPROVEMENT.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🔧 Improvement"
|
|
||||||
about: "Improve structure/format/performance/refactor/tests of the code."
|
|
||||||
title: "[Improvement]"
|
|
||||||
labels: "improvement"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Please make sure your issue has not already been fixed. -->
|
|
||||||
|
|
||||||
## Type of Improvement
|
|
||||||
|
|
||||||
<!-- Please uncomment the type of improvements this issue address -->
|
|
||||||
|
|
||||||
<!-- Files and Folders Structure -->
|
|
||||||
<!-- Performance -->
|
|
||||||
<!-- Refactoring code -->
|
|
||||||
<!-- Tests -->
|
|
||||||
<!-- Not Sure? -->
|
|
||||||
|
|
||||||
## Proposal
|
|
8
.github/ISSUE_TEMPLATE/QUESTION.md
vendored
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🙋 Question"
|
|
||||||
about: "Further information is requested."
|
|
||||||
title: "[Question]"
|
|
||||||
labels: "question"
|
|
||||||
---
|
|
||||||
|
|
||||||
### Question
|
|
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +0,0 @@
|
|||||||
<!-- Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time. -->
|
|
||||||
|
|
||||||
# What changes this PR introduce?
|
|
||||||
|
|
||||||
## List any relevant issue numbers
|
|
||||||
|
|
||||||
## Is there anything you'd like reviewers to focus on?
|
|
15
.github/workflows/chromatic.yml
vendored
@@ -10,17 +10,24 @@ jobs:
|
|||||||
chromatic:
|
chromatic:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
env:
|
||||||
|
CI: "1"
|
||||||
|
TZ: "Europe/Paris"
|
||||||
|
DO_NOT_TRACK: "1"
|
||||||
|
TURBO_TELEMETRY_DISABLED: "1"
|
||||||
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
|
STORYBOOK_DISABLE_TELEMETRY: "1"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.1.7"
|
- uses: "actions/checkout@v5.0.0"
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: "pnpm/action-setup@v4.0.0"
|
- uses: "pnpm/action-setup@v4.1.0"
|
||||||
|
|
||||||
- name: "Setup Node.js"
|
- name: "Setup Node.js"
|
||||||
uses: "actions/setup-node@v4.0.3"
|
uses: "actions/setup-node@v4.4.0"
|
||||||
with:
|
with:
|
||||||
node-version: "22.x"
|
node-version: "24.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
|
26
.github/workflows/ci.yml
vendored
@@ -10,15 +10,22 @@ jobs:
|
|||||||
ci:
|
ci:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
env:
|
||||||
|
CI: "1"
|
||||||
|
TZ: "Europe/Paris"
|
||||||
|
DO_NOT_TRACK: "1"
|
||||||
|
TURBO_TELEMETRY_DISABLED: "1"
|
||||||
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
|
STORYBOOK_DISABLE_TELEMETRY: "1"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.1.7"
|
- uses: "actions/checkout@v5.0.0"
|
||||||
|
|
||||||
- uses: "pnpm/action-setup@v4.0.0"
|
- uses: "pnpm/action-setup@v4.1.0"
|
||||||
|
|
||||||
- name: "Setup Node.js"
|
- name: "Setup Node.js"
|
||||||
uses: "actions/setup-node@v4.0.3"
|
uses: "actions/setup-node@v4.4.0"
|
||||||
with:
|
with:
|
||||||
node-version: "22.x"
|
node-version: "24.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
@@ -29,15 +36,8 @@ jobs:
|
|||||||
|
|
||||||
- run: "node --run lint:editorconfig"
|
- run: "node --run lint:editorconfig"
|
||||||
- run: "node --run lint:markdown"
|
- run: "node --run lint:markdown"
|
||||||
- run: "node --run lint:prettier"
|
|
||||||
- run: "node --run lint:eslint"
|
|
||||||
- run: "node --run lint:typescript"
|
- run: "node --run lint:typescript"
|
||||||
|
- run: "node --run lint:eslint"
|
||||||
|
- run: "node --run lint:prettier"
|
||||||
- run: "node --run test"
|
- run: "node --run test"
|
||||||
- run: "node --run build"
|
- run: "node --run build"
|
||||||
|
|
||||||
commitlint:
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- uses: "actions/checkout@v4.1.7"
|
|
||||||
|
|
||||||
- uses: "wagoid/commitlint-github-action@v6.0.1"
|
|
||||||
|
45
.github/workflows/release.yml
vendored
@@ -1,45 +0,0 @@
|
|||||||
name: "Release"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
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.7"
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: "Import GPG key"
|
|
||||||
uses: "crazy-max/ghaction-import-gpg@v6.0.0"
|
|
||||||
with:
|
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
||||||
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.3"
|
|
||||||
with:
|
|
||||||
node-version: "22.x"
|
|
||||||
cache: "pnpm"
|
|
||||||
|
|
||||||
- name: "Install dependencies"
|
|
||||||
run: "pnpm install --frozen-lockfile"
|
|
||||||
|
|
||||||
- name: "Release"
|
|
||||||
run: "node --run release"
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }}
|
|
||||||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}
|
|
11
.gitignore
vendored
@@ -1,8 +1,10 @@
|
|||||||
# dependencies
|
# dependencies
|
||||||
node_modules
|
node_modules
|
||||||
.npm
|
.npm
|
||||||
|
.cache
|
||||||
package-lock.json
|
package-lock.json
|
||||||
.pnpm-store
|
.pnpm-store
|
||||||
|
.apt
|
||||||
.pnp
|
.pnp
|
||||||
.pnp.js
|
.pnp.js
|
||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
@@ -15,12 +17,16 @@ coverage
|
|||||||
out/
|
out/
|
||||||
dist/
|
dist/
|
||||||
build/
|
build/
|
||||||
|
.swc/
|
||||||
|
.react-email/
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
|
*.bak
|
||||||
.turbo
|
.turbo
|
||||||
bin/
|
bin/
|
||||||
|
dump_*
|
||||||
|
|
||||||
# debug
|
# debug
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
@@ -30,6 +36,7 @@ yarn-error.log*
|
|||||||
# Storybook
|
# Storybook
|
||||||
*storybook.log
|
*storybook.log
|
||||||
storybook-static
|
storybook-static
|
||||||
|
/public
|
||||||
|
|
||||||
# IDEs and editors
|
# IDEs and editors
|
||||||
.idea
|
.idea
|
||||||
@@ -42,6 +49,7 @@ storybook-static
|
|||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env
|
.env
|
||||||
|
.env.dev
|
||||||
.env.production
|
.env.production
|
||||||
.env*.local
|
.env*.local
|
||||||
|
|
||||||
@@ -50,4 +58,5 @@ storybook-static
|
|||||||
|
|
||||||
# typescript
|
# typescript
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
# next-env.d.ts
|
next-env.d.ts
|
||||||
|
packages/i18n/src/translations/*.d.json.ts
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"config": {
|
|
||||||
"extends": "markdownlint/style/prettier",
|
|
||||||
"default": true,
|
|
||||||
"relative-links": true,
|
|
||||||
"no-duplicate-heading": false,
|
|
||||||
"no-inline-html": false,
|
|
||||||
},
|
|
||||||
"globs": ["**/*.md"],
|
|
||||||
"ignores": ["**/node_modules"],
|
|
||||||
"customRules": ["markdownlint-rule-relative-links"],
|
|
||||||
}
|
|
16
.markdownlint-cli2.mjs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import relativeLinksRule from "markdownlint-rule-relative-links"
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
config: {
|
||||||
|
extends: "markdownlint/style/prettier",
|
||||||
|
default: true,
|
||||||
|
"relative-links": true,
|
||||||
|
"no-duplicate-heading": false,
|
||||||
|
"no-inline-html": false,
|
||||||
|
},
|
||||||
|
globs: ["**/*.md"],
|
||||||
|
ignores: ["**/node_modules"],
|
||||||
|
customRules: [relativeLinksRule],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"branches": ["main", { "name": "staging", "prerelease": true }],
|
|
||||||
"plugins": [
|
|
||||||
"@semantic-release/commit-analyzer",
|
|
||||||
"@semantic-release/release-notes-generator",
|
|
||||||
[
|
|
||||||
"@semantic-release/exec",
|
|
||||||
{
|
|
||||||
"prepareCmd": "replace-in-files --regex='version\": *\"[^\"]*' --replacement='\"version\": \"${nextRelease.version}\"' '**/package.json' '!**/node_modules/**'"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@semantic-release/git",
|
|
||||||
{
|
|
||||||
"assets": [
|
|
||||||
"package.json",
|
|
||||||
"apps/*/package.json",
|
|
||||||
"packages/*/package.json"
|
|
||||||
],
|
|
||||||
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@semantic-release/github",
|
|
||||||
[
|
|
||||||
"@saithodev/semantic-release-backmerge",
|
|
||||||
{
|
|
||||||
"branches": [
|
|
||||||
{ "from": "main", "to": "develop" },
|
|
||||||
{ "from": "staging", "to": "develop" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
7
.vscode/extensions.json
vendored
@@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"Vercel.turbo-vsc",
|
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"bradlc.vscode-tailwindcss",
|
|
||||||
"mikestead.dotenv",
|
|
||||||
"davidanson.vscode-markdownlint",
|
"davidanson.vscode-markdownlint",
|
||||||
"ms-azuretools.vscode-docker"
|
"bradlc.vscode-tailwindcss",
|
||||||
|
"antfu.pnpm-catalog-lens",
|
||||||
|
"Lokalise.i18n-ally"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
4
.vscode/react.code-snippets
vendored
@@ -20,9 +20,9 @@
|
|||||||
"scope": "typescriptreact",
|
"scope": "typescriptreact",
|
||||||
"prefix": "rfcs",
|
"prefix": "rfcs",
|
||||||
"body": [
|
"body": [
|
||||||
"import type { Meta, StoryObj } from \"@storybook/react\"",
|
"import type { Meta, StoryObj } from \"@storybook/nextjs\"",
|
||||||
"",
|
"",
|
||||||
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}\"",
|
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}.tsx\"",
|
||||||
"",
|
"",
|
||||||
"const meta = {",
|
"const meta = {",
|
||||||
" title: \"${1:ComponentName}\",",
|
" title: \"${1:ComponentName}\",",
|
||||||
|
28
.vscode/settings.json
vendored
@@ -7,14 +7,26 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.organizeImports": "explicit"
|
"source.organizeImports": "never"
|
||||||
},
|
},
|
||||||
"eslint.options": {
|
"eslint.workingDirectories": [
|
||||||
"ignorePath": ".gitignore"
|
{
|
||||||
|
"mode": "auto"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files.associations": {
|
||||||
|
"*.css": "tailwindcss"
|
||||||
},
|
},
|
||||||
"prettier.ignorePath": ".gitignore",
|
"editor.quickSuggestions": {
|
||||||
"tailwindCSS.experimental.classRegex": [
|
"strings": "on"
|
||||||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
},
|
||||||
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
"tailwindCSS.classFunctions": ["classNames", "cva"],
|
||||||
]
|
"tailwindCSS.experimental.configFile": "./configs/config-tailwind/styles.css",
|
||||||
|
"i18n-ally.localesPaths": ["./packages/i18n/src/translations/"],
|
||||||
|
"i18n-ally.keystyle": "nested",
|
||||||
|
"i18n-ally.sortKeys": false,
|
||||||
|
"i18n-ally.sourceLanguage": "en-US",
|
||||||
|
"i18n-ally.displayLanguage": "en-US",
|
||||||
|
"i18n-ally.enabledFrameworks": ["next-intl", "general"],
|
||||||
|
"i18n-ally.extract.autoDetect": true
|
||||||
}
|
}
|
||||||
|
@@ -1,132 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, religion, or sexual identity
|
|
||||||
and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
|
||||||
community include:
|
|
||||||
|
|
||||||
- Demonstrating empathy and kindness toward other people
|
|
||||||
- Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
- Giving and gracefully accepting constructive feedback
|
|
||||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
- Focusing on what is best not just for us as individuals, but for the
|
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
|
||||||
|
|
||||||
- The use of sexualized language or imagery, and sexual attention or
|
|
||||||
advances of any kind
|
|
||||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
- Public or private harassment
|
|
||||||
- Publishing others' private information, such as a physical or email
|
|
||||||
address, without their explicit permission
|
|
||||||
- Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement at
|
|
||||||
<contact@theoludwig.fr>.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series
|
|
||||||
of actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or
|
|
||||||
permanent ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within
|
|
||||||
the community.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
||||||
version 2.0, available at
|
|
||||||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by
|
|
||||||
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
[https://www.contributor-covenant.org/faq][faq]. Translations are available
|
|
||||||
at [https://www.contributor-covenant.org/translations][translations].
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
|
||||||
[mozilla coc]: https://github.com/mozilla/diversity
|
|
||||||
[faq]: https://www.contributor-covenant.org/faq
|
|
||||||
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -1,10 +1,6 @@
|
|||||||
# 💡 Contributing
|
# Contributing
|
||||||
|
|
||||||
Thanks a lot for your interest in contributing to **theoludwig.fr**! 🎉
|
Thanks a lot for your interest in contributing to **theoludwig.fr**!
|
||||||
|
|
||||||
## Code of Conduct
|
|
||||||
|
|
||||||
**theoludwig.fr** adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct, and we expect project participants to adhere to it. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
|
|
||||||
|
|
||||||
## Types of contributions
|
## Types of contributions
|
||||||
|
|
||||||
@@ -31,8 +27,9 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/) >= 22.0.0
|
- [Node.js](https://nodejs.org/) >= v24.0.0 [(`nvm install 24`)](https://nvm.sh)
|
||||||
- [pnpm](https://pnpm.io/) >= 9.5.0
|
- [pnpm](https://pnpm.io/) v10.15.1 [(`npm install --global corepack@0.34.0 && corepack enable`)](https://github.com/nodejs/corepack)
|
||||||
|
- [Docker](https://www.docker.com/)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
@@ -40,6 +37,9 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv
|
|||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone git@github.com:theoludwig/theoludwig.git
|
git clone git@github.com:theoludwig/theoludwig.git
|
||||||
|
|
||||||
|
# Go to the project root
|
||||||
|
cd theoludwig
|
||||||
|
|
||||||
# Configure environment variables
|
# Configure environment variables
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
cp apps/website/.env.example apps/website/.env
|
cp apps/website/.env.example apps/website/.env
|
||||||
@@ -60,24 +60,28 @@ node --run dev
|
|||||||
# Lint
|
# Lint
|
||||||
node --run lint:editorconfig
|
node --run lint:editorconfig
|
||||||
node --run lint:markdown
|
node --run lint:markdown
|
||||||
node --run lint:prettier
|
|
||||||
node --run lint:eslint
|
|
||||||
node --run lint:typescript
|
node --run lint:typescript
|
||||||
|
node --run lint:eslint
|
||||||
|
node --run lint:prettier
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
node --run test
|
node --run test
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
node --run build
|
node --run build
|
||||||
|
|
||||||
|
# To execute a command in a specific package (e.g: packages/utils)
|
||||||
|
cd packages/utils
|
||||||
|
node --run test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Production environment with [Docker](https://www.docker.com/)
|
### Production environment with [Docker](https://www.docker.com/)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Setup and run all the services for you
|
# Setup and run all the services for you
|
||||||
docker compose up --build
|
VERSION=$(git describe --tags) docker compose up --build --detach
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Services started
|
#### Services started
|
||||||
|
|
||||||
`theoludwig`: <http://127.0.0.1:3000>
|
`theoludwig`: <http://localhost:3000>
|
||||||
|
21
LICENSE
@@ -1,21 +0,0 @@
|
|||||||
# MIT License
|
|
||||||
|
|
||||||
Copyright (c) Théo LUDWIG <contact@theoludwig.fr>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
66
README.md
@@ -1,45 +1,63 @@
|
|||||||
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
|
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>Developer Full Stack • Open-Source Enthusiast</strong>
|
<strong>Developer Full Stack • Open-Source Enthusiast</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/theoludwig"><img alt="GitHub" src="https://img.shields.io/badge/-GitHub-5A5A5A?style=flat&labelColor=5A5A5A&logo=github&logoColor=white"/></a>
|
<a href="https://github.com/theoludwig"><img alt="GitHub" src="https://img.shields.io/badge/-GitHub-5A5A5A?style=flat&labelColor=5A5A5A&logo=github&logoColor=white"/></a>
|
||||||
<a href="https://gitlab.com/theoludwig"><img alt="GitLab" src="https://img.shields.io/badge/-GitLab-303030?style=flat&labelColor=303030&logo=gitlab&logoColor=white"/></a>
|
<a href="https://gitlab.com/theoludwig"><img alt="GitLab" src="https://img.shields.io/badge/-GitLab-303030?style=flat&labelColor=303030&logo=gitlab&logoColor=white"/></a>
|
||||||
<a href="https://www.npmjs.com/~theoludwig"><img alt="npm" src="https://img.shields.io/badge/-npm-c4302b?style=flat&labelColor=c4302b&logo=npm&logoColor=white"/></a>
|
<a href="https://www.npmjs.com/~theoludwig"><img alt="npm" src="https://img.shields.io/badge/-npm-c4302b?style=flat&labelColor=c4302b&logo=npm&logoColor=white"/></a>
|
||||||
<a href="https://twitter.com/theoludwig_"><img alt="Twitter" src="https://img.shields.io/badge/-Twitter-1ca0f1?style=flat&labelColor=1ca0f1&logo=x&logoColor=white"/></a>
|
<a href="https://twitter.com/theoludwig_"><img alt="X/Twitter" src="https://img.shields.io/badge/-Twitter-1ca0f1?style=flat&labelColor=1ca0f1&logo=x&logoColor=white"/></a>
|
||||||
<a href="https://www.youtube.com/@theo_ludwig"><img alt="YouTube" src="https://img.shields.io/badge/-YouTube-c4302b?style=flat&labelColor=c4302b&logo=youtube&logoColor=white"/></a>
|
<a href="https://www.youtube.com/@theo_ludwig"><img alt="YouTube" src="https://img.shields.io/badge/-YouTube-c4302b?style=flat&labelColor=c4302b&logo=youtube&logoColor=white"/></a>
|
||||||
<a href="https://www.twitch.tv/theoludwig"><img alt="Twitch" src="https://img.shields.io/badge/-Twitch-9147FF?style=flat&labelColor=9147FF&logo=twitch&logoColor=white"/></a>
|
<a href="https://www.twitch.tv/theoludwig"><img alt="Twitch" src="https://img.shields.io/badge/-Twitch-9147FF?style=flat&labelColor=9147FF&logo=twitch&logoColor=white"/></a>
|
||||||
<a href="https://theoludwig.fr/"><img alt="Website" src="https://img.shields.io/badge/-Website-181818?style=flat&labelColor=181818&logo=Google-Chrome&logoColor=white"/></a>
|
<a href="https://theoludwig.fr/"><img alt="Website" src="https://img.shields.io/badge/-Website-181818?style=flat&labelColor=181818&logo=Google-Chrome&logoColor=white"/></a>
|
||||||
<a href="mailto:contact@theoludwig.fr"><img alt="Email" src="https://img.shields.io/badge/-contact@theoludwig.fr-2F7EBE?style=flat&labelColor=2F7EBE&logo=minutemailer&logoColor=white"/></a>
|
<a href="mailto:contact@theoludwig.fr"><img alt="Email" src="https://img.shields.io/badge/-contact@theoludwig.fr-2F7EBE?style=flat&labelColor=2F7EBE&logo=minutemailer&logoColor=white"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
## 📜 About
|
## About
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "Théo LUDWIG",
|
"name": "Théo LUDWIG",
|
||||||
"pronouns": "He/Him",
|
"pronouns": "He/Him",
|
||||||
"birthDate": "2003-03-31",
|
"birthDate": "2003-03-31",
|
||||||
"nationality": "Alsace, France",
|
"nationality": "Alsace, France",
|
||||||
"interests": ["Developer Full Stack", "Open-Source Enthusiast"],
|
"interests": ["Developer Full Stack", "Open-Source Enthusiast"],
|
||||||
"skills": {
|
"skills": {
|
||||||
"programmingLanguages": ["JavaScript/TypeScript", "Python", "C/C++", "PHP"],
|
"software-development": [
|
||||||
"frontend": ["HTML/CSS", "Tailwind CSS", "React.js/Next.js"],
|
"TypeScript",
|
||||||
"backend": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
"React.js (+ Next.js)",
|
||||||
"tools": ["GNU/Linux", "Arch Linux", "Visual Studio Code", "Git", "Docker"]
|
"Tailwind CSS",
|
||||||
}
|
"Node.js",
|
||||||
|
"tRPC/oRPC",
|
||||||
|
"PostgreSQL"
|
||||||
|
],
|
||||||
|
"sys-admin": [
|
||||||
|
"Docker",
|
||||||
|
"Proxmox",
|
||||||
|
"Caddy",
|
||||||
|
"GitHub Actions",
|
||||||
|
"GitLab CI/CD"
|
||||||
|
],
|
||||||
|
"software-tools": [
|
||||||
|
"GNU/Linux",
|
||||||
|
"Arch Linux",
|
||||||
|
"Visual Studio Code",
|
||||||
|
"Git"
|
||||||
|
],
|
||||||
|
"systems-programming": ["C/C++", "Rust", "Go"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
## 📈 Statistics
|
## Statistics
|
||||||
|
|
||||||
<p align=center>
|
<p align=center>
|
||||||
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=theoludwig&show_icons=true&theme=dark" alt="Théo LUDWIG's GitHub Stats" />
|
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=theoludwig&show_icons=true&theme=dark" alt="Théo LUDWIG's GitHub Stats" />
|
||||||
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=theoludwig&hide=html,css,javascript&langs_count=8&layout=compact&theme=dark" alt="Théo LUDWIG's Programming Languages" />
|
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=theoludwig&hide=html,css,javascript&langs_count=8&layout=compact&theme=dark" alt="Théo LUDWIG's Programming Languages" />
|
||||||
</p>
|
</p>
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"extends": ["@repo/eslint-config"]
|
|
||||||
}
|
|
5
apps/storybook/.postcssrc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@@ -7,15 +7,15 @@ const config: StorybookConfig = {
|
|||||||
docs: {
|
docs: {
|
||||||
defaultName: "Documentation",
|
defaultName: "Documentation",
|
||||||
},
|
},
|
||||||
stories: ["../../../packages/**/*.stories.tsx", "../stories/*.mdx"],
|
stories: [
|
||||||
|
"../../../packages/ui/src/**/*.stories.tsx",
|
||||||
|
"../../../packages/blog/src/**/*.stories.tsx",
|
||||||
|
"../stories/*.mdx",
|
||||||
|
],
|
||||||
addons: [
|
addons: [
|
||||||
"@storybook/addon-essentials",
|
|
||||||
"@storybook/addon-storysource",
|
|
||||||
"@storybook/addon-a11y",
|
|
||||||
"@storybook/addon-links",
|
|
||||||
"@chromatic-com/storybook",
|
"@chromatic-com/storybook",
|
||||||
"@storybook/addon-interactions",
|
"@storybook/addon-docs",
|
||||||
"storybook-dark-mode",
|
"@storybook/addon-a11y",
|
||||||
],
|
],
|
||||||
framework: {
|
framework: {
|
||||||
name: "@storybook/nextjs",
|
name: "@storybook/nextjs",
|
||||||
|
@@ -1,13 +1,24 @@
|
|||||||
import "@repo/config-tailwind/styles.css"
|
import "@repo/config-tailwind/styles.css"
|
||||||
import { defaultTranslationValues, Locale } from "@repo/i18n/config"
|
import "./storybook-css-overrides.css"
|
||||||
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
|
import i18nMessages from "@repo/i18n/translations/en-US.json"
|
||||||
import type { Preview } from "@storybook/react"
|
import { LOCALE_DEFAULT, TIMEZONE } from "@repo/utils/constants"
|
||||||
|
import type { Preview } from "@storybook/nextjs"
|
||||||
import { NextIntlClientProvider } from "next-intl"
|
import { NextIntlClientProvider } from "next-intl"
|
||||||
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
||||||
import React from "react"
|
|
||||||
|
|
||||||
const preview: Preview = {
|
const preview: Preview = {
|
||||||
|
initialGlobals: {
|
||||||
|
a11y: {
|
||||||
|
manual: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
parameters: {
|
parameters: {
|
||||||
|
a11y: {
|
||||||
|
test: "error",
|
||||||
|
},
|
||||||
|
docs: {
|
||||||
|
codePanel: true,
|
||||||
|
},
|
||||||
nextjs: {
|
nextjs: {
|
||||||
appDirectory: true,
|
appDirectory: true,
|
||||||
},
|
},
|
||||||
@@ -24,22 +35,21 @@ const preview: Preview = {
|
|||||||
stylePreview: true,
|
stylePreview: true,
|
||||||
},
|
},
|
||||||
controls: {
|
controls: {
|
||||||
|
disableSaveFromUI: true,
|
||||||
matchers: {
|
matchers: {
|
||||||
color: /(background|color)$/i,
|
color: /(background|color)$/i,
|
||||||
date: /Date$/i,
|
date: /date$/i,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
decorators: [
|
decorators: [
|
||||||
(Story) => {
|
(Story) => {
|
||||||
const locale = "en-US" satisfies Locale
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NextThemeProvider enableColorScheme={false}>
|
<NextThemeProvider enableColorScheme={false}>
|
||||||
<NextIntlClientProvider
|
<NextIntlClientProvider
|
||||||
messages={i18nMessagesEnglish}
|
messages={i18nMessages}
|
||||||
locale={locale}
|
locale={LOCALE_DEFAULT}
|
||||||
defaultTranslationValues={defaultTranslationValues}
|
timeZone={TIMEZONE}
|
||||||
>
|
>
|
||||||
<Story />
|
<Story />
|
||||||
</NextIntlClientProvider>
|
</NextIntlClientProvider>
|
||||||
|
3
apps/storybook/.storybook/storybook-css-overrides.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
body {
|
||||||
|
overflow: auto !important;
|
||||||
|
}
|
@@ -1,35 +0,0 @@
|
|||||||
import type { TestRunnerConfig } from "@storybook/test-runner"
|
|
||||||
import { getStoryContext } from "@storybook/test-runner"
|
|
||||||
|
|
||||||
import { checkA11y, configureAxe, injectAxe } from "axe-playwright"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api
|
|
||||||
* to learn more about the test-runner hooks API.
|
|
||||||
*/
|
|
||||||
const config: TestRunnerConfig = {
|
|
||||||
async preVisit(page) {
|
|
||||||
await injectAxe(page)
|
|
||||||
},
|
|
||||||
async postVisit(page, context) {
|
|
||||||
const storyContext = await getStoryContext(page, context)
|
|
||||||
|
|
||||||
if (storyContext.parameters?.a11y?.disable) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
await configureAxe(page, {
|
|
||||||
rules: storyContext.parameters?.a11y?.config?.rules,
|
|
||||||
})
|
|
||||||
|
|
||||||
await checkA11y(page, "#storybook-root", {
|
|
||||||
verbose: false,
|
|
||||||
detailedReport: true,
|
|
||||||
detailedReportOptions: {
|
|
||||||
html: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
13
apps/storybook/eslint.config.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import typescriptESLint from "typescript-eslint"
|
||||||
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
|
export default typescriptESLint.config(...config, {
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: typescriptESLint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
84
apps/storybook/http-server.ts
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import http from "node:http"
|
||||||
|
import fs from "node:fs"
|
||||||
|
import path from "node:path"
|
||||||
|
import util from "node:util"
|
||||||
|
import mime from "mime"
|
||||||
|
|
||||||
|
const MIMETYPE_DEFAULT = "application/octet-stream"
|
||||||
|
|
||||||
|
const args = util.parseArgs({
|
||||||
|
options: {
|
||||||
|
path: { type: "string", default: "public", required: true },
|
||||||
|
port: { type: "string", default: "3000", required: true },
|
||||||
|
host: { type: "string", default: "0.0.0.0" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const host = args.values.host
|
||||||
|
const basePath = args.values.path
|
||||||
|
|
||||||
|
const port = Number.parseInt(args.values.port, 10)
|
||||||
|
if (Number.isNaN(port)) {
|
||||||
|
console.error("Error: Invalid port number.")
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const serverURL = `http://${host}:${port}`
|
||||||
|
|
||||||
|
const server = http.createServer(async (request, response) => {
|
||||||
|
if (request.url == null) {
|
||||||
|
response.writeHead(400, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Bad Request")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const url = new URL(request.url, serverURL)
|
||||||
|
const urlPath = url.pathname
|
||||||
|
const filePath = path.join(process.cwd(), basePath, urlPath)
|
||||||
|
try {
|
||||||
|
const stat = await fs.promises.stat(filePath)
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
const indexFile = path.join(filePath, "index.html")
|
||||||
|
try {
|
||||||
|
const fileContent = await fs.promises.readFile(indexFile)
|
||||||
|
response.writeHead(200, { "Content-Type": "text/html" })
|
||||||
|
response.end(fileContent)
|
||||||
|
} catch {
|
||||||
|
response.writeHead(403, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: Directory listing not allowed.")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const mimeType = mime.getType(filePath) ?? MIMETYPE_DEFAULT
|
||||||
|
const fileContent = await fs.promises.readFile(filePath)
|
||||||
|
response.writeHead(200, { "Content-Type": mimeType })
|
||||||
|
response.end(fileContent)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
||||||
|
response.writeHead(404, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: File not found.")
|
||||||
|
} else {
|
||||||
|
response.writeHead(500, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: Internal Server Error.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const gracefulShutdown = (): void => {
|
||||||
|
server.close()
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
process.on("SIGTERM", gracefulShutdown)
|
||||||
|
process.on("SIGINT", gracefulShutdown)
|
||||||
|
|
||||||
|
server.listen(
|
||||||
|
{
|
||||||
|
host,
|
||||||
|
port,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
console.log(
|
||||||
|
`HTTP Server is listening at ${util.styleText("cyan", serverURL)}`,
|
||||||
|
)
|
||||||
|
console.log(`Serving files from: \`${basePath}\``)
|
||||||
|
},
|
||||||
|
)
|
@@ -1,55 +1,51 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/storybook",
|
"name": "@repo/storybook",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "storybook build",
|
"build": "storybook build",
|
||||||
"dev": "storybook dev --port 6006 --no-open",
|
"dev": "storybook dev --port 6006 --no-open",
|
||||||
"start": "http-server \"storybook-static\" --port 6006 --silent",
|
"start": "node http-server.ts --path=storybook-static --port=6006",
|
||||||
"test": "start-server-and-test \"dev\" http://127.0.0.1:6006 \"test:storybook\"",
|
"test": "start-server-and-test \"start\" http://localhost:6006 \"test:storybook\"",
|
||||||
"test:storybook": "test-storybook",
|
"test:dev": "start-server-and-test \"dev\" http://localhost:6006 \"test:storybook\"",
|
||||||
"test:storybook-coverage": "test-storybook --coverage",
|
"test:storybook": "test-storybook --testTimeout=60000 --maxWorkers=2",
|
||||||
"chromatic": "chromatic"
|
"chromatic": "chromatic"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@repo/config-tailwind": "workspace:*",
|
"@repo/config-tailwind": "workspace:*",
|
||||||
"@repo/i18n": "workspace:*",
|
"@repo/i18n": "workspace:*",
|
||||||
"@repo/ui": "workspace:*",
|
"@repo/ui": "workspace:*",
|
||||||
|
"@repo/utils": "workspace:*",
|
||||||
"@repo/blog": "workspace:*",
|
"@repo/blog": "workspace:*",
|
||||||
"next": "catalog:",
|
"next": "catalog:",
|
||||||
"next-intl": "catalog:",
|
"next-intl": "catalog:",
|
||||||
"next-themes": "catalog:",
|
"next-themes": "catalog:",
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"react-dom": "catalog:"
|
"react-dom": "catalog:",
|
||||||
|
"mime": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@chromatic-com/storybook": "catalog:",
|
"@chromatic-com/storybook": "catalog:",
|
||||||
"@playwright/test": "catalog:",
|
"@playwright/test": "catalog:",
|
||||||
|
"@storybook/addon-docs": "catalog:",
|
||||||
"@storybook/addon-a11y": "catalog:",
|
"@storybook/addon-a11y": "catalog:",
|
||||||
"@storybook/addon-essentials": "catalog:",
|
|
||||||
"@storybook/addon-interactions": "catalog:",
|
|
||||||
"@storybook/addon-links": "catalog:",
|
|
||||||
"@storybook/addon-storysource": "catalog:",
|
|
||||||
"@storybook/addon-themes": "catalog:",
|
"@storybook/addon-themes": "catalog:",
|
||||||
"@storybook/blocks": "catalog:",
|
|
||||||
"@storybook/nextjs": "catalog:",
|
"@storybook/nextjs": "catalog:",
|
||||||
"@storybook/react": "catalog:",
|
|
||||||
"@storybook/test": "catalog:",
|
|
||||||
"@storybook/test-runner": "catalog:",
|
"@storybook/test-runner": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"axe-playwright": "catalog:",
|
|
||||||
"chromatic": "catalog:",
|
"chromatic": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"http-server": "catalog:",
|
|
||||||
"start-server-and-test": "catalog:",
|
"start-server-and-test": "catalog:",
|
||||||
"storybook": "catalog:",
|
"storybook": "catalog:",
|
||||||
"storybook-dark-mode": "catalog:",
|
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@@ -1,4 +1,9 @@
|
|||||||
import { Meta, Title, ColorPalette, ColorItem } from "@storybook/blocks"
|
import {
|
||||||
|
Meta,
|
||||||
|
Title,
|
||||||
|
ColorPalette,
|
||||||
|
ColorItem,
|
||||||
|
} from "@storybook/addon-docs/blocks"
|
||||||
import tailwindConfig from "@repo/config-tailwind"
|
import tailwindConfig from "@repo/config-tailwind"
|
||||||
|
|
||||||
<Meta title="Design System/Colors" />
|
<Meta title="Design System/Colors" />
|
||||||
@@ -6,7 +11,7 @@ import tailwindConfig from "@repo/config-tailwind"
|
|||||||
<Title>Colors</Title>
|
<Title>Colors</Title>
|
||||||
|
|
||||||
<ColorPalette>
|
<ColorPalette>
|
||||||
{Object.entries(tailwindConfig.theme.colors).map(
|
{Object.entries(tailwindConfig.theme.extend.colors).map(
|
||||||
([colorName, colorValue]) => {
|
([colorName, colorValue]) => {
|
||||||
const colors = {}
|
const colors = {}
|
||||||
|
|
||||||
|
@@ -2,7 +2,6 @@ import sharedConfig from "@repo/config-tailwind"
|
|||||||
|
|
||||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
content: [".storybook/preview.tsx", "../../packages/**/*.tsx"],
|
|
||||||
presets: [sharedConfig],
|
presets: [sharedConfig],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
apps/storybook/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"extends": "@repo/config-typescript/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["DOM", "DOM.Iterable", "ESNext"]
|
||||||
|
},
|
||||||
|
"include": ["http-server.ts", "./.storybook/**/*.ts", "./.storybook/**/*.tsx"]
|
||||||
|
}
|
9
apps/storybook/turbo.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../../node_modules/turbo/schema.json",
|
||||||
|
"extends": ["//"],
|
||||||
|
"tasks": {
|
||||||
|
"test": {
|
||||||
|
"dependsOn": ["^test", "build"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,3 +1,4 @@
|
|||||||
|
TZ=Europe/Paris
|
||||||
HOSTNAME=0.0.0.0
|
HOSTNAME=0.0.0.0
|
||||||
PORT=3000
|
PORT=3000
|
||||||
NEXT_TELEMETRY_DISABLED=1
|
NEXT_TELEMETRY_DISABLED=1
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"extends": ["@repo/eslint-config/nextjs/.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["public/"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"plugins": ["@typescript-eslint"],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
5
apps/website/.postcssrc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,12 +1,15 @@
|
|||||||
FROM node:22.4.1-slim AS node-pnpm
|
FROM node:24.7.0-slim AS node-pnpm
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN npm install --global corepack@0.34.0 && corepack enable
|
||||||
|
ENV TURBO_TELEMETRY_DISABLED=1
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
ENV DO_NOT_TRACK=1
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
FROM node-pnpm AS builder
|
FROM node-pnpm AS builder
|
||||||
RUN pnpm install --global turbo@2.0.10
|
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
|
RUN pnpm install --global turbo@2.5.6
|
||||||
RUN turbo prune @repo/website --docker
|
RUN turbo prune @repo/website --docker
|
||||||
|
|
||||||
FROM node-pnpm AS installer
|
FROM node-pnpm AS installer
|
||||||
@@ -18,17 +21,20 @@ COPY --from=builder /usr/src/app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
|||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||||
COPY --from=builder /usr/src/app/out/full/ ./
|
COPY --from=builder /usr/src/app/out/full/ ./
|
||||||
COPY turbo.json turbo.json
|
COPY turbo.json turbo.json
|
||||||
|
|
||||||
|
ARG VERSION="0.0.0-develop"
|
||||||
|
RUN pnpm install --global replace-in-files-cli@3.0.0
|
||||||
|
RUN VERSION_STRIPPED=${VERSION#v} && replace-in-files --regex='version": *"[^"]*' --replacement='"version": "'"$VERSION_STRIPPED"'"' '**/package.json' '!**/node_modules/**'
|
||||||
RUN pnpm --filter=@repo/website... exec turbo run build
|
RUN pnpm --filter=@repo/website... exec turbo run build
|
||||||
|
|
||||||
FROM node-pnpm AS runner
|
FROM node-pnpm AS runner
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV HOSTNAME=0.0.0.0
|
ENV HOSTNAME=0.0.0.0
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
|
||||||
ENV IS_STANDALONE=true
|
ENV IS_STANDALONE=true
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 applicationrunner
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 applicationrunner
|
||||||
USER applicationrunner
|
USER applicationrunner
|
||||||
COPY --from=installer /usr/src/app/apps/website/next.config.js ./
|
COPY --from=installer /usr/src/app/apps/website/next.config.ts ./
|
||||||
COPY --from=installer /usr/src/app/apps/website/package.json ./
|
COPY --from=installer /usr/src/app/apps/website/package.json ./
|
||||||
COPY --from=installer --chown=applicationrunner:nodejs /usr/src/app/apps/website/.next/standalone ./
|
COPY --from=installer --chown=applicationrunner:nodejs /usr/src/app/apps/website/.next/standalone ./
|
||||||
COPY --from=installer --chown=applicationrunner:nodejs /usr/src/app/apps/website/.next/static ./apps/website/.next/static
|
COPY --from=installer --chown=applicationrunner:nodejs /usr/src/app/apps/website/.next/static ./apps/website/.next/static
|
||||||
|
@@ -3,20 +3,21 @@ import { notFound } from "next/navigation"
|
|||||||
|
|
||||||
import { getBlogPostBySlug, getBlogPosts } from "@repo/blog"
|
import { getBlogPostBySlug, getBlogPosts } from "@repo/blog"
|
||||||
import { BlogPostUI } from "@repo/blog/BlogPostUI"
|
import { BlogPostUI } from "@repo/blog/BlogPostUI"
|
||||||
import type { Locale } from "@repo/i18n/config"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
interface BlogPostPageProps {
|
interface BlogPostPageProps {
|
||||||
params: {
|
params: Promise<{
|
||||||
slug: string
|
slug: string
|
||||||
locale: Locale
|
locale: Locale
|
||||||
}
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateMetadata = async (
|
export const generateMetadata = async (
|
||||||
props: BlogPostPageProps,
|
props: BlogPostPageProps,
|
||||||
): Promise<Metadata> => {
|
): Promise<Metadata> => {
|
||||||
const blogPost = await getBlogPostBySlug(props.params.slug)
|
const { slug } = await props.params
|
||||||
|
const blogPost = await getBlogPostBySlug(slug)
|
||||||
if (blogPost == null) {
|
if (blogPost == null) {
|
||||||
return notFound()
|
return notFound()
|
||||||
}
|
}
|
||||||
@@ -50,10 +51,11 @@ export const generateStaticParams = async (): Promise<
|
|||||||
const BlogPostPage: React.FC<BlogPostPageProps> = async (props) => {
|
const BlogPostPage: React.FC<BlogPostPageProps> = async (props) => {
|
||||||
const { params } = props
|
const { params } = props
|
||||||
|
|
||||||
|
const { locale, slug } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale)
|
||||||
|
|
||||||
const blogPost = await getBlogPostBySlug(params.slug)
|
const blogPost = await getBlogPostBySlug(slug)
|
||||||
if (blogPost == null) {
|
if (blogPost == null) {
|
||||||
return notFound()
|
return notFound()
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
import { getBlogPosts } from "@repo/blog"
|
import { getBlogPosts } from "@repo/blog"
|
||||||
import { BlogPosts } from "@repo/blog/BlogPosts"
|
import { BlogPosts } from "@repo/blog/BlogPosts"
|
||||||
import { LOCALE_DEFAULT, type LocaleProps } from "@repo/i18n/config"
|
import type { LocaleProps } from "@repo/i18n/routing"
|
||||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||||
import {
|
import {
|
||||||
Section,
|
Section,
|
||||||
SectionDescription,
|
SectionDescription,
|
||||||
SectionTitle,
|
SectionTitle,
|
||||||
} from "@repo/ui/Layout/Section"
|
} from "@repo/ui/Layout/Section"
|
||||||
|
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||||
import type { Metadata } from "next"
|
import type { Metadata } from "next"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
const title = "Blog | Théo LUDWIG"
|
const title = "Blog | Théo LUDWIG"
|
||||||
const description =
|
const description =
|
||||||
@@ -35,8 +36,9 @@ interface BlogPageProps extends LocaleProps {}
|
|||||||
const BlogPage: React.FC<BlogPageProps> = async (props) => {
|
const BlogPage: React.FC<BlogPageProps> = async (props) => {
|
||||||
const { params } = props
|
const { params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale)
|
||||||
|
|
||||||
const posts = await getBlogPosts()
|
const posts = await getBlogPosts()
|
||||||
|
|
||||||
|
@@ -1,18 +1,23 @@
|
|||||||
import "@repo/config-tailwind/styles.css"
|
import "@repo/config-tailwind/styles.css"
|
||||||
import type { LocaleProps } from "@repo/i18n/config"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
import { Footer } from "@repo/ui/Layout/Footer"
|
import { Footer } from "@repo/ui/Layout/Footer"
|
||||||
import { Header } from "@repo/ui/Layout/Header"
|
import { Header } from "@repo/ui/Layout/Header"
|
||||||
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
||||||
import { VERSION } from "@repo/utils/constants"
|
import { VERSION } from "@repo/utils/constants"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
interface MainLayoutProps extends React.PropsWithChildren, LocaleProps {}
|
interface MainLayoutProps extends React.PropsWithChildren {
|
||||||
|
params: Promise<{
|
||||||
|
locale: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
const MainLayout: React.FC<MainLayoutProps> = async (props) => {
|
const MainLayout: React.FC<MainLayoutProps> = async (props) => {
|
||||||
const { children, params } = props
|
const { children, params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale as Locale)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import type { LocaleProps } from "@repo/i18n/config"
|
import type { LocaleProps } from "@repo/i18n/routing"
|
||||||
import { About } from "@repo/ui/Home/About"
|
import { About } from "@repo/ui/Home/About"
|
||||||
import { Interests } from "@repo/ui/Home/Interests"
|
import { Interests } from "@repo/ui/Home/Interests"
|
||||||
import { OpenSource } from "@repo/ui/Home/OpenSource"
|
import { OpenSource } from "@repo/ui/Home/OpenSource"
|
||||||
@@ -6,35 +6,36 @@ import { Portfolio } from "@repo/ui/Home/Portfolio"
|
|||||||
import { Skills } from "@repo/ui/Home/Skills"
|
import { Skills } from "@repo/ui/Home/Skills"
|
||||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||||
import { RevealFade } from "@repo/ui/Layout/Section"
|
import { RevealFade } from "@repo/ui/Layout/Section"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
interface HomePageProps extends LocaleProps {}
|
interface HomePageProps extends LocaleProps {}
|
||||||
|
|
||||||
const HomePage: React.FC<HomePageProps> = (props) => {
|
const HomePage: React.FC<HomePageProps> = async (props) => {
|
||||||
const { params } = props
|
const { params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<About />
|
<About />
|
||||||
|
|
||||||
<RevealFade>
|
|
||||||
<Interests />
|
|
||||||
</RevealFade>
|
|
||||||
|
|
||||||
<RevealFade>
|
|
||||||
<Skills />
|
|
||||||
</RevealFade>
|
|
||||||
|
|
||||||
<RevealFade>
|
<RevealFade>
|
||||||
<Portfolio />
|
<Portfolio />
|
||||||
</RevealFade>
|
</RevealFade>
|
||||||
|
|
||||||
|
<RevealFade>
|
||||||
|
<Interests />
|
||||||
|
</RevealFade>
|
||||||
|
|
||||||
<RevealFade>
|
<RevealFade>
|
||||||
<OpenSource />
|
<OpenSource />
|
||||||
</RevealFade>
|
</RevealFade>
|
||||||
|
|
||||||
|
<RevealFade>
|
||||||
|
<Skills />
|
||||||
|
</RevealFade>
|
||||||
</MainLayout>
|
</MainLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -1,19 +1,22 @@
|
|||||||
import "@repo/config-tailwind/styles.css"
|
import "@repo/config-tailwind/styles.css"
|
||||||
import type { LocaleProps } from "@repo/i18n/config"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
interface CurriculumVitaeLayoutProps
|
interface CurriculumVitaeLayoutProps extends React.PropsWithChildren {
|
||||||
extends React.PropsWithChildren,
|
params: Promise<{
|
||||||
LocaleProps {}
|
locale: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = async (
|
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = async (
|
||||||
props,
|
props,
|
||||||
) => {
|
) => {
|
||||||
const { children, params } = props
|
const { children, params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale as Locale)
|
||||||
|
|
||||||
return <ThemeProvider forcedTheme="light">{children}</ThemeProvider>
|
return <ThemeProvider forcedTheme="light">{children}</ThemeProvider>
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,15 @@
|
|||||||
import type { LocaleProps } from "@repo/i18n/config"
|
import type { LocaleProps } from "@repo/i18n/routing"
|
||||||
import { CurriculumVitae } from "@repo/ui/CurriculumVitae"
|
import { CurriculumVitae } from "@repo/ui/CurriculumVitae"
|
||||||
import { unstable_setRequestLocale } from "next-intl/server"
|
import { setRequestLocale } from "next-intl/server"
|
||||||
|
|
||||||
interface CurriculumVitaeProps extends LocaleProps {}
|
interface CurriculumVitaeProps extends LocaleProps {}
|
||||||
|
|
||||||
const CurriculumVitaePage: React.FC<CurriculumVitaeProps> = (props) => {
|
const CurriculumVitaePage: React.FC<CurriculumVitaeProps> = async (props) => {
|
||||||
const { params } = props
|
const { params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale)
|
||||||
|
|
||||||
return <CurriculumVitae />
|
return <CurriculumVitae />
|
||||||
}
|
}
|
||||||
|
@@ -1,23 +1,35 @@
|
|||||||
import "@repo/config-tailwind/styles.css"
|
import "@repo/config-tailwind/styles.css"
|
||||||
import type { Locale, LocaleProps } from "@repo/i18n/config"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
import { LOCALES } from "@repo/i18n/config"
|
import { LOCALES } from "@repo/utils/constants"
|
||||||
import type { Metadata } from "next"
|
import type { Metadata, Viewport } from "next"
|
||||||
import { NextIntlClientProvider } from "next-intl"
|
import { NextIntlClientProvider } from "next-intl"
|
||||||
import {
|
import {
|
||||||
getMessages,
|
getMessages,
|
||||||
getTranslations,
|
getTranslations,
|
||||||
unstable_setRequestLocale,
|
setRequestLocale,
|
||||||
} from "next-intl/server"
|
} from "next-intl/server"
|
||||||
|
import Script from "next/script"
|
||||||
|
|
||||||
|
const DOMAIN = "theoludwig.fr"
|
||||||
|
|
||||||
|
export const viewport: Viewport = {
|
||||||
|
themeColor: "#00aeff",
|
||||||
|
}
|
||||||
|
|
||||||
export const generateMetadata = async ({
|
export const generateMetadata = async ({
|
||||||
params,
|
params,
|
||||||
}: LocaleProps): Promise<Metadata> => {
|
}: {
|
||||||
const t = await getTranslations({ locale: params.locale })
|
params: Promise<{
|
||||||
|
locale: string
|
||||||
|
}>
|
||||||
|
}): Promise<Metadata> => {
|
||||||
|
const { locale } = await params
|
||||||
|
const t = await getTranslations({ locale: locale as Locale })
|
||||||
const title = t("meta.title")
|
const title = t("meta.title")
|
||||||
const description = `${title} - ${t("meta.description")}`
|
const description = `${title} - ${t("meta.description")}`
|
||||||
const image = "/images/logo.webp"
|
const image = "/images/logo.webp"
|
||||||
const url = new URL("https://theoludwig.fr")
|
const url = new URL(`https://${DOMAIN}`)
|
||||||
const locale = LOCALES.join(", ")
|
const locales = LOCALES.join(", ")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
@@ -35,7 +47,7 @@ export const generateMetadata = async ({
|
|||||||
height: 96,
|
height: 96,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
locale,
|
locale: locales,
|
||||||
type: "website",
|
type: "website",
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
@@ -55,22 +67,33 @@ export const generateStaticParams = (): Array<{ locale: Locale }> => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LocaleLayoutProps extends React.PropsWithChildren, LocaleProps {}
|
interface LocaleLayoutProps extends React.PropsWithChildren {
|
||||||
|
params: Promise<{
|
||||||
|
locale: string
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
|
const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
|
||||||
const { children, params } = props
|
const { children, params } = props
|
||||||
|
|
||||||
|
const { locale } = await params
|
||||||
// Enable static rendering
|
// Enable static rendering
|
||||||
unstable_setRequestLocale(params.locale)
|
setRequestLocale(locale as Locale)
|
||||||
|
|
||||||
const messages = await getMessages()
|
const messages = await getMessages()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang={params.locale} suppressHydrationWarning>
|
<html lang={locale} suppressHydrationWarning>
|
||||||
<body>
|
<body>
|
||||||
<NextIntlClientProvider messages={messages}>
|
<NextIntlClientProvider messages={messages}>
|
||||||
{children}
|
{children}
|
||||||
</NextIntlClientProvider>
|
</NextIntlClientProvider>
|
||||||
|
|
||||||
|
<Script
|
||||||
|
defer
|
||||||
|
data-domain={DOMAIN}
|
||||||
|
src="https://plausible.theoludwig.fr/js/script.js"
|
||||||
|
/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
|
13
apps/website/eslint.config.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import typescriptESLint from "typescript-eslint"
|
||||||
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
|
export default typescriptESLint.config(...config, {
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: typescriptESLint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
@@ -1,3 +0,0 @@
|
|||||||
import i18nConfig from "@repo/i18n/i18n"
|
|
||||||
|
|
||||||
export default i18nConfig
|
|
3
apps/website/i18n/request.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import i18nRequestConfig from "@repo/i18n/request"
|
||||||
|
|
||||||
|
export default i18nRequestConfig
|
@@ -1,25 +1,26 @@
|
|||||||
import { LOCALES, LOCALE_DEFAULT, LOCALE_PREFIX } from "@repo/i18n/config"
|
import { routing } from "@repo/i18n/routing"
|
||||||
import createMiddleware from "next-intl/middleware"
|
import createIntlMiddleware from "next-intl/middleware"
|
||||||
|
|
||||||
export default createMiddleware({
|
const intlMiddleware = createIntlMiddleware(routing)
|
||||||
locales: LOCALES,
|
|
||||||
defaultLocale: LOCALE_DEFAULT,
|
export default intlMiddleware
|
||||||
localePrefix: LOCALE_PREFIX,
|
|
||||||
})
|
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: [
|
matcher: [
|
||||||
// Enable a redirect to a matching locale at the root
|
// Enable a redirect to a matching locale at the root
|
||||||
"/",
|
"/",
|
||||||
|
|
||||||
// Set a cookie to remember the previous locale for
|
|
||||||
// all requests that have a locale prefix
|
|
||||||
// Next.js issue, middleware matcher should support template literals:
|
// Next.js issue, middleware matcher should support template literals:
|
||||||
// https://github.com/vercel/next.js/issues/56398
|
// https://github.com/vercel/next.js/issues/56398
|
||||||
"/(en-US|fr-FR)/:path*",
|
"/(en-US|fr-FR)/:path*",
|
||||||
|
|
||||||
// Enable redirects that add missing locales
|
/*
|
||||||
// (e.g. `/pathnames` -> `/en/pathnames`)
|
* Match all request paths except for the ones starting with:
|
||||||
"/((?!_next|_vercel|.*\\..*).*)",
|
* - api (API routes)
|
||||||
|
* - _next/static (static files)
|
||||||
|
* - _next/image (image optimization files)
|
||||||
|
* - favicon.ico (favicon file)
|
||||||
|
*/
|
||||||
|
"/((?!api|_next/static|_next/image|images|favicon.ico|robots.txt).*)",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
5
apps/website/next-env.d.ts
vendored
@@ -1,5 +0,0 @@
|
|||||||
/// <reference types="next" />
|
|
||||||
/// <reference types="next/image-types/global" />
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
|
@@ -1,22 +0,0 @@
|
|||||||
import createNextIntlPlugin from "next-intl/plugin"
|
|
||||||
|
|
||||||
const IS_STANDALONE = process.env.IS_STANDALONE === "true"
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
|
||||||
const nextConfig = {
|
|
||||||
output: IS_STANDALONE ? "standalone" : undefined,
|
|
||||||
|
|
||||||
// https://github.com/hashicorp/next-mdx-remote/issues/436#issuecomment-2066971842
|
|
||||||
transpilePackages: ["next-mdx-remote", "shiki"],
|
|
||||||
|
|
||||||
eslint: {
|
|
||||||
ignoreDuringBuilds: true,
|
|
||||||
},
|
|
||||||
typescript: {
|
|
||||||
ignoreBuildErrors: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const withNextIntl = createNextIntlPlugin()
|
|
||||||
|
|
||||||
export default withNextIntl(nextConfig)
|
|
37
apps/website/next.config.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||||
|
import type { NextConfig } from "next"
|
||||||
|
import createNextIntlPlugin from "next-intl/plugin"
|
||||||
|
import path from "node:path"
|
||||||
|
|
||||||
|
const IS_STANDALONE = process.env.IS_STANDALONE === "true"
|
||||||
|
|
||||||
|
const nextConfig: NextConfig = {
|
||||||
|
output: IS_STANDALONE ? "standalone" : undefined,
|
||||||
|
typedRoutes: true,
|
||||||
|
images: {
|
||||||
|
unoptimized: true,
|
||||||
|
},
|
||||||
|
eslint: {
|
||||||
|
ignoreDuringBuilds: true,
|
||||||
|
},
|
||||||
|
typescript: {
|
||||||
|
ignoreBuildErrors: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const withNextIntl = createNextIntlPlugin({
|
||||||
|
experimental: {
|
||||||
|
createMessagesDeclaration: path.join(
|
||||||
|
process.cwd(),
|
||||||
|
"..",
|
||||||
|
"..",
|
||||||
|
"packages",
|
||||||
|
"i18n",
|
||||||
|
"src",
|
||||||
|
"translations",
|
||||||
|
`${LOCALE_DEFAULT}.json`,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default withNextIntl(nextConfig)
|
@@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/website",
|
"name": "@repo/website",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"imports": {
|
"imports": {
|
||||||
"#*": "./*"
|
"#*": "./*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --port 3000 --turbo",
|
"dev": "next dev --port 3000 --turbopack",
|
||||||
"build": "next build",
|
"build": "next build --turbopack",
|
||||||
"start": "next start --port 3000",
|
"start": "next start --port 3000",
|
||||||
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives",
|
"typegen": "next typegen",
|
||||||
"lint:typescript": "tsc --noEmit"
|
"lint:eslint": "eslint . --max-warnings 0",
|
||||||
|
"lint:typescript": "next typegen && tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@repo/blog": "workspace:*",
|
"@repo/blog": "workspace:*",
|
||||||
@@ -19,14 +20,16 @@
|
|||||||
"@repo/utils": "workspace:*",
|
"@repo/utils": "workspace:*",
|
||||||
"@repo/i18n": "workspace:*",
|
"@repo/i18n": "workspace:*",
|
||||||
"@repo/ui": "workspace:*",
|
"@repo/ui": "workspace:*",
|
||||||
|
"@mdx-js/mdx": "catalog:",
|
||||||
|
"next-mdx-remote": "catalog:",
|
||||||
|
"shiki": "catalog:",
|
||||||
"next": "catalog:",
|
"next": "catalog:",
|
||||||
"next-intl": "catalog:",
|
"next-intl": "catalog:",
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"react-dom": "catalog:",
|
"react-dom": "catalog:"
|
||||||
"sharp": "catalog:"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
@@ -35,6 +38,8 @@
|
|||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
BIN
apps/website/public/images/portfolio/Fusey.webp
Normal file
After Width: | Height: | Size: 945 KiB |
BIN
apps/website/public/images/skills/Caddy.webp
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
apps/website/public/images/skills/GitHub-dark.webp
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
apps/website/public/images/skills/GitHub-light.webp
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
apps/website/public/images/skills/GitLab.webp
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
apps/website/public/images/skills/Go.webp
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
apps/website/public/images/skills/Proxmox-dark.webp
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
apps/website/public/images/skills/Proxmox-light.webp
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
apps/website/public/images/skills/Rust.webp
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
apps/website/public/images/skills/tRPC.webp
Normal file
After Width: | Height: | Size: 17 KiB |
@@ -2,7 +2,6 @@ import sharedConfig from "@repo/config-tailwind"
|
|||||||
|
|
||||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
content: ["./**/*.tsx", "../../packages/**/*.tsx"],
|
|
||||||
presets: [sharedConfig],
|
presets: [sharedConfig],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,16 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "@repo/config-typescript/tsconfig.json",
|
"extends": "@repo/config-typescript/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "Bundler",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
"types": ["@total-typescript/ts-reset", "@repo/i18n/messages.d.ts"],
|
"types": ["@total-typescript/ts-reset", "@repo/i18n/messages.d.ts"],
|
||||||
"incremental": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"jsx": "preserve",
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"#*": ["./*"]
|
"#*": ["./*"]
|
||||||
},
|
},
|
||||||
@@ -21,5 +14,5 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"exclude": ["node_modules", ".next"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: "./"
|
context: "./"
|
||||||
dockerfile: "./apps/website/Dockerfile"
|
dockerfile: "./apps/website/Dockerfile"
|
||||||
|
args:
|
||||||
|
VERSION: ${VERSION-0.0.0-develop}
|
||||||
ports:
|
ports:
|
||||||
- "${WEBSITE_PORT-3000}:${WEBSITE_PORT-3000}"
|
- "${WEBSITE_PORT-3000}:${WEBSITE_PORT-3000}"
|
||||||
environment:
|
environment:
|
||||||
|
85
configs/config-eslint/eslint.config.js
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import nextPlugin from "@next/eslint-plugin-next"
|
||||||
|
import configConventions from "eslint-config-conventions"
|
||||||
|
import importXPlugin from "eslint-plugin-import-x"
|
||||||
|
import reactPlugin from "eslint-plugin-react"
|
||||||
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
||||||
|
import typescriptESLint from "typescript-eslint"
|
||||||
|
|
||||||
|
export default typescriptESLint.config(
|
||||||
|
...configConventions,
|
||||||
|
reactHooksPlugin.configs.recommended,
|
||||||
|
reactPlugin.configs.flat.recommended,
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
".next",
|
||||||
|
"**/next.config.ts",
|
||||||
|
"**/eslint.config.js",
|
||||||
|
"**/tailwind.config.js",
|
||||||
|
"**/postcss.config.js",
|
||||||
|
"**/kysely.config.ts",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "config-eslint",
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "19.1.1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
"@next/next": nextPlugin,
|
||||||
|
"import-x": importXPlugin,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...nextPlugin.configs.recommended.rules,
|
||||||
|
...nextPlugin.configs["core-web-vitals"].rules,
|
||||||
|
"@next/next/no-html-link-for-pages": "off",
|
||||||
|
"@next/next/no-img-element": "off",
|
||||||
|
|
||||||
|
"react-hooks/react-compiler": "error",
|
||||||
|
|
||||||
|
"react/jsx-no-target-blank": "off",
|
||||||
|
"react/no-unknown-property": "off",
|
||||||
|
"react/react-in-jsx-scope": "off",
|
||||||
|
"react/prop-types": "off",
|
||||||
|
"react/self-closing-comp": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
component: true,
|
||||||
|
html: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"react/void-dom-elements-no-children": "error",
|
||||||
|
"react/jsx-boolean-value": "error",
|
||||||
|
"react/iframe-missing-sandbox": "off",
|
||||||
|
|
||||||
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
paths: [
|
||||||
|
{
|
||||||
|
name: "next/navigation",
|
||||||
|
importNames: [
|
||||||
|
"redirect",
|
||||||
|
"permanentRedirect",
|
||||||
|
"useRouter",
|
||||||
|
"usePathname",
|
||||||
|
],
|
||||||
|
message: "Please import from `@repo/i18n/routing` instead.",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"import-x/extensions": [
|
||||||
|
"error",
|
||||||
|
"ignorePackages",
|
||||||
|
{
|
||||||
|
ts: "always",
|
||||||
|
tsx: "always",
|
||||||
|
js: "never",
|
||||||
|
jsx: "never",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
7
configs/config-eslint/index.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import type typescriptESLint from "typescript-eslint"
|
||||||
|
|
||||||
|
declare const eslintConfigConventions: ReturnType<
|
||||||
|
typeof typescriptESLint.config
|
||||||
|
>
|
||||||
|
|
||||||
|
export default eslintConfigConventions
|
27
configs/config-eslint/package.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "@repo/config-eslint",
|
||||||
|
"version": "0.0.0-develop",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./index.d.ts",
|
||||||
|
"import": "./eslint.config.js",
|
||||||
|
"require": "./eslint.config.js",
|
||||||
|
"default": "./eslint.config.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript-eslint": "catalog:",
|
||||||
|
"eslint": "catalog:",
|
||||||
|
"eslint-config-conventions": "catalog:",
|
||||||
|
"eslint-plugin-promise": "catalog:",
|
||||||
|
"eslint-plugin-unicorn": "catalog:",
|
||||||
|
"eslint-plugin-import-x": "catalog:",
|
||||||
|
"@next/eslint-plugin-next": "catalog:",
|
||||||
|
"eslint-plugin-react": "catalog:",
|
||||||
|
"eslint-plugin-react-hooks": "catalog:",
|
||||||
|
"typescript": "catalog:",
|
||||||
|
"globals": "catalog:"
|
||||||
|
}
|
||||||
|
}
|
5
configs/config-tailwind/.postcssrc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
import { type ClassValue, clsx } from "clsx"
|
import type { ClassValue } from "clsx"
|
||||||
|
import { clsx } from "clsx"
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge"
|
||||||
|
|
||||||
export const classNames = (...inputs: ClassValue[]): string => {
|
export const classNames = (...inputs: ClassValue[]): string => {
|
13
configs/config-tailwind/eslint.config.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import typescriptESLint from "typescript-eslint"
|
||||||
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
|
export default typescriptESLint.config(...config, {
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: typescriptESLint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
5
configs/config-tailwind/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import type { Config } from "tailwindcss"
|
||||||
|
|
||||||
|
declare const config: Config
|
||||||
|
|
||||||
|
export default config
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/config-tailwind",
|
"name": "@repo/config-tailwind",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./tailwind.config.js",
|
"main": "./tailwind.config.js",
|
||||||
@@ -21,11 +21,13 @@
|
|||||||
"tailwind-merge": "catalog:"
|
"tailwind-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@tailwindcss/typography": "catalog:",
|
"@tailwindcss/typography": "catalog:",
|
||||||
|
"typescript-eslint": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:"
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,14 +1,29 @@
|
|||||||
@import "@fontsource/montserrat/400.css";
|
@import "tailwindcss";
|
||||||
@import "@fontsource/montserrat/500.css";
|
@config "./tailwind.config.js";
|
||||||
@import "@fontsource/montserrat/600.css";
|
|
||||||
@import "@fontsource/montserrat/700.css";
|
|
||||||
@import "@fontsource/montserrat/800.css";
|
|
||||||
|
|
||||||
@tailwind base;
|
@source "../../apps/website/app";
|
||||||
@tailwind components;
|
@source "../../apps/website/components";
|
||||||
@tailwind utilities;
|
@source "../../apps/storybook/.storybook";
|
||||||
|
@source "../../packages/ui/src";
|
||||||
|
@source "../../packages/blog/src";
|
||||||
|
|
||||||
|
@import "@fontsource/montserrat/400.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/500.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/600.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/700.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/800.css" layer(base);
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
[type="search"]::-webkit-search-decoration,
|
||||||
|
[type="search"]::-webkit-search-cancel-button {
|
||||||
|
appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not(:disabled),
|
||||||
|
[role="button"]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
b,
|
b,
|
||||||
strong {
|
strong {
|
||||||
@apply font-semibold;
|
@apply font-semibold;
|
||||||
@@ -36,11 +51,11 @@
|
|||||||
@apply italic tracking-wider;
|
@apply italic tracking-wider;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
@apply border-gray border-l-4 pl-3 italic;
|
@apply border-gray-lighter border-l-4 pl-3 italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
kbd {
|
kbd {
|
||||||
@apply bg-gray rounded-md px-2 dark:text-black;
|
@apply bg-gray-lighter rounded-md px-2 dark:text-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
@@ -82,7 +97,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose {
|
.prose {
|
||||||
@apply dark:text-gray !max-w-5xl scroll-smooth text-black;
|
@apply dark:text-gray-lighter !max-w-5xl scroll-smooth text-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose p {
|
.prose p {
|
||||||
@@ -107,7 +122,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose strong {
|
.prose strong {
|
||||||
@apply dark:text-gray text-black;
|
@apply dark:text-gray-lighter text-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose h2,
|
.prose h2,
|
||||||
@@ -151,10 +166,6 @@ code .line::before {
|
|||||||
word-break: normal;
|
word-break: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
code .line:last-child {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.katex .base {
|
.katex .base {
|
||||||
display: inline !important;
|
display: inline !important;
|
||||||
white-space: normal !important;
|
white-space: normal !important;
|
||||||
@@ -162,9 +173,8 @@ code .line:last-child {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.curriculum-vitae {
|
.curriculum-vitae {
|
||||||
background: #f0f0f0;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
font-family: Arial, sans-serif;
|
font-family: Montserrat, sans-serif;
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
@@ -240,8 +250,8 @@ code .line:last-child {
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
.profile-pic img {
|
.profile-pic img {
|
||||||
width: 100px;
|
width: 80px;
|
||||||
height: 100px;
|
height: 80px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border: 0;
|
border: 0;
|
51
configs/config-tailwind/tailwind.config.js
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import typographyPlugin from "@tailwindcss/typography"
|
||||||
|
|
||||||
|
/** @type {Omit<import('tailwindcss').Config, "content">} */
|
||||||
|
const config = {
|
||||||
|
darkMode: "selector",
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
primary: {
|
||||||
|
DEFAULT: "#0056b3",
|
||||||
|
dark: "#00aeff",
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
DEFAULT: "#fff",
|
||||||
|
dark: "#181818",
|
||||||
|
},
|
||||||
|
"gray-lighter": "#d1d5db",
|
||||||
|
"gray-darker": {
|
||||||
|
DEFAULT: "#4b5563",
|
||||||
|
dark: "#9ca3af",
|
||||||
|
},
|
||||||
|
yellow: "#fef08a",
|
||||||
|
},
|
||||||
|
boxShadow: {
|
||||||
|
dark: "0px 0px 2px 2px rgba(0, 0, 0, 0.25)",
|
||||||
|
light: "0px 0px 2px 2px rgba(0, 0, 0, 0.10)",
|
||||||
|
darkFlag: "0px 1px 10px hsla(0, 0%, 100%, 0.2)",
|
||||||
|
lightFlag: "0px 1px 10px rgba(0, 0, 0, 0.25)",
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
sans: ["Montserrat", "sans-serif"],
|
||||||
|
},
|
||||||
|
typography: {
|
||||||
|
DEFAULT: {
|
||||||
|
css: {
|
||||||
|
a: {
|
||||||
|
textDecoration: "none",
|
||||||
|
"&:hover": {
|
||||||
|
textDecoration: "underline",
|
||||||
|
fontWeight: 400,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [typographyPlugin],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
6
configs/config-tailwind/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extends": "@repo/config-typescript/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["ESNext"]
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/config-typescript",
|
"name": "@repo/config-typescript",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"tsconfig.json"
|
"tsconfig.json"
|
@@ -6,15 +6,25 @@
|
|||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noImplicitThis": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
|
"erasableSyntaxOnly": true,
|
||||||
|
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true
|
"incremental": false,
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
"target": "ESNext",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler",
|
||||||
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
33
package.json
@@ -1,39 +1,32 @@
|
|||||||
{
|
{
|
||||||
"name": "repo",
|
"name": "repo",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903",
|
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.0.0",
|
"node": ">=24.0.0"
|
||||||
"pnpm": ">=9.5.0"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build",
|
|
||||||
"dev": "turbo run dev --parallel",
|
"dev": "turbo run dev --parallel",
|
||||||
"start": "turbo run start --parallel",
|
"start": "turbo run start --parallel",
|
||||||
|
"build": "turbo run build",
|
||||||
"test": "turbo run test",
|
"test": "turbo run test",
|
||||||
"lint:editorconfig": "editorconfig-checker",
|
"lint:editorconfig": "editorconfig-checker",
|
||||||
"lint:markdown": "markdownlint-cli2",
|
"lint:markdown": "markdownlint-cli2",
|
||||||
"lint:prettier": "prettier . --check",
|
|
||||||
"lint:eslint": "turbo run lint:eslint",
|
|
||||||
"lint:typescript": "turbo run lint:typescript",
|
"lint:typescript": "turbo run lint:typescript",
|
||||||
"release": "semantic-release"
|
"lint:eslint": "turbo run lint:eslint",
|
||||||
|
"lint:prettier": "prettier . --check"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-backmerge": "4.0.1",
|
"editorconfig-checker": "catalog:",
|
||||||
"@semantic-release/exec": "6.0.3",
|
|
||||||
"@semantic-release/git": "10.0.1",
|
|
||||||
"editorconfig-checker": "5.1.8",
|
|
||||||
"playwright": "catalog:",
|
"playwright": "catalog:",
|
||||||
"prettier": "3.3.3",
|
"prettier": "catalog:",
|
||||||
"prettier-plugin-tailwindcss": "0.6.5",
|
"prettier-plugin-tailwindcss": "catalog:",
|
||||||
"markdownlint-cli2": "0.13.0",
|
"markdownlint-cli2": "catalog:",
|
||||||
"markdownlint": "0.34.0",
|
"markdownlint": "catalog:",
|
||||||
"markdownlint-rule-relative-links": "3.0.0",
|
"markdownlint-rule-relative-links": "catalog:",
|
||||||
"replace-in-files-cli": "3.0.0",
|
"turbo": "catalog:",
|
||||||
"semantic-release": "23.1.1",
|
|
||||||
"turbo": "2.0.10",
|
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"extends": ["@repo/eslint-config/nextjs/.eslintrc.json"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"plugins": ["@typescript-eslint"],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
5
packages/blog/.postcssrc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
13
packages/blog/eslint.config.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import typescriptESLint from "typescript-eslint"
|
||||||
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
|
export default typescriptESLint.config(...config, {
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
parser: typescriptESLint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/blog",
|
"name": "@repo/blog",
|
||||||
"version": "4.0.0",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"./BlogPostUI": "./src/BlogPostUI.tsx"
|
"./BlogPostUI": "./src/BlogPostUI.tsx"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:eslint": "eslint src --max-warnings 0 --report-unused-disable-directives",
|
"lint:eslint": "eslint src --max-warnings 0",
|
||||||
"lint:typescript": "tsc --noEmit"
|
"lint:typescript": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -37,18 +37,19 @@
|
|||||||
"react-icons": "catalog:"
|
"react-icons": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@total-typescript/ts-reset": "catalog:",
|
"@total-typescript/ts-reset": "catalog:",
|
||||||
"@storybook/blocks": "catalog:",
|
"storybook": "catalog:",
|
||||||
"@storybook/react": "catalog:",
|
"@storybook/nextjs": "catalog:",
|
||||||
"@storybook/test": "catalog:",
|
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@@ -109,11 +109,11 @@ const transaction = charge(user, subscription)
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface Car {
|
interface Car {
|
||||||
carModel: string
|
carModel: string
|
||||||
carColor: "red" | "blue" | "yellow"
|
carColor: "red" | "blue" | "yellow"
|
||||||
}
|
}
|
||||||
const printCar = (car: Car): void => {
|
const printCar = (car: Car): void => {
|
||||||
console.log(`${car.carModel} (${car.carColor})`)
|
console.log(`${car.carModel} (${car.carColor})`)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -121,11 +121,11 @@ const printCar = (car: Car): void => {
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface Car {
|
interface Car {
|
||||||
model: string
|
model: string
|
||||||
color: "red" | "blue" | "yellow"
|
color: "red" | "blue" | "yellow"
|
||||||
}
|
}
|
||||||
const printCar = (car: Car): void => {
|
const printCar = (car: Car): void => {
|
||||||
console.log(`${car.model} (${car.color})`)
|
console.log(`${car.model} (${car.color})`)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -174,13 +174,13 @@ import fs from "node:fs"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
|
||||||
const createFile = async (
|
const createFile = async (
|
||||||
name: string,
|
name: string,
|
||||||
isTemporary: boolean = false,
|
isTemporary: boolean = false,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
if (isTemporary) {
|
if (isTemporary) {
|
||||||
return await fs.promises.writeFile(path.join("temporary", name), "")
|
return await fs.promises.writeFile(path.join("temporary", name), "")
|
||||||
}
|
}
|
||||||
return await fs.promises.writeFile(name, "")
|
return await fs.promises.writeFile(name, "")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -193,11 +193,11 @@ import fs from "node:fs"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
|
||||||
const createFile = async (name: string): Promise<void> => {
|
const createFile = async (name: string): Promise<void> => {
|
||||||
await fs.promises.writeFile(name, "")
|
await fs.promises.writeFile(name, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
const createTemporaryFile = async (name: string): Promise<void> => {
|
const createTemporaryFile = async (name: string): Promise<void> => {
|
||||||
await createFile(path.join("temporary", name))
|
await createFile(path.join("temporary", name))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -40,8 +40,8 @@ These configurations are stored in the `.gitconfig` file in your home directory
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
[user]
|
[user]
|
||||||
name = Username
|
name = Username
|
||||||
email = email@example.com
|
email = email@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
You can find more information and useful `git` configurations in the [official documentation](https://git-scm.com/docs/git-config).
|
You can find more information and useful `git` configurations in the [official documentation](https://git-scm.com/docs/git-config).
|
||||||
@@ -88,6 +88,8 @@ git commit -m "Commit message"
|
|||||||
|
|
||||||
# Commit changes in the past
|
# Commit changes in the past
|
||||||
git commit --date "10 day ago" -m "Commit message"
|
git commit --date "10 day ago" -m "Commit message"
|
||||||
|
# Also update the committer date for the last commit
|
||||||
|
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' HEAD^..HEAD
|
||||||
|
|
||||||
# Add remote repository
|
# Add remote repository
|
||||||
git remote add <remote> <url>
|
git remote add <remote> <url>
|
||||||
@@ -266,7 +268,7 @@ Sometimes, you want to compare what commits have been made between two branches,
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
[alias]
|
[alias]
|
||||||
diff-commits = !sh -c 'echo -n "Commits in $2 not in $1 \\(" && printf "%d" $(git cherry -v $1 $2 | wc -l) && echo "\\)" && git cherry -v $1 $2 && echo "" && echo -n "Commits in $1 not in $2 \\(" && printf "%d" $(git cherry -v $2 $1 | wc -l) && echo "\\)" && git cherry -v $2 $1' -
|
diff-commits = !sh -c 'echo -n "Commits in $2 not in $1 \\(" && printf "%d" $(git cherry -v $1 $2 | wc -l) && echo "\\)" && git cherry -v $1 $2 && echo "" && echo -n "Commits in $1 not in $2 \\(" && printf "%d" $(git cherry -v $2 $1 | wc -l) && echo "\\)" && git cherry -v $2 $1' -
|
||||||
```
|
```
|
||||||
|
|
||||||
With this alias, we can compare the commits between `main` and `develop` branches for example:
|
With this alias, we can compare the commits between `main` and `develop` branches for example:
|
||||||
|
@@ -17,7 +17,7 @@ Keep in mind that I will not translate the posts in French, all the posts will b
|
|||||||
|
|
||||||
I plan to publish new posts when I have something new to share. There's no schedule, so stay tuned!
|
I plan to publish new posts when I have something new to share. There's no schedule, so stay tuned!
|
||||||
|
|
||||||
To stay informed of new blog post and to ask questions, feel free to follow me on Twitter: [@theoludwig\_](https://twitter.com/theoludwig_).
|
To stay informed of new blog post and to ask questions, feel free to follow me on X/Twitter: [@theoludwig\_](https://twitter.com/theoludwig_).
|
||||||
|
|
||||||
## Project based learning
|
## Project based learning
|
||||||
|
|
||||||
@@ -39,23 +39,23 @@ The code of this website is open source on [GitHub](https://github.com/theoludwi
|
|||||||
|
|
||||||
- [Next.js](https://nextjs.org/)
|
- [Next.js](https://nextjs.org/)
|
||||||
|
|
||||||
It allows to have a server-side rendered website, that means that it is faster and easier to have a good <abbr title="Search Engine Optimization">SEO</abbr> than a <abbr title="Single Page Application">SPA</abbr>.
|
It allows to have a server-side rendered website, that means that it is faster and easier to have a good <abbr title="Search Engine Optimization">SEO</abbr> than a <abbr title="Single Page Application">SPA</abbr>.
|
||||||
|
|
||||||
- [MDX](https://mdxjs.com/)
|
- [MDX](https://mdxjs.com/)
|
||||||
|
|
||||||
MDX is an extension of Markdown that allows you to use custom React components.
|
MDX is an extension of Markdown that allows you to use custom React components.
|
||||||
|
|
||||||
Here's what Markdown looks like:
|
Here's what Markdown looks like:
|
||||||
|
|
||||||
```md
|
```md
|
||||||
A simple paragraph, with some **bold** text and some `inline code`.
|
A simple paragraph, with some **bold** text and some `inline code`.
|
||||||
```
|
```
|
||||||
|
|
||||||
When using Markdown in a web application, there's a "compile" step; the Markdown needs to be transformed into HTML, so that it can be understood by the browser. Those asterisks get turned into a `<strong>` tag, and each paragraph gets a `<p>` tag etc.
|
When using Markdown in a web application, there's a "compile" step; the Markdown needs to be transformed into HTML, so that it can be understood by the browser. Those asterisks get turned into a `<strong>` tag, and each paragraph gets a `<p>` tag etc.
|
||||||
|
|
||||||
- [Tailwind CSS](https://tailwindcss.com/)
|
- [Tailwind CSS](https://tailwindcss.com/)
|
||||||
|
|
||||||
Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
|
Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ The idea is that a user can create an account to authenticate with an email addr
|
|||||||
|
|
||||||
## History
|
## History
|
||||||
|
|
||||||
The idea for the project has existed since May 13, 2020, symbolized by a [publication on Twitter](https://twitter.com/theoludwig_/status/1260638175246135296) by the creator: Théo LUDWIG.
|
The idea for the project has existed since May 13, 2020, symbolized by a [publication on X/Twitter](https://twitter.com/theoludwig_/status/1260638175246135296) by the creator: Théo LUDWIG.
|
||||||
|
|
||||||
The main goal is to put into **practice knowledge in web development** and computer science in general on a concrete project that can **easily evolve over time** where you can add many features.
|
The main goal is to put into **practice knowledge in web development** and computer science in general on a concrete project that can **easily evolve over time** where you can add many features.
|
||||||
|
|
||||||
|
@@ -9,9 +9,9 @@ import rehypeSlug from "rehype-slug"
|
|||||||
import remarkGfm from "remark-gfm"
|
import remarkGfm from "remark-gfm"
|
||||||
import remarkMath from "remark-math"
|
import remarkMath from "remark-math"
|
||||||
|
|
||||||
import { Link } from "@repo/i18n/navigation"
|
import { Link } from "@repo/i18n/routing"
|
||||||
import "katex/dist/katex.min.css"
|
import "katex/dist/katex.min.css"
|
||||||
import { BlogPostComments } from "./BlogPostComments"
|
import { BlogPostComments } from "./BlogPostComments.tsx"
|
||||||
|
|
||||||
const Heading: React.FC<
|
const Heading: React.FC<
|
||||||
React.DetailedHTMLProps<
|
React.DetailedHTMLProps<
|
||||||
@@ -95,7 +95,6 @@ export const BlogPostContent: React.FC<BlogPostContentProps> = async (
|
|||||||
alt={alt}
|
alt={alt}
|
||||||
width={1000}
|
width={1000}
|
||||||
height={1000}
|
height={1000}
|
||||||
quality={100}
|
|
||||||
className="size-auto"
|
className="size-auto"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
@@ -103,13 +102,14 @@ export const BlogPostContent: React.FC<BlogPostContentProps> = async (
|
|||||||
},
|
},
|
||||||
a: (props) => {
|
a: (props) => {
|
||||||
const { href = "", ...rest } = props
|
const { href = "", ...rest } = props
|
||||||
if (href.startsWith("#")) {
|
const hrefString = href as string
|
||||||
|
if (hrefString.startsWith("#")) {
|
||||||
return <a {...props} />
|
return <a {...props} />
|
||||||
}
|
}
|
||||||
if (href.startsWith("../posts/")) {
|
if (hrefString.startsWith("../posts/")) {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href={href
|
href={hrefString
|
||||||
.replace("../posts/", "/blog/")
|
.replace("../posts/", "/blog/")
|
||||||
.replace(".md", "")}
|
.replace(".md", "")}
|
||||||
{...rest}
|
{...rest}
|
||||||
|
@@ -3,8 +3,8 @@ import "katex/dist/katex.min.css"
|
|||||||
|
|
||||||
import { Typography } from "@repo/ui/Design/Typography"
|
import { Typography } from "@repo/ui/Design/Typography"
|
||||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||||
import type { BlogPost } from "./BlogPost"
|
import type { BlogPost } from "./BlogPost.tsx"
|
||||||
import { BlogPostContent } from "./BlogPostContent"
|
import { BlogPostContent } from "./BlogPostContent.tsx"
|
||||||
|
|
||||||
export interface BlogPostUIProps {
|
export interface BlogPostUIProps {
|
||||||
blogPost: BlogPost
|
blogPost: BlogPost
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Link } from "@repo/i18n/navigation"
|
import { Link } from "@repo/i18n/routing"
|
||||||
import { Typography } from "@repo/ui/Design/Typography"
|
import { Typography } from "@repo/ui/Design/Typography"
|
||||||
import { Section, SectionContent } from "@repo/ui/Layout/Section"
|
import { Section, SectionContent } from "@repo/ui/Layout/Section"
|
||||||
import { getISODate } from "@repo/utils/dates"
|
import { getISODate } from "@repo/utils/dates"
|
||||||
import type { BlogPost } from "./BlogPost"
|
import type { BlogPost } from "./BlogPost.tsx"
|
||||||
|
|
||||||
export interface BlogPostsProps {
|
export interface BlogPostsProps {
|
||||||
posts: BlogPost[]
|
posts: BlogPost[]
|
||||||
|
@@ -2,7 +2,7 @@ import fs from "node:fs"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
|
||||||
import matter from "gray-matter"
|
import matter from "gray-matter"
|
||||||
import type { BlogPost, FrontMatter } from "./BlogPost"
|
import type { BlogPost, FrontMatter } from "./BlogPost.tsx"
|
||||||
|
|
||||||
export const BLOG_POSTS_PATH = path.join(
|
export const BLOG_POSTS_PATH = path.join(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { BLOG_POST_MOCK } from "../BlogPost"
|
import { BLOG_POST_MOCK } from "../BlogPost.ts"
|
||||||
import { BlogPostUI as BlogPostUIComponent } from "../BlogPostUI"
|
import { BlogPostUI as BlogPostUIComponent } from "../BlogPostUI.tsx"
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: "Blog/BlogPostUI",
|
title: "Blog/BlogPostUI",
|
||||||
|