feat: review backend and frontend

- update to the latest version of Java/SpringBoot
- update to the latest version NuxtJS
- add account/password update
- add account creation
- add account password reset
- add bundle to regroup questions and add default questions on user creation
- add bundle creation
This commit is contained in:
2024-07-03 15:55:34 +02:00
parent f86d794239
commit 8c0b4c9160
206 changed files with 5305 additions and 40453 deletions

View File

@@ -1,151 +1,56 @@
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Learn more about it on https://go.nuxtjs.dev/static-target
target: "static",
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
router: {
middleware:['auth']
app: {
header: {
link: [{ rel: 'icon', type: 'image/svg', href: '/images/favicon.svg' }]
}
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'Boussole PLUSS',
htmlAttrs: {
lang: 'fr',
},
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{hid: 'description', name: 'description', content: ''},
{name: 'format-detection', content: 'telephone=no'},
],
link: [{rel: 'icon', href: '/favicon.svg'}],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
// SCSS file in the project
'~/assets/css/main.scss',
'~/assets/css/_color.scss',
'~/assets/css/_font.scss',
'~/assets/css/_spacing.scss'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
{ src: '~/plugins/axios-accessor.ts' },
{ src: '~/plugins/filters.ts' }
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/typescript
'@nuxt/typescript-build',
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxtjs/auth-next',
'@nuxtjs/eslint-module',
"@nuxtjs/device",
"@pinia/nuxt"
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
// axios: {
// // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
// baseURL: '/',
// },
axios: {
baseURL: process.env.BACKEND_BASE_URL || 'http://localhost:8080/'
css: ["~/assets/css/main.scss"],
ssr: false,
devServer: {
port: Number(process.env.PORT) || 3000
},
// https://www.wolfpack-digital.com/blogposts/nuxt-auth-refresh-token-authentication-in-your-nuxt-app
// auth: {
// redirect: {
// login: '/login',
// logout: '/',
// home: "/login"
// },
// // localStorage: true,
// // cookie: {
// // prefix: 'auth',
// // options: {
// // path: "/home",
// // maxAge: 1000
// // }
// // },
// strategies: {
// local: {
// token: {
// property: 'token',
// maxAge: 1800,
// global: true
// },
// user: {
// property: false,
// autoFetch: false
// },
// refreshToken: {
// property: 'refreshToken',
// data: 'refresh_token',
// maxAge: 60 * 60 * 24 * 30
// },
// endpoints: {
// login: {url: 'auth/signin', method: 'post' },
// refresh: {url: 'auth/refreshtoken', method: 'post'},
// user: {url: 'auth/me', method: 'get'},
// logout: {url: 'auth/logout', method: 'post'}
// }
// }
// }
// },
auth:{
redirect:{
login:'/',
logout:'/',
home:"/redirect"
},
localStorage: true,
cookie: {
prefix:'auth',
options:{
path:"/redirect",
maxAge:1000
}
},
strategies:{
local:{
token:{
property:'token',
global:true
},
user:{
property: ''
},
endpoints:{
login: {url: 'auth/signin', method: 'post' },
refresh: {url: 'auth/refreshtoken', method: 'post'},
user: {url: 'auth/me', method: 'get' },
logout: {url: 'auth/logout', method: 'post'}
runtimeConfig: {
public: {
baseURL: process.env.BACKEND_BASE_URL || "http://localhost:8080"
}
},
components: [
{
path: "~/components",
pathPrefix: false
}
],
pinia: {
autoImports: [
// automatically imports `defineStore`
"defineStore", // import { defineStore } from 'pinia'
["defineStore", "definePiniaStore"] // import { defineStore as definePiniaStore } from 'pinia'
]
},
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData:
'@use "@/assets/css/_color.scss" as *;@use "@/assets/css/_mixin.scss" as *;@use "@/assets/css/_font.scss" as *;@use "@/assets/css/_spacing.scss" as *;'
}
}
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
typescript: {
typeCheck: {
eslint: {
files: './**/*.{ts,vue}'
}
}
}
}
compatibilityDate: "2024-07-06"
});