Work on the code
Architecture
The website relies on the following technologies and components:
- Frontend website made in Vue 3
- Project use Vite who offer a fast development server and an optimized compilation for production (like webpack)
- The style is made with CSS/SASS and the bootstrap library
- Typescript used to type
- Jest used for unit testing
The frontend uses npm workspaces (yarn workspaces) for managing the multi-repo within the project. Yarn workspaces allow for efficient management of dependencies (node_modules) to use only the dependencies that are necessary in each part of the project.
The frontend project is divided into 3 main parts :
-
"app" folder : This folder contains the entire application and the components of the front office.
-
"admin" folder : This folder contains the entire application and the components of the admin dashboard.
-
"shared" folder : This folder contains all the shared code between the two previous folders.
The "app" folder and the "admin" folder contain a similar classic Vue.js architecture with mainly :
- A "component" folder that contains the Vue web components.
- A "router" folder for managing the routes of the SPA.
- A "store" folder that manages the store of the SPA. The store allows data to be transmitted between pages. Here, the store is used only when necessary.
- A "test" folder that contains the unit tests.
- A "views" folder that contains the pages.
- An App.vue file, which is the high-level component of the Vue application.
- A main.ts file, which is the entry point of the application that initializes the Vue application and indicates which HTML file should be rendered.
Compile and Hot-Reload for Development
- Launch your dev server for the App (front office) :
or
- Launch your dev server for the Admin (back office) :
or
Run Unit Tests with Vitest
- Run all unit tests :
or
- Run unit tests only for the App folder:
or
- Run unit tests only for the Admin folder:
or
- Run unit tests only for the Shared folder:
or
Lint with ESLint
or
Build the application for production
To build and minify all the file to deploy it in production :
or
Note : there is a server.js file using express to render the html file builded.
You can use the node server.js
command.
Documentation
Documentation is located docs
folder, and can be served with Mkdocs: