commit
fa3ddac572
@ -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
|
||||||
@ -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
|
||||||
@ -1,9 +1,12 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
const MonacoWebackPlugin = require('monaco-editor-webpack-plugin');
|
||||||
|
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
module.exports = (config, webpack) => {
|
module.exports = (config, webpack) => {
|
||||||
// Note: we provide webpack above so you should not `require` it
|
// Note: we provide webpack above so you should not `require` it
|
||||||
// Perform customizations to webpack config
|
// Perform customizations to webpack config
|
||||||
// Important: return the modified config
|
// Important: return the modified config
|
||||||
|
|
||||||
|
config.plugins.push(new MonacoWebackPlugin())
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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,2 +0,0 @@
|
|||||||
.page {
|
|
||||||
}
|
|
||||||
@ -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": []
|
|
||||||
}
|
|
||||||
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,10 @@
|
|||||||
export default {
|
export const config = {
|
||||||
env: process.env.NODE_ENV,
|
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'
|
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 */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
displayName: 'client',
|
displayName: 'website',
|
||||||
preset: '../../jest.preset.js',
|
preset: '../../jest.preset.js',
|
||||||
transform: {
|
transform: {
|
||||||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
|
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
|
||||||
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
|
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
|
||||||
},
|
},
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||||
coverageDirectory: '../../coverage/apps/client',
|
coverageDirectory: '../../coverage/apps/website',
|
||||||
};
|
};
|
||||||
@ -1,16 +1,19 @@
|
|||||||
//@ts-check
|
//@ts-check
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// 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}
|
* @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
|
||||||
**/
|
**/
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
reactStrictMode: true,
|
||||||
|
poweredByHeader: false,
|
||||||
|
output: 'standalone',
|
||||||
nx: {
|
nx: {
|
||||||
// Set this to true if you would like to to use SVGR
|
// Set this to true if you would like to to use SVGR
|
||||||
// See: https://github.com/gregberge/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>
|
||||||
|
)
|
||||||
|
};
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
@import 'tailwindcss/base.css';
|
||||||
|
@import 'tailwindcss/components.css';
|
||||||
|
@import 'tailwindcss/utilities.css';
|
||||||
|
|
||||||
|
.page {
|
||||||
|
}
|
||||||
@ -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;
|
||||||
@ -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'accueil</p>
|
||||||
|
</Layout>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SignupConfirmation;
|
||||||
@ -1,7 +1,6 @@
|
|||||||
@tailwind base;
|
@import 'tailwindcss/base.css';
|
||||||
@tailwind components;
|
@import 'tailwindcss/components.css';
|
||||||
@tailwind utilities;
|
@import 'tailwindcss/utilities.css';
|
||||||
|
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -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": []
|
||||||
|
}
|
||||||
@ -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
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -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…
Reference in new issue