Skip to content
Extraits de code Groupes Projets
Valider 58fdf616 rédigé par souhail.elmahdani's avatar souhail.elmahdani
Parcourir les fichiers

Initial commit

parent
Branches
1 requête de fusion!1Resolve HIR-8 "Feature/HIR-8"
Affichage de
avec 567 ajouts et 0 suppression
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
root = true
[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
# Build directories
build/*
dist/*
public/*
**/out/*
**/.next/*
**/node_modules/*
# src/
**/reportWebVitals.*
**/service-worker.*
**/serviceWorkerRegistration.*
**/setupTests.*
# eslintrc
**/.eslintrc.*
# prettier
**/.prettier.*
**/prettier.config.*
# next
**/next.config.*
# vite
**/vite.config.*
# tailwind
**/postcss.config.*
**/tailwind.config.*
# craco
**/craco.config.*
# misc
**/jsconfig.json
/**
* @type {import('eslint').ESLint.ConfigData}
*/
module.exports = {
root: true,
env: { browser: true, es2020: true },
plugins: ['perfectionist', 'unused-imports', '@typescript-eslint', 'prettier'],
extends: ['airbnb', 'airbnb-typescript', 'airbnb/hooks', 'prettier'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
project: './tsconfig.json',
},
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
},
/**
* 0 ~ 'off'
* 1 ~ 'warn'
* 2 ~ 'error'
*/
rules: {
// general
'no-alert': 0,
camelcase: 0,
'no-console': 0,
'no-unused-vars': 0,
'no-nested-ternary': 0,
'no-param-reassign': 0,
'no-underscore-dangle': 0,
'no-restricted-exports': 0,
'no-promise-executor-return': 0,
'import/prefer-default-export': 0,
'prefer-destructuring': [1, { object: true, array: false }],
// typescript
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/consistent-type-exports': 1,
'@typescript-eslint/consistent-type-imports': 1,
'@typescript-eslint/no-unused-vars': [1, { args: 'none' }],
// react
'react/no-children-prop': 0,
'react/react-in-jsx-scope': 0,
'react/no-array-index-key': 0,
'react/require-default-props': 0,
'react/jsx-props-no-spreading': 0,
'react/function-component-definition': 0,
'react/jsx-no-useless-fragment': [1, { allowExpressions: true }],
'react/no-unstable-nested-components': [1, { allowAsProps: true }],
'react/jsx-no-duplicate-props': [1, { ignoreCase: false }],
// jsx-a11y
'jsx-a11y/anchor-is-valid': 0,
'jsx-a11y/control-has-associated-label': 0,
// unused imports
'unused-imports/no-unused-imports': 1,
'unused-imports/no-unused-vars': [
0,
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
],
// perfectionist
'perfectionist/sort-exports': [1, { order: 'asc', type: 'line-length' }],
'perfectionist/sort-named-imports': [1, { order: 'asc', type: 'line-length' }],
'perfectionist/sort-named-exports': [1, { order: 'asc', type: 'line-length' }],
'perfectionist/sort-imports': [
1,
{
order: 'asc',
type: 'line-length',
'newlines-between': 'always',
groups: [
'style',
'type',
['builtin', 'external'],
'custom-mui',
'custom-routes',
'custom-hooks',
'custom-utils',
'internal',
'custom-components',
'custom-sections',
'custom-auth',
'custom-types',
['parent', 'sibling', 'index'],
['parent-type', 'sibling-type', 'index-type'],
'object',
'unknown',
],
'custom-groups': {
value: {
['custom-mui']: '@mui/**',
['custom-auth']: 'src/auth/**',
['custom-hooks']: 'src/hooks/**',
['custom-utils']: 'src/utils/**',
['custom-types']: 'src/types/**',
['custom-routes']: 'src/routes/**',
['custom-sections']: 'src/shared/sections/**',
['custom-components']: 'src/shared/components/**',
},
},
'internal-pattern': ['src/**'],
},
],
},
};
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# production
.next
.swc
_static
out
dist
build
# environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# misc
.DS_Store
.vercel
.netlify
.vscode
.eslintcache
.unimportedrc.json
tsconfig.tsbuildinfo
stages:
- build
- deploy
- notify_discord
build_test:
stage: build
image: node:20
script:
- npm install
- npm run build
only:
- merge_requests
deploy:
stage: deploy
image: docker:20.10.16
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa_gitlab_nopass_mc_vps
- chmod 600 ~/.ssh/id_rsa_gitlab_nopass_mc_vps
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/id_rsa_gitlab_nopass_mc_vps
- ssh-keyscan ${PLESK_HOST_REC} >> ~/.ssh/known_hosts
- docker info
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- echo "Building Docker image..."
- docker build -t ${DOCKER_IMAGE_PATH}:rec .
- docker push ${DOCKER_IMAGE_PATH}:rec
- echo "Creating directory on VPS if it doesn't exist..."
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa_gitlab_nopass_mc_vps ${PLESK_USER}@${PLESK_HOST_REC} "mkdir -p /projects/${CONTAINER_NAME}/"
- echo "Transferring docker-compose.yml and .env files to VPS..."
- scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa_gitlab_nopass_mc_vps docker-compose.yml ${PLESK_USER}@${PLESK_HOST_REC}:/projects/${CONTAINER_NAME}/docker-compose.yml
- scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa_gitlab_nopass_mc_vps .env ${PLESK_USER}@${PLESK_HOST_REC}:/projects/${CONTAINER_NAME}/.env
- echo -e "DOCKER_IMAGE_PATH=${DOCKER_IMAGE_PATH}\nCONTAINER_NAME=${CONTAINER_NAME}\nHOST_PORT=${HOST_PORT}\nCONTAINER_PORT=${CONTAINER_PORT}" > .env.rec
- scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa_gitlab_nopass_mc_vps .env.rec ${PLESK_USER}@${PLESK_HOST_REC}:/projects/${CONTAINER_NAME}/.env.rec
- echo "Deploying Docker image to VPS..."
- |
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa_gitlab_nopass_mc_vps ${PLESK_USER}@${PLESK_HOST_REC} "
cd /projects/${CONTAINER_NAME}/
echo '$DOCKER_PASSWORD' | docker login -u '$DOCKER_USERNAME' --password-stdin
docker-compose down
docker rm -f ${CONTAINER_NAME} || true
cat .env.rec >> .env
docker-compose pull
docker-compose up -d
"
only:
- develop
notify_discord:
stage: notify_discord
script:
- |
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"content": ":rocket: **New Release Deployed to Sandbox!** :rocket:\n\n**Project:** `'${CONTAINER_NAME}'`\n**URL:** '${RECIPE_URL}'\n\nThe new version has been successfully deployed to the sandbox environment. Click [here]('${RECIPE_URL}') to access it! :sparkles:"
}' \
"${DISCORD_SANDBOX_WEBHOOK_URL}"
only:
- develop
when: on_success
# Build directories
build/*
dist/*
public/*
**/out/*
**/.next/*
**/node_modules/*
yarn.lock
package-lock.json
jsconfig.json
FROM node:20
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3001
CMD ["npm", "start"]
## Prerequisites
- Node.js 20.x (Recommended)
## Installation
**Using Yarn (Recommended)**
```sh
yarn install
yarn dev
```
**Using Npm**
```sh
npm i
npm run dev
```
## Build
```sh
yarn build
# or
npm run build
```
## Mock server
By default we provide demo data from : `https://api-dev-minimal-[version].vercel.app`
To set up your local server:
- **Guide:** [https://docs.minimals.cc/mock-server](https://docs.minimals.cc/mock-server).
- **Resource:** [Download](https://www.dropbox.com/sh/6ojn099upi105tf/AACpmlqrNUacwbBfVdtt2t6va?dl=0).
## Full version
- Create React App ([migrate to CRA](https://docs.minimals.cc/migrate-to-cra/)).
- Next.js
- Vite.js
## Starter version
- To remove unnecessary components. This is a simplified version ([https://starter.minimals.cc/](https://starter.minimals.cc/))
- Good to start a new project. You can copy components from the full version.
- Make sure to install the dependencies exactly as compared to the full version.
---
**NOTE:**
_When copying folders remember to also copy hidden files like .env. This is important because .env files often contain environment variables that are crucial for the application to run correctly._
version: '3.8'
services:
app:
image: ${DOCKER_IMAGE_PATH}:rec
container_name: ${CONTAINER_NAME}
restart: always
ports:
- '127.0.0.1:${HOST_PORT}:${CONTAINER_PORT}'
environment:
- PORT=${CONTAINER_PORT}
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
/**
* @type {import('next').NextConfig}
*/
const isStaticExport = 'false';
const nextConfig = {
trailingSlash: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
env: {
BUILD_STATIC_EXPORT: isStaticExport,
},
modularizeImports: {
'@mui/icons-material': {
transform: '@mui/icons-material/{{member}}',
},
'@mui/material': {
transform: '@mui/material/{{member}}',
},
'@mui/lab': {
transform: '@mui/lab/{{member}}',
},
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
...(isStaticExport === 'true' && {
output: 'export',
}),
};
export default nextConfig;
Ce diff est replié.
{
"name": "hire3-front",
"author": "Marketing Confort",
"version": "6.0.1",
"description": "",
"private": true,
"scripts": {
"dev": "next dev -p 3001",
"start": "next start -p 3001",
"build": "next build",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
"fm:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
"fm:fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"rm:all": "rm -rf node_modules .next out dist build",
"re:start": "yarn rm:all && yarn install && yarn dev",
"re:build": "yarn rm:all && yarn install && yarn build",
"re:build-npm": "npm run rm:all && npm install && npm run build",
"dev:ts": "yarn dev & yarn ts:watch",
"ts": "tsc --noEmit --incremental",
"ts:watch": "yarn ts --watch",
"start:out": "npx serve@latest out -p 3001"
},
"dependencies": {
"@auth0/auth0-react": "^2.2.4",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fontsource/barlow": "^5.0.13",
"@fontsource/dm-sans": "^5.0.21",
"@fontsource/inter": "^5.0.18",
"@fontsource/nunito-sans": "^5.0.13",
"@fontsource/public-sans": "^5.0.18",
"@fullcalendar/core": "^6.1.14",
"@fullcalendar/daygrid": "^6.1.14",
"@fullcalendar/interaction": "^6.1.14",
"@fullcalendar/list": "^6.1.14",
"@fullcalendar/react": "^6.1.14",
"@fullcalendar/timegrid": "^6.1.14",
"@fullcalendar/timeline": "^6.1.14",
"@hookform/resolvers": "^3.6.0",
"@iconify/react": "^5.0.1",
"@mui/lab": "^5.0.0-alpha.170",
"@mui/material": "^5.15.20",
"@mui/material-nextjs": "^5.15.11",
"@mui/x-data-grid": "^7.7.0",
"@mui/x-date-pickers": "^7.7.0",
"@mui/x-tree-view": "^7.7.0",
"@react-pdf/renderer": "^3.4.4",
"@supabase/supabase-js": "^2.43.4",
"@tiptap/core": "^2.4.0",
"@tiptap/extension-code-block": "^2.4.0",
"@tiptap/extension-code-block-lowlight": "^2.4.0",
"@tiptap/extension-image": "^2.4.0",
"@tiptap/extension-link": "^2.4.0",
"@tiptap/extension-placeholder": "^2.4.0",
"@tiptap/extension-text-align": "^2.4.0",
"@tiptap/pm": "^2.4.0",
"@tiptap/react": "^2.4.0",
"@tiptap/starter-kit": "^2.4.0",
"apexcharts": "^3.49.1",
"autosuggest-highlight": "^3.3.4",
"aws-amplify": "^6.3.6",
"axios": "^1.7.2",
"dayjs": "^1.11.11",
"embla-carousel": "^8.1.5",
"embla-carousel-auto-height": "^8.1.5",
"embla-carousel-auto-scroll": "^8.1.5",
"embla-carousel-autoplay": "^8.1.5",
"embla-carousel-react": "^8.1.5",
"firebase": "^10.12.2",
"framer-motion": "^11.2.10",
"i18next": "^23.11.5",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-resources-to-backend": "^1.2.1",
"lowlight": "^3.1.0",
"mapbox-gl": "^3.4.0",
"mui-one-time-password-input": "^2.0.2",
"next": "^14.2.4",
"nprogress": "^0.2.0",
"react": "^18.3.1",
"react-apexcharts": "^1.4.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.51.5",
"react-i18next": "^14.1.2",
"react-joyride": "^2.8.2",
"react-lazy-load-image-component": "^1.6.0",
"react-map-gl": "^7.1.7",
"react-markdown": "^9.0.1",
"react-organizational-chart": "^2.2.1",
"react-phone-number-input": "^3.4.3",
"rehype-highlight": "^7.0.0",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.0",
"simplebar-react": "^3.2.5",
"sonner": "^1.5.0",
"stylis": "^4.3.2",
"stylis-plugin-rtl": "^2.1.1",
"swr": "^2.2.5",
"turndown": "^7.2.0",
"yet-another-react-lightbox": "^3.20.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@types/autosuggest-highlight": "^3.2.3",
"@types/node": "^20.14.2",
"@types/nprogress": "^0.2.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/stylis": "^4.2.6",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-perfectionist": "^2.11.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unused-imports": "^3.2.0",
"prettier": "^3.3.2",
"typescript": "^5.4.5"
}
}
/**
* @type {import("prettier").Config}
* Need to restart IDE when changing configuration
* Open the command palette (Ctrl + Shift + P) and execute the command > Reload Window.
*/
const config = {
semi: true,
tabWidth: 2,
endOfLine: 'lf',
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
};
export default config;
public/assets/background/background-3-blur.webp

9,71 ko

public/assets/background/background-3.webp

14,8 ko

public/assets/background/background-4.jpg

5,63 ko

public/assets/background/background-5.webp

33,4 ko

public/assets/background/background-6.webp

19,1 ko

0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter