Skip to content

Commit

Permalink
Merge pull request #91 from SocialGouv/feat/redesign-course
Browse files Browse the repository at this point in the history
feat: CJE V2
  • Loading branch information
ClementNumericite authored Oct 16, 2024
2 parents 7ce842f + 3eefd0b commit 914467a
Show file tree
Hide file tree
Showing 299 changed files with 60,959 additions and 24,964 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
yarn.lock
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd webapp
yarn lint
yarn format
git add -u
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "sh .husky/pre-commit"
}
}
2 changes: 2 additions & 0 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ jobs:
with:
buildArgs:
NEXT_PUBLIC_JWT_NAME: cje-jwt-dev
NEXT_PUBLIC_URL_APP: "https://{{.Values.global.host}}"
NEXT_PUBLIC_CRISP_TOKEN: 53f1b086-7828-49de-abb4-0c6765d9ca13
NEXT_PUBLIC_MATOMO_TRACKING_ENABLED: "false"
NEXT_PUBLIC_MATOMO_URL: https://matomo.fabrique.social.gouv.fr/
NEXT_PUBLIC_MATOMO_SITE_ID: 112
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY: BEhweKLgZWqV1WJF6rRUaNiN-qjZPd7KlI_i3E9u2Xg_z2oPePiwgiNbIebpSTXx38epVeVxzfEDsr4atZLf4bA
NEXT_PUBLIC_WIDGET_TOKEN_NAME: widget-token
30 changes: 16 additions & 14 deletions .kontinuous/env/preprod/templates/app.sealed-secret.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .kontinuous/env/preprod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
buildArgs:
NEXT_PUBLIC_JWT_NAME: cje-jwt-preprod
NEXT_PUBLIC_ENV_APP: preproduction
NEXT_PUBLIC_URL_APP: https://cje-preprod.ovh.fabrique.social.gouv.fr
NEXT_PUBLIC_CRISP_TOKEN: 53f1b086-7828-49de-abb4-0c6765d9ca13
NEXT_PUBLIC_MATOMO_TRACKING_ENABLED: "true"
NEXT_PUBLIC_MATOMO_URL: https://matomo.fabrique.social.gouv.fr/
NEXT_PUBLIC_MATOMO_SITE_ID: 112
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY: BEhweKLgZWqV1WJF6rRUaNiN-qjZPd7KlI_i3E9u2Xg_z2oPePiwgiNbIebpSTXx38epVeVxzfEDsr4atZLf4bA
NEXT_PUBLIC_WIDGET_TOKEN_NAME: widget-token
23 changes: 13 additions & 10 deletions .kontinuous/env/prod/templates/app.sealed-secret.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ jobs:
buildArgs:
PRODUCTION: 1
NEXT_PUBLIC_ENV_APP: production
NEXT_PUBLIC_URL_APP: https://cje.fabrique.social.gouv.fr
NEXT_PUBLIC_JWT_NAME: cje-jwt-prod
NEXT_PUBLIC_CRISP_TOKEN: e69a24b5-c98d-4ff2-9400-706f07bf8c55
NEXT_PUBLIC_MATOMO_TRACKING_ENABLED: "true"
NEXT_PUBLIC_MATOMO_URL: https://matomo.fabrique.social.gouv.fr/
NEXT_PUBLIC_MATOMO_SITE_ID: 103
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY: BEhweKLgZWqV1WJF6rRUaNiN-qjZPd7KlI_i3E9u2Xg_z2oPePiwgiNbIebpSTXx38epVeVxzfEDsr4atZLf4bA
NEXT_PUBLIC_WIDGET_TOKEN_NAME: widget-token
app:
host: cje.fabrique.social.gouv.fr
resources:
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"devDependencies": {
"husky": "^8.0.0"
},
"scripts": {
"prepare": "husky install"
}
}
5 changes: 5 additions & 0 deletions webapp/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ NEXT_PUBLIC_CRISP_TOKEN=crisp-token
# Web Push
NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY=web-push-public-key
WEB_PUSH_PRIVATE_KEY=web-push-private-key

# Widget
NEXT_PUBLIC_WIDGET_TOKEN_NAME=widget-token
WIDGET_SECRET_JWT=secret1
WIDGET_SECRET_DATA_ENCRYPTION=secret2
1 change: 1 addition & 0 deletions webapp/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/payload/migrations
23 changes: 23 additions & 0 deletions webapp/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"embeddedLanguageFormatting": "auto",
"vueIndentScriptAndStyle": false,
"experimentalTernaries": false
}
1,106 changes: 462 additions & 644 deletions webapp/CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN yarn fetch

ARG NEXT_PUBLIC_ENV_APP
ENV NEXT_PUBLIC_ENV_APP=$NEXT_PUBLIC_ENV_APP
ARG NEXT_PUBLIC_URL_APP
ENV NEXT_PUBLIC_URL_APP=$NEXT_PUBLIC_URL_APP
ARG NEXT_PUBLIC_JWT_NAME
ENV NEXT_PUBLIC_JWT_NAME=$NEXT_PUBLIC_JWT_NAME
ARG NEXT_PUBLIC_MATOMO_URL
Expand All @@ -22,6 +24,8 @@ ARG NEXT_PUBLIC_CRISP_TOKEN
ENV NEXT_PUBLIC_CRISP_TOKEN=$NEXT_PUBLIC_CRISP_TOKEN
ARG NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY
ENV NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY=$NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY
ARG NEXT_PUBLIC_WIDGET_TOKEN_NAME
ENV NEXT_PUBLIC_WIDGET_TOKEN_NAME=$NEXT_PUBLIC_WIDGET_TOKEN_NAME

COPY . .
RUN --mount=type=secret,id=sentry_auth_token export SENTRY_AUTH_TOKEN="$(cat /run/secrets/sentry_auth_token)"; \
Expand Down
1 change: 1 addition & 0 deletions webapp/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const nextOptions = {
env: {
NEXT_PUBLIC_CURRENT_PACKAGE_VERSION: version,
},
transpilePackages: ["@choc-ui/chakra-autocomplete"],
};

const payloadOptions = {
Expand Down
12 changes: 10 additions & 2 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"seed:prod": "tsx ./src/payload/seed/index.ts",
"cron-job": "tsx ./src/notifications/index.ts",
"payload": "PAYLOAD_CONFIG_PATH=./src/payload/payload.config.ts payload",
"format": "prettier --write .",
"lint": "next lint"
},
"dependencies": {
Expand All @@ -18,7 +19,8 @@
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/next-js": "^2.2.0",
"@chakra-ui/react": "^2.8.2",
"@choc-ui/chakra-autocomplete": "^5.3.0",
"@choc-ui/chakra-autocomplete": "^5.6.4",
"@ctrl/tinycolor": "^4.1.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@gsap/react": "^2.1.0",
Expand All @@ -42,6 +44,8 @@
"framer-motion": "^11.0.0",
"gsap": "^3.12.5",
"ignore-styles": "^5.0.1",
"js-cookie": "^3.0.5",
"jsonwebtoken": "^9.0.2",
"jwt-decode": "^4.0.0",
"next": "13.5.6",
"papaparse": "^5.4.1",
Expand All @@ -55,6 +59,7 @@
"react-icons": "^5.0.0",
"react-otp-input": "^3.1.1",
"react-qrcode-logo": "^2.9.0",
"react-toastify": "^10.0.5",
"sharp": "^0.33.2",
"superjson": "^1.13.3",
"tsx": "^4.7.0",
Expand All @@ -63,13 +68,16 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@types/js-cookie": "^3",
"@types/jsonwebtoken": "^9",
"@types/node": "^20",
"@types/papaparse": "^5",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/web-push": "^3",
"prettier": "^3.1.1",
"serwist": "^9.0.2",
"typescript": "^5",
"typescript": "5.4.5",
"webpack": "^5.89.0"
},
"packageManager": "[email protected]"
Expand Down
Loading

0 comments on commit 914467a

Please sign in to comment.