Merge branch 'feature/configuration-deploiement' into develop

feature/blog
Näser 3 years ago
commit fa3ddac572

@ -1,21 +1,15 @@
# NxGuitarSchool
<a href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
### Comptes
**This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)**
#### FTP
## Development server
Username : superadmin@naserloud.fr
mot de passe : =H*S9g**=S$s*(.S5g
host : node143-eu.n0c.com
Run `nx serve client` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
### SSH
command : ssh dpxtrufj@node143-eu.n0c.com -port 5502
mdp : xVarAG3bsEJe8T
## Understand this workspace
Run `nx graph` to see a diagram of the dependencies of the projects.
## Remote caching
Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster.
## Further help
Visit the [Nx Documentation](https://nx.dev) to learn more.

@ -1,6 +0,0 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS="toBeModified1,toBeModified2"
API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
JWT_SECRET=tobemodified

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3307
MYSQL_DATABASE_NAME=gs_database
MYSQL_DATABASE_USERNAME=gs_username
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=gs_password
SMTP_HOST=mail.infomaniak.com
SMTP_PORT=587
SMTP_USERNAME=synology@naser.fr
SMTP_PASSWORD=Em18071988!
SMTP_DEFAULT_FROM=no-reply@strapi.io
SMTP_DEFAULT_REPLY=synology@naser.fr

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3306
MYSQL_DATABASE_NAME=dpxtrufj_gs_database
MYSQL_DATABASE_USERNAME=dpxtrufj_gs_username
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=q7=@oa*F*s4?8*Hq4H
SMTP_HOST=node143-eu.n0c.com
SMTP_PORT=587
SMTP_USERNAME=no-reply@nasercloud.fr
SMTP_PASSWORD=GuitarSchool123!
SMTP_DEFAULT_FROM=no-reply@strapi.io
SMTP_DEFAULT_REPLY=synology@naser.fr

@ -0,0 +1,28 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=chUnDYzQYwe0TBtXVv4sPg==,fVrGPGw5Xd4UdPisWHOHxQ==,Qre2n8wneae2BrXOotmagw==,B3suExWQFpyJS9mhqNcOLg==
API_TOKEN_SALT=tyYia7Nui8Y0lM0IRTDjmg==
ADMIN_JWT_SECRET=q1dnfyvh3K7yhTYbYNS7jw==
JWT_SECRET=nc8prafomnDTfDdS00OqTQ==
PG_DATABASE_HOST=localhost
PG_DATABASE_PORT=5432
PG_DATABASE_NAME=gs_database
PG_DATABASE_USERNAME=gs_username
PG_DATABASE_ROOT_PASSWORD=gs_root_username
PG_DATABASE_PASSWORD=gs_password
PG_DATABASE_SCHEMA=public
MYSQL_DATABASE_HOST=localhost
MYSQL_DATABASE_PORT=3306
MYSQL_DATABASE_NAME=dpxtrufj_gs_database
MYSQL_DATABASE_USERNAME=dpxtrufj_gs_user
MYSQL_DATABASE_ROOT_PASSWORD=gs_root_username
MYSQL_DATABASE_PASSWORD=q7=@oa*F*s4?8*Hq4H
SMTP_HOST=node143-eu.n0c.com
SMTP_PORT=587
SMTP_USERNAME=no-reply@nasercloud.fr
SMTP_PASSWORD=GuitarSchool123!
SMTP_DEFAULT_FROM=no-reply@nasercloud.fr
SMTP_DEFAULT_REPLY=contact@nasercloud.fr

@ -1,14 +1,12 @@
export default ({env}) => ({
connection: {
client: 'postgres',
client: 'mysql',
connection: {
host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'bank'),
user: env('DATABASE_USERNAME', 'postgres'),
password: env('DATABASE_PASSWORD', '0000'),
schema: env('DATABASE_SCHEMA', 'public'), // Not required
ssl: false,
host: env('MYSQL_DATABASE_HOST', 'localhost'),
port: env.int('MYSQL_DATABASE_PORT', 3306),
database: env('MYSQL_DATABASE_NAME', 'bank'),
user: env('MYSQL_DATABASE_USERNAME', 'postgres'),
password: env('MYSQL_DATABASE_PASSWORD', '0000'),
},
debug: false,
},

@ -13,10 +13,13 @@ module.exports = ({env}) => ({
// ... any custom nodemailer options
},
settings: {
defaultFrom: 'no-reply@naser.fr',
defaultReplyTo: 'contact@naser.fr',
defaultFrom: env('SMTP_DEFAULT_FROM', 'no-reply@strapi.io'),
defaultReplyTo: env('SMTP_DEFAULT_REPLY', 'synology@naser.fr'),
},
},
},
'import-export-entries': {
enabled: true
}
// ...
});

@ -0,0 +1,20 @@
services:
gs_mysql:
image: 'mariadb:10.3'
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE_NAME}
# So you don't have to use root, but you can if you like
MYSQL_USER: ${MYSQL_DATABASE_USERNAME}
# You can use whatever password you like
MYSQL_PASSWORD: ${MYSQL_DATABASE_PASSWORD}
# Password for root access
MYSQL_ROOT_PASSWORD: ${MYSQL_DATABASE_ROOT_PASSWORD}
ports:
# <Port exposed> : < MySQL Port running inside container>
- '${MYSQL_DATABASE_PORT}:3306'
expose:
# Opens port 3306 on the container
- '${MYSQL_DATABASE_PORT}'
# Where our data will be persisted
volumes:
- gs_mariadb-master:/var/lib/mysql

@ -15,7 +15,9 @@
"@strapi/strapi": "4.5.4",
"@strapi/utils": "^4.5.6",
"better-sqlite3": "7.4.6",
"mysql": "^2.18.1",
"pg": "^8.8.0",
"strapi-plugin-import-export-entries": "^1.18.0",
"strapi-plugin-menus": "^1.2.1",
"strapi-plugin-populate-deep": "^1.1.2"
},
@ -2457,6 +2459,19 @@
"react": ">=16.3"
}
},
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/topo": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz",
"integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==",
"dependencies": {
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@internationalized/number": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.1.2.tgz",
@ -2560,6 +2575,31 @@
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
"integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A=="
},
"node_modules/@monaco-editor/loader": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.3.2.tgz",
"integrity": "sha512-BTDbpHl3e47r3AAtpfVFTlAi7WXv4UQ/xZmz8atKl4q7epQV5e7+JbigFDViWF71VBi4IIBdcWP57Hj+OWuc9g==",
"dependencies": {
"state-local": "^1.0.6"
},
"peerDependencies": {
"monaco-editor": ">= 0.21.0 < 1"
}
},
"node_modules/@monaco-editor/react": {
"version": "4.4.5",
"resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.4.5.tgz",
"integrity": "sha512-IImtzU7sRc66OOaQVCG+5PFHkSWnnhrUWGBuH6zNmH2h0YgmAhcjHZQc/6MY9JWEbUtVF1WPBMJ9u1XuFbRrVA==",
"dependencies": {
"@monaco-editor/loader": "^1.3.2",
"prop-types": "^15.7.2"
},
"peerDependencies": {
"monaco-editor": ">= 0.25.0 < 1",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@mswjs/cookies": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz",
@ -2833,6 +2873,24 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/@sideway/address": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
"integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==",
"dependencies": {
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@sideway/formula": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz",
"integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg=="
},
"node_modules/@sideway/pinpoint": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz",
"integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ=="
},
"node_modules/@simov/deep-extend": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@simov/deep-extend/-/deep-extend-1.0.0.tgz",
@ -5598,6 +5656,14 @@
"node": "*"
}
},
"node_modules/bignumber.js": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
"engines": {
"node": "*"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@ -5637,6 +5703,11 @@
"node": ">= 6"
}
},
"node_modules/bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
@ -7070,6 +7141,22 @@
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
"integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
},
"node_modules/csvtojson": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/csvtojson/-/csvtojson-2.0.10.tgz",
"integrity": "sha512-lUWFxGKyhraKCW8Qghz6Z0f2l/PqB1W3AO0HKJzGIQ5JRSlR651ekJDiGJbBT4sRNNv5ddnSGVEnsxP9XRCVpQ==",
"dependencies": {
"bluebird": "^3.5.1",
"lodash": "^4.17.3",
"strip-bom": "^2.0.0"
},
"bin": {
"csvtojson": "bin/csvtojson"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@ -10235,6 +10322,11 @@
"upper-case": "^1.1.0"
}
},
"node_modules/is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q=="
},
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
@ -10315,6 +10407,18 @@
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/joi": {
"version": "17.6.0",
"resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz",
"integrity": "sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==",
"dependencies": {
"@hapi/hoek": "^9.0.0",
"@hapi/topo": "^5.0.0",
"@sideway/address": "^4.1.3",
"@sideway/formula": "^3.0.0",
"@sideway/pinpoint": "^2.0.0"
}
},
"node_modules/joycon": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
@ -11497,6 +11601,23 @@
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"node_modules/monaco-editor": {
"version": "0.33.0",
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.33.0.tgz",
"integrity": "sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw=="
},
"node_modules/monaco-editor-webpack-plugin": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-7.0.1.tgz",
"integrity": "sha512-M8qIqizltrPlIbrb73cZdTWfU9sIsUVFvAZkL3KGjAHmVWEJ0hZKa/uad14JuOckc0GwnCaoGHvMoYtJjVyCzw==",
"dependencies": {
"loader-utils": "^2.0.2"
},
"peerDependencies": {
"monaco-editor": ">= 0.31.0",
"webpack": "^4.5.0 || 5.x"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -11626,6 +11747,52 @@
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
},
"node_modules/mysql": {
"version": "2.18.1",
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
"dependencies": {
"bignumber.js": "9.0.0",
"readable-stream": "2.3.7",
"safe-buffer": "5.1.2",
"sqlstring": "2.3.1"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mysql/node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
},
"node_modules/mysql/node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/mysql/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/mysql/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/mz": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
@ -13835,6 +14002,22 @@
"react": "^16.3.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/react-singleton-hook": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/react-singleton-hook/-/react-singleton-hook-3.3.0.tgz",
"integrity": "sha512-U0qLp7LkpqPAnSQkKNPQmMd0mhar8hAm4VL+3y/bJFoi9H817wl+gM0z7RAMfOE49E8tlCMroEavqwJa6wItlg==",
"peerDependencies": {
"react": "15 - 18"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
},
"react-native": {
"optional": true
}
}
},
"node_modules/react-transition-group": {
"version": "4.4.5",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
@ -15264,6 +15447,14 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"node_modules/sqlstring": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
"integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/sshpk": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
@ -15301,6 +15492,11 @@
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
"integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="
},
"node_modules/state-local": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz",
"integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w=="
},
"node_modules/static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@ -15402,6 +15598,28 @@
"resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.1.tgz",
"integrity": "sha512-3H20QlwQsSm2OvAxWIYhs+j01MzzqwMwGiiO1NQaJYZgJZFPuAbf95/DiKRBSTYIJ2FeGUc+B/6mPGcWP9dO3Q=="
},
"node_modules/strapi-plugin-import-export-entries": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/strapi-plugin-import-export-entries/-/strapi-plugin-import-export-entries-1.18.0.tgz",
"integrity": "sha512-pAokLrqjd08JS7N/LUvsym3JTvja25J0xKw4zbPUDEt5Fdr/N9/N7wthKy6cv7TA7f6qJFq3q1RNtyjhJ5Cf/Q==",
"dependencies": {
"@monaco-editor/react": "4.4.5",
"csvtojson": "2.0.10",
"deepmerge": "^4.2.2",
"joi": "17.6.0",
"lodash": "4.17.21",
"monaco-editor": "0.33.0",
"monaco-editor-webpack-plugin": "7.0.1",
"react-singleton-hook": "3.3.0"
},
"engines": {
"node": ">=12.x.x <=18.x.x",
"npm": ">=6.0.0"
},
"peerDependencies": {
"@strapi/strapi": "^4.0.0"
}
},
"node_modules/strapi-plugin-menus": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/strapi-plugin-menus/-/strapi-plugin-menus-1.2.1.tgz",
@ -15619,6 +15837,17 @@
"node": ">=8"
}
},
"node_modules/strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==",
"dependencies": {
"is-utf8": "^0.2.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",

@ -16,13 +16,15 @@
"dependencies": {
"@strapi/plugin-i18n": "4.5.4",
"@strapi/plugin-users-permissions": "4.5.4",
"@strapi/provider-email-nodemailer": "^4.5.6",
"@strapi/provider-email-nodemailer": "4.5.6",
"@strapi/strapi": "4.5.4",
"@strapi/utils": "^4.5.6",
"@strapi/utils": "4.5.6",
"better-sqlite3": "7.4.6",
"pg": "^8.8.0",
"strapi-plugin-menus": "^1.2.1",
"strapi-plugin-populate-deep": "^1.1.2"
"mysql": "2.18.1",
"pg": "8.8.0",
"strapi-plugin-import-export-entries": "1.18.0",
"strapi-plugin-menus": "1.2.1",
"strapi-plugin-populate-deep": "1.1.2"
},
"author": {
"name": "A Strapi developer"

@ -1,9 +1,12 @@
'use strict';
const MonacoWebackPlugin = require('monaco-editor-webpack-plugin');
/* eslint-disable no-unused-vars */
module.exports = (config, webpack) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
// Important: return the modified config
config.plugins.push(new MonacoWebackPlugin())
return config;
};

@ -11,7 +11,7 @@
"type": "string"
},
"metaDescription": {
"type": "string"
"type": "text"
},
"SharedImage": {
"displayName": "SharedImage",

@ -1,7 +1,7 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/server",
"compilerOptions": {
"outDir": "dist",
"outDir": "../../dist/apps/backend/dist",
"rootDir": "."
},
"include": [

@ -1,4 +0,0 @@
STRAPI_URL_API=http://127.0.0.1:1337/api
STRAPI_URL=http://127.0.0.1:1337/
NEXTAUTH_SECRET=<SECRET>
NEXTAUTH_URL=http://localhost:4200

@ -1,49 +0,0 @@
{
"extends": [
"plugin:@nrwl/nx/react-typescript",
"next",
"next/core-web-vitals",
"../../.eslintrc.json"
],
"ignorePatterns": [
"!**/*",
".next/**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@next/next/no-html-link-for-pages": [
"error",
"apps/client/pages"
]
}
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
],
"rules": {
"@next/next/no-html-link-for-pages": "off",
"@typescript-eslint/ban-ts-comment": "off"
},
"env": {
"jest": true
}
}

@ -1,7 +0,0 @@
export const environment = {
production: true,
strapi: {
apiUrl: 'http://localhost:1337/api',
url: 'http://localhost:1337'
}
};

@ -1,7 +0,0 @@
export const environment = {
production: false,
strapi: {
apiUrl: 'http://localhost:1337/api',
url: 'http://localhost:1337'
}
};

@ -1,69 +0,0 @@
{
"name": "client",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/client",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/next:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"root": "apps/client",
"outputPath": "dist/apps/client"
},
"configurations": {
"development": {
"fileReplacements": [
{
"replace": "apps/client/environments/environment.ts",
"with": "apps/client/environments/environment.prod.ts"
}
],
"outputPath": "apps/client"
},
"production": {}
}
},
"serve": {
"executor": "@nrwl/next:server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "client:build",
"dev": true
},
"configurations": {
"development": {
"buildTarget": "client:build:development",
"dev": true
},
"production": {
"buildTarget": "client:build:production",
"dev": false
}
}
},
"export": {
"executor": "@nrwl/next:export",
"options": {
"buildTarget": "client:build:production"
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/client/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/client/**/*.{ts,tsx,js,jsx}"]
}
}
},
"tags": []
}

@ -5,13 +5,6 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["src/plugins/index.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"no-undef": "off"
}
}
]
}

@ -1,19 +1,19 @@
{
"name": "client-e2e",
"name": "website-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/client-e2e/src",
"sourceRoot": "apps/website-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/client-e2e/cypress.config.ts",
"devServerTarget": "client:serve:development",
"cypressConfig": "apps/website-e2e/cypress.config.ts",
"devServerTarget": "website:serve:development",
"testingType": "e2e"
},
"configurations": {
"production": {
"devServerTarget": "client:serve:production"
"devServerTarget": "website:serve:production"
}
}
},
@ -21,10 +21,10 @@
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/client-e2e/**/*.{js,ts}"]
"lintFilePatterns": ["apps/website-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["client"]
"implicitDependencies": ["website"]
}

@ -1,6 +1,6 @@
import { getGreeting } from '../support/app.po';
describe('client', () => {
describe('website', () => {
beforeEach(() => cy.visit('/'));
it('should display welcome message', () => {
@ -8,6 +8,6 @@ describe('client', () => {
cy.login('my-email@something.com', 'myPassword');
// Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome client');
getGreeting().contains('Welcome website');
});
});

@ -0,0 +1,31 @@
{
"extends": [
"plugin:@nrwl/nx/react-typescript",
"next",
"next/core-web-vitals",
"../../.eslintrc.json"
],
"ignorePatterns": ["!**/*", ".next/**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@next/next/no-html-link-for-pages": ["error", "apps/website/pages"]
}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
],
"rules": {
"@next/next/no-html-link-for-pages": "off"
},
"env": {
"jest": true
}
}

@ -64,6 +64,7 @@
@media (min-width: 1024px) {
.app-container:not(.without-footer) {
.app-content {
padding-top: 135px;
min-height: calc(100vh - 181px);
}
}

@ -1,5 +1,10 @@
export default {
env: process.env.NODE_ENV,
export const config = {
env: {
STRAPI_URL_API: process.env.NX_STRAPI_URL_API,
STRAPI_URL: process.env.NX_STRAPI_URL,
NEXTAUTH_SECRET: process.env.NX_NEXTAUTH_SECRET,
NEXTAUTH_URL: process.env.NX_NEXTAUTH_URL,
},
mainApiEndpoint: 'https://conduit.productionready.io/api'
}

@ -0,0 +1,5 @@
export const environment = {
strapiUrl: 'http://127.0.0.1:1337/',
strapiApiUrl: 'http://127.0.0.1:1337/api',
nextAuthSecret: "yBNW1wrb9CgOvEfbX6EQCvCDqiMkRBZP"
}

@ -0,0 +1,5 @@
export const environment = {
strapiUrl: 'http://admin.mecp.nasercloud.fr/',
strapiApiUrl: 'http://admin.mecp.nasercloud.fr/api',
nextAuthSecret: "yBNW1wrb9CgOvEfbX6EQCvCDqiMkRBZP"
}

@ -0,0 +1,5 @@
export const environment = {
strapiUrl: 'http://admin.mecp.nasercloud.fr/',
strapiApiUrl: 'http://admin.mecp.nasercloud.fr/api',
nextAuthSecret: "yBNW1wrb9CgOvEfbX6EQCvCDqiMkRBZP"
}

@ -0,0 +1,5 @@
export const environment = {
strapiUrl: 'http://127.0.0.1:1337/',
strapiApiUrl: 'http://127.0.0.1:1337/api',
nextAuthSecret: "yBNW1wrb9CgOvEfbX6EQCvCDqiMkRBZP"
}

@ -1,11 +1,11 @@
/* eslint-disable */
export default {
displayName: 'client',
displayName: 'website',
preset: '../../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/apps/client',
coverageDirectory: '../../coverage/apps/website',
};

@ -1,7 +1,7 @@
import axios from "axios";
import * as _ from 'lodash';
import {environment} from "../environments/environments";
import {environment} from "../environments/environment";
export type Inputs = {
email: string,
@ -17,18 +17,18 @@ export const hasAvatar = (user) => {
}
export const getBackendImg = (imageUrl: string) => {
return `${environment.strapi.url}${imageUrl}`;
return `${environment.strapiUrl}${imageUrl}`;
}
export const signUpRequest = async (inputs: Inputs) => {
try {
const registerResponse = await axios.post(`${environment.strapi.apiUrl}/auth/local/register`, {
const registerResponse = await axios.post(`${environment.strapiApiUrl}/auth/local/register`, {
email: inputs.email,
password: inputs.password,
username: inputs.username,
newsletter: inputs.newsletter
});
return registerResponse && !registerResponse.data.error;
return registerResponse.data;
} catch (err) {
return Promise.reject('Internal error');
}

@ -1,7 +1,6 @@
import axios from 'axios';
import {signIn} from "next-auth/react";
const strapiUrl = process.env.STRAPI_URL_API;
import {config} from "../config";
export async function createJwtToken(email, password) {
return await signIn('credentials', {
@ -12,12 +11,12 @@ export async function createJwtToken(email, password) {
}
export async function signInStrapi({email, password}) {
const res = await axios.post(`${strapiUrl}/auth/local`, {
const res = await axios.post(`${(config.env as any).STRAPI_URL_API}/auth/local`, {
identifier: email,
password,
});
if (res && res.data) {
const user = await axios.get(`${strapiUrl}/users/${res.data.user.id}?populate=deep`);
const user = await axios.get(`${(config.env as any).STRAPI_URL_API}/users/${res.data.user.id}?populate=deep`);
if (user && user.data) {
res.data.user = {...res.data.user, ...user.data};
}

@ -1,16 +1,19 @@
//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withNx } = require('@nrwl/next/plugins/with-nx');
const {withNx} = require('./with-nx.js');
/**
* @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
output: 'standalone',
nx: {
// Set this to true if you would like to to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
svgr: false
},
};

@ -0,0 +1,14 @@
{
"name": "website",
"version": "0.0.1",
"dependencies": {
"@nrwl/next": "15.5.1",
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.8.4"
},
"scripts": {
"start": "next start"
}
}

@ -0,0 +1,13 @@
import {Head, Html, Main, NextScript} from 'next/document';
export default function Document() {
return (
<Html lang='en'>
<Head/>
<body>
<Main/>
<NextScript/>
</body>
</Html>
)
};

@ -4,8 +4,10 @@ import {JWT} from "next-auth/jwt";
import {AdapterUser} from "next-auth/adapters";
import {signInStrapi} from '../../../libs/auth';
import {environment} from "../../../environments/environment";
export default NextAuth({
// Configure one or more authentication providers
providers: [
CredentialsProvider({
@ -59,4 +61,5 @@ export default NextAuth({
return Promise.resolve(token);
},
},
secret: environment.nextAuthSecret
});

@ -3,12 +3,23 @@ import delve from "dlv";
import SeoConfig from "../../components/seo-config/seo-config";
import Layout from "../../components/layout/layout";
import {config} from "../../config";
import {environment} from "../../environments/environment";
const getPageMetadata = async (path) => {
try {
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuHeader = await axios.get(`${process.env.STRAPI_URL_API}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${process.env.STRAPI_URL_API}/menus/2?nested&populate=deep`);
const page = await axios.get(`${process.env.STRAPI_URL_API}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
menuHeader: delve(menuHeader, 'data.data.attributes.items.data', []),

@ -0,0 +1,6 @@
@import 'tailwindcss/base.css';
@import 'tailwindcss/components.css';
@import 'tailwindcss/utilities.css';
.page {
}

@ -4,12 +4,25 @@ import delve from "dlv";
import SeoConfig from "../components/seo-config/seo-config";
import Layout from "../components/layout/layout";
import {config} from "../config";
import {environment} from "../environments/environment";
const getPageMetadata = async (path) => {
try {
console.log((config.env as any));
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuHeader = await axios.get(`${process.env.STRAPI_URL_API}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${process.env.STRAPI_URL_API}/menus/2?nested&populate=deep`);
const page = await axios.get(`${process.env.STRAPI_URL_API}/pages?filters[slug]=${path === '/' ? 'home' : path}&populate=deep`);
console.log((config.env as any));
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
menuHeader: delve(menuHeader, 'data.data.attributes.items.data', []),

@ -0,0 +1,7 @@
/*
* Replace this with your own classes
*
* e.g.
* .container {
* }
*/

@ -0,0 +1,58 @@
import axios from "axios";
import delve from "dlv";
import SeoConfig from "../../components/seo-config/seo-config";
import Layout from "../../components/layout/layout";
import styles from "../sign-up/index.module.scss";
import {config} from "../../config";
import {environment} from "../../environments/environment";
const getPageMetadata = async (path) => {
try {
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
menuHeaders: delve(menuHeader, 'data.data.attributes.items.data', []),
menuFooter: delve(menuFooter, 'data.data.attributes.items.data', []),
page: delve(page, "data.data.0.attributes", {}),
seo: delve(page, "data.data.0.attributes.seo", {})
}
}
}
export function LostPassword({menuHeaders, menuFooter, page, seo}) {
return (
<>
<SeoConfig {...seo}/>
<Layout menuHeader={menuHeaders} menuFooter={menuFooter}>
<div className={styles['page-sign-up']}>
<section className={styles['section']}>
<div className="container px-6 py-4 md:py-12 h-full mx-auto">
<div className="flex justify-center items-center flex-wrap h-full g-6 text-gray-800">
<div className="md:w-8/12 lg:w-6/12">
<p>Form here</p>
</div>
<div className="md:w-8/12 lg:w-6/12 mb-12 md:mb-0 hidden md:block">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-login-form/draw2.png"
className="w-full" alt="Phone image"/>
</div>
</div>
</div>
</section>
</div>
</Layout>
</>
);
}
export default LostPassword;

@ -7,11 +7,22 @@ import Layout from "../../components/layout/layout";
import styles from './index.module.scss';
import {createJwtToken} from "../../libs/auth";
import {config} from "../../config";
import {environment} from "../../environments/environment";
const getPageMetadata = async (path) => {
try {
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuFooter = await axios.get(`${process.env.STRAPI_URL_API}/menus/2?nested&populate=deep`);
const page = await axios.get(`${process.env.STRAPI_URL_API}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
@ -95,7 +106,7 @@ export function SignIn({seo, menuFooter}) {
Rester connecté ?
</label>
</div>
<a href=""
<a href="/lost-password"
className="text-blue-600 hover:text-blue-700 focus:text-blue-700 active:text-blue-800 duration-200 transition ease-in-out text-sm">
Mot de passe oublié ?
</a>

@ -8,7 +8,7 @@
.page-sign-up {
.section {
min-height: 70vh;
min-height: 63vh;
justify-content: center;
display: flex;
align-items: center;

@ -3,19 +3,30 @@ import axios from "axios";
import delve from 'dlv';
import {useRouter} from "next/router";
import {SubmitHandler, useForm} from 'react-hook-form';
import {BehaviorSubject, catchError, debounceTime, distinctUntilChanged, filter, map, of, switchMap} from "rxjs";
import {useEffect, useState} from "react";
import SeoConfig from "../../components/seo-config/seo-config";
import Layout from "../../components/layout/layout";
import {Inputs, signUpRequest} from "../../libs/api";
import {createJwtToken} from "../../libs/auth";
import {useEffect, useState} from "react";
import {BehaviorSubject, debounceTime, distinctUntilChanged, filter, map, switchMap} from "rxjs";
import {config} from "../../config";
import {environment} from "../../environments/environment";
const getPageMetadata = async (path) => {
try {
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuHeader = await axios.get(`${process.env.STRAPI_URL_API}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${process.env.STRAPI_URL_API}/menus/2?nested&populate=deep`);
const page = await axios.get(`${process.env.STRAPI_URL_API}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
@ -61,17 +72,27 @@ export function SignUp({seo, menuHeaders, menuFooter}) {
clearErrors('email');
}
}),
catchError((err) => of(false))
).subscribe(() => setSpinner(false));
}
}, [subject]);
const onSubmit: SubmitHandler<Inputs> = async (data: Inputs) => {
try {
await signUpRequest(data);
const result = await createJwtToken(data.email, data.password);
if (result.ok) {
await router.replace('/');
return;
const response = await signUpRequest(data);
if (response && response.user) {
if (response.user.confirmed) {
const result = await createJwtToken(data.email, data.password);
if (result.ok) {
await router.replace('/');
return;
}
} else {
await router.push('/signup-confirmation')
return;
}
} else {
throw new Error('no registered');
}
} catch (e) {
console.error(e);

@ -0,0 +1,7 @@
/*
* Replace this with your own classes
*
* e.g.
* .container {
* }
*/

@ -0,0 +1,44 @@
import axios from "axios";
import delve from 'dlv';
import SeoConfig from "../../components/seo-config/seo-config";
import Layout from "../../components/layout/layout";
import {config} from "../../config";
import {environment} from "../../environments/environment";
const getPageMetadata = async (path) => {
try {
return await axios.get(`${environment.strapiApiUrl}/pages?filters[slug]=${path === '/' ? 'home' : path.slice(1, path.length)}&populate=deep`);
} catch (e) {
console.error(e);
return Promise.resolve({})
}
}
export const getServerSideProps = async (context) => {
const path = context.resolvedUrl;
const menuHeader = await axios.get(`${environment.strapiApiUrl}/menus/1?nested&populate=deep`);
const menuFooter = await axios.get(`${environment.strapiApiUrl}/menus/2?nested&populate=deep`);
const page = await getPageMetadata(path);
return {
props: {
menuHeader: delve(menuHeader, 'data.data.attributes.items.data', []),
menuFooter: delve(menuFooter, 'data.data.attributes.items.data', []),
page: delve(page, "data.data.0.attributes", {}),
seo: delve(page, "data.data.0.attributes.seo", {})
}
}
}
export function SignupConfirmation({menuHeader, menuFooter, page, seo}) {
return (
<>
<SeoConfig {...seo}/>
<Layout menuHeader={menuHeader} menuFooter={menuFooter}>
<p>Page d&apos;accueil</p>
</Layout>
</>
);
}
export default SignupConfirmation;

@ -1,7 +1,6 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import 'tailwindcss/base.css';
@import 'tailwindcss/components.css';
@import 'tailwindcss/utilities.css';
html, body {
position: relative;

@ -1,4 +1,4 @@
const { join } = require('path');
const {join} = require('path');
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build
// option from your application's configuration (i.e. project.json).
@ -7,6 +7,8 @@ const { join } = require('path');
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {
config: join(__dirname, 'tailwind.config.js'),
},

@ -0,0 +1,96 @@
{
"name": "website",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/website",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/next:build",
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "development",
"options": {
"root": "apps/website",
"outputPath": "dist/apps/website"
},
"configurations": {
"development": {
"fileReplacements": [
{
"replace": "apps/website/environments/environment.ts",
"with": "apps/website/environments/environment.development.ts"
}
],
"outputPath": "apps/website"
},
"staging": {
"fileReplacements": [
{
"replace": "apps/website/environments/environment.ts",
"with": "apps/website/environments/environment.staging.ts"
}
]
},
"production": {
"fileReplacements": [
{
"replace": "apps/website/environments/environment.ts",
"with": "apps/website/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"executor": "@nrwl/next:server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "website:build",
"dev": true
},
"configurations": {
"development": {
"buildTarget": "website:build:development",
"dev": true
},
"staging": {
"buildTarget": "website:build:staging",
"dev": false
},
"production": {
"buildTarget": "website:build:production",
"dev": false
}
}
},
"export": {
"executor": "@nrwl/next:export",
"options": {
"buildTarget": "website:build:production"
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "apps/website/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": [
"apps/website/**/*.{ts,tsx,js,jsx}"
]
}
}
},
"tags": []
}

@ -14,4 +14,5 @@ module.exports = {
extend: {},
},
plugins: [],
darkMode: 'class'
};

@ -0,0 +1,176 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withNx = void 0;
const tslib_1 = require("tslib");
function regexEqual(x, y) {
return (x instanceof RegExp &&
y instanceof RegExp &&
x.source === y.source &&
x.global === y.global &&
x.ignoreCase === y.ignoreCase &&
x.multiline === y.multiline);
}
/**
* Do not remove or rename this function. Production builds inline `with-nx.js` file with a replacement
* To this function that hard-codes the libsDir.
*/
function getWithNxContext() {
return {
workspaceRoot: '/Users/snaser/Projets/nx-guitar-school',
libsDir: 'libs'
}
}
function withNx(nextConfig = {}, context = getWithNxContext()) {
var _a;
// If `next-compose-plugins` is used, the context argument is invalid.
if (!context.libsDir || !context.workspaceRoot) {
context = getWithNxContext();
}
const userWebpack = nextConfig.webpack || ((x) => x);
const { nx } = nextConfig, validNextConfig = tslib_1.__rest(nextConfig, ["nx"]);
return Object.assign(Object.assign({ eslint: Object.assign({ ignoreDuringBuilds: true }, ((_a = validNextConfig.eslint) !== null && _a !== void 0 ? _a : {})) }, validNextConfig), { webpack: (config, options) => {
/*
* Update babel to support our monorepo setup.
* The 'upward' mode allows the root babel.config.json and per-project .babelrc files to be picked up.
*/
options.defaultLoaders.babel.options.babelrc = true;
options.defaultLoaders.babel.options.rootMode = 'upward';
/*
* Modify the Next.js webpack config to allow workspace libs to use css modules.
* Note: This would be easier if Next.js exposes css-loader and sass-loader on `defaultLoaders`.
*/
// Include workspace libs in css/sass loaders
const includes = [
require('path').join(context.workspaceRoot, context.libsDir),
];
const nextCssLoaders = config.module.rules.find((rule) => typeof rule.oneOf === 'object');
// webpack config is not as expected
if (!nextCssLoaders)
return config;
/*
* 1. Modify css loader to enable module support for workspace libs
*/
const nextCssLoader = nextCssLoaders.oneOf.find((rule) => rule.sideEffects === false && regexEqual(rule.test, /\.module\.css$/));
// Might not be found if Next.js webpack config changes in the future
if (nextCssLoader && nextCssLoader.issuer) {
nextCssLoader.issuer.or = nextCssLoader.issuer.and
? nextCssLoader.issuer.and.concat(includes)
: includes;
delete nextCssLoader.issuer.and;
}
/*
* 2. Modify sass loader to enable module support for workspace libs
*/
const nextSassLoader = nextCssLoaders.oneOf.find((rule) => rule.sideEffects === false &&
regexEqual(rule.test, /\.module\.(scss|sass)$/));
// Might not be found if Next.js webpack config changes in the future
if (nextSassLoader && nextSassLoader.issuer) {
nextSassLoader.issuer.or = nextSassLoader.issuer.and
? nextSassLoader.issuer.and.concat(includes)
: includes;
delete nextSassLoader.issuer.and;
}
/*
* 3. Modify error loader to ignore css modules used by workspace libs
*/
const nextErrorCssModuleLoader = nextCssLoaders.oneOf.find((rule) => rule.use &&
rule.use.loader === 'error-loader' &&
rule.use.options &&
(rule.use.options.reason ===
'CSS Modules \u001b[1mcannot\u001b[22m be imported from within \u001b[1mnode_modules\u001b[22m.\n' +
'Read more: https://err.sh/next.js/css-modules-npm' ||
rule.use.options.reason ===
'CSS Modules cannot be imported from within node_modules.\nRead more: https://err.sh/next.js/css-modules-npm'));
// Might not be found if Next.js webpack config changes in the future
if (nextErrorCssModuleLoader) {
nextErrorCssModuleLoader.exclude = includes;
}
/**
* 4. Modify css loader to allow global css from node_modules to be imported from workspace libs
*/
const nextGlobalCssLoader = nextCssLoaders.oneOf.find((rule) => {
var _a, _b;
return (_b = (_a = rule.include) === null || _a === void 0 ? void 0 : _a.and) === null || _b === void 0 ? void 0 : _b.find((include) => regexEqual(include, /node_modules/));
});
// Might not be found if Next.js webpack config changes in the future
if (nextGlobalCssLoader && nextGlobalCssLoader.issuer) {
nextGlobalCssLoader.issuer.or = nextGlobalCssLoader.issuer.and
? nextGlobalCssLoader.issuer.and.concat(includes)
: includes;
delete nextGlobalCssLoader.issuer.and;
}
/**
* 5. Add env variables prefixed with NX_
*/
addNxEnvVariables(config);
/**
* 6. Add SVGR support if option is on.
*/
// Default SVGR support to be on for projects.
if ((nx === null || nx === void 0 ? void 0 : nx.svgr) !== false) {
config.module.rules.push({
test: /\.svg$/,
oneOf: [
// If coming from JS/TS file, then transform into React component using SVGR.
{
issuer: /\.[jt]sx?$/,
use: [
{
loader: require.resolve('@svgr/webpack'),
options: {
svgo: false,
titleProp: true,
ref: true,
},
},
{
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: '[name].[hash:7].[ext]',
},
},
],
},
// Fallback to plain URL loader if someone just imports the SVG and references it on the <img src> tag
{
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: '[name].[hash:7].[ext]',
},
},
],
});
}
return userWebpack(config, options);
} });
}
exports.withNx = withNx;
function getNxEnvironmentVariables() {
return Object.keys(process.env)
.filter((env) => /^NX_/i.test(env))
.reduce((env, key) => {
env[key] = process.env[key];
return env;
}, {});
}
function addNxEnvVariables(config) {
var _a;
const maybeDefinePlugin = (_a = config.plugins) === null || _a === void 0 ? void 0 : _a.find((plugin) => {
var _a;
return (_a = plugin.definitions) === null || _a === void 0 ? void 0 : _a['process.env.NODE_ENV'];
});
if (maybeDefinePlugin) {
const env = getNxEnvironmentVariables();
Object.entries(env)
.map(([name, value]) => [`process.env.${name}`, `"${value}"`])
.filter(([name]) => !maybeDefinePlugin.definitions[name])
.forEach(([name, value]) => (maybeDefinePlugin.definitions[name] = value));
}
}
// Support for older generated code: `const withNx = require('@nrwl/next/plugins/with-nx');`
module.exports = withNx;
// Support for newer generated code: `const { withNx } = require(...);`
module.exports.withNx = withNx;
//# sourceMappingURL=with-nx.js.map

@ -1,10 +1,16 @@
services:
# PostgreSQL (Database)
gs_postgres:
#gs_postgres:
# extends:
# file: apps/backend/postgres.yml
# service: gs_postgres
# MySQL (Database)
gs_mysql:
extends:
file: apps/backend/postgres.yml
service: gs_postgres
file: apps/backend/mysql.yml
service: gs_mysql
gs_redis:
image: "redis:alpine"
@ -23,3 +29,5 @@ services:
volumes:
gs_postgres-master:
driver: local
gs_mariadb-master:
driver: local

File diff suppressed because one or more lines are too long

607
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -3,13 +3,22 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start:docker": "env $(cat apps/backend/.env) docker-compose up -d",
"start:docker": "env $(cat apps/backend/.env) docker-compose up -d --force-recreate",
"install:backend": "cd apps/backend && npm install",
"generate:backend": "cd apps/backend && npm run generate",
"build:backend": "cd apps/backend && npm run build",
"build:backend:staging": "cd apps/backend && npm run build",
"postbuild:backend:staging": "node scripts/strapi/build-staging.js",
"predevelop:backend": "npm run start:docker && npm run build:backend",
"develop:backend": "cd apps/backend && npm run develop",
"start:client": "nx serve client",
"build:client:development": "npm run build client -- --configuration development --verbose",
"build:client:staging": "npm run build client -- --configuration staging",
"build:client:production": "npm run build client -- --configuration production",
"start:website": "nx serve website",
"build:website:development": "nx build website --configuration development --verbose",
"build:website:staging": "nx build website --configuration staging",
"build:website:production": "nx build website --configuration production",
"start": "nx serve",
"build": "nx build",
"test": "nx test"
@ -44,7 +53,7 @@
"@nx-extend/strapi": "^3.2.0",
"@testing-library/react": "13.4.0",
"@types/jest": "28.1.1",
"@types/node": "16.11.7",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@typescript-eslint/eslint-plugin": "^5.36.1",

@ -0,0 +1,9 @@
const fs = require('fs');
const fse = require('fs-extra');
const path = require('path');
fse.copySync(path.join(__dirname, '..', '..', 'apps/backend/public'), path.join(__dirname, '..', '..', 'dist', 'apps', 'backend/public'));
fs.copyFileSync(path.join(__dirname, '..', '..', 'apps/backend/.env.staging'), path.join(__dirname, '..', '..', 'dist', 'apps', 'backend/.env'));
fs.copyFileSync(path.join(__dirname, 'sources/server.js'), path.join(__dirname, '..', '..', 'dist', 'apps', 'backend/server.js'));
fs.copyFileSync(path.join(__dirname, 'sources/package.json'), path.join(__dirname, '..', '..', 'dist', 'apps', 'backend/package.json'));
fs.copyFileSync(path.join(__dirname, 'sources/.strapi-updater.json'), path.join(__dirname, '..', '..', 'dist', 'apps', 'backend/.strapi-updater.json'));

@ -0,0 +1,4 @@
{
"latest": "4.5.6",
"lastUpdateCheck": 1674315789881
}

@ -0,0 +1,31 @@
{
"name": "nx-guitar-school",
"version": "0.0.0",
"overrides": {
"@strapi/strapi": "4.5.4"
},
"dependencies": {
"@strapi/plugin-i18n": "4.5.4",
"@strapi/plugin-users-permissions": "4.5.4",
"@strapi/provider-email-nodemailer": "4.5.6",
"@strapi/strapi": "4.5.4",
"@strapi/utils": "4.5.6",
"better-sqlite3": "7.4.6",
"mysql": "2.18.1",
"pg": "8.8.0",
"strapi-plugin-import-export-entries": "1.18.0",
"strapi-plugin-menus": "1.2.1",
"strapi-plugin-populate-deep": "1.1.2"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "d1de7a93-c68b-4597-80ee-b5b56ea4eb10"
},
"engines": {
"node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}

@ -0,0 +1,3 @@
const strapi = require('@strapi/strapi');
const app = strapi({distDir: './dist'});
app.start();

@ -0,0 +1,5 @@
const fs = require('fs');
const fse = require('fs-extra');
const path = require('path');
fs.copyFileSync(path.join(__dirname, 'sources/server.js'), path.join(__dirname, '..', '..', 'dist/apps/website/server.js'));

@ -0,0 +1,8 @@
const path = require('path');
const nextPath = path.join(__dirname, 'node_modules', '.bin', 'next');
process.argv.length = 1;
process.argv.push(nextPath, 'start');
require(nextPath);
Loading…
Cancel
Save