readme
This commit is contained in:
@@ -1,75 +1,67 @@
|
||||
# React + TypeScript + Vite
|
||||
# AEGIS by GISE
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
||||
Portail client B2B et coffre-fort numérique sécurisé pour la gestion d'infrastructures critiques. Conçu pour assurer la réassurance des dirigeants, le monitoring de l'infogérance et un support ITSM cloisonné.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
---
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
||||
## Stack Technique
|
||||
|
||||
## React Compiler
|
||||
* **Frontend :** ViteJS, React (TypeScript), Tailwind CSS (Design System "Corporate Trust").
|
||||
* **Backend & Base de Données :** PocketBase (API REST & temps réel) sur infrastructure Bare-metal / Proxmox.
|
||||
* **Sécurité & Auth :** Authentification fermée, multi-tenant par entreprise (`companies`), et MFA natif (TOTP / Google Authenticator via `otpauth`).
|
||||
|
||||
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
||||
---
|
||||
|
||||
## Expanding the ESLint configuration
|
||||
## Architecture des Collections (PocketBase)
|
||||
|
||||
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
||||
Le backend repose sur un cloisonnement strict (Zero Trust / Multi-Tenant) via les API Rules PocketBase (`company = @request.auth.company.id`) :
|
||||
|
||||
```js
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
extends: [
|
||||
// Other configs...
|
||||
* `aegis_companies` : Données des entreprises clientes et niveaux VIP.
|
||||
* `aegis_aegis_users` : Comptes utilisateurs avec rôles et gestion du secret TOTP (`totp_secret`, `mfa_enabled`).
|
||||
* `aegis_infrastructure_nodes` : Équipements supervisés, statuts et métriques SLA.
|
||||
* `aegis_tickets` : Centre de support ITSM (Incidents, Évolutions, Administratif).
|
||||
* `aegis_ticket_messages` : Fil de discussion chiffré et étanche relié aux tickets.
|
||||
* `aegis_documents_vault` : Stockage sécurisé des rapports d'audits et factures.
|
||||
* `aegis_managed_contracts` : Catalogue de lecture seule des services d'infogérance actifs.
|
||||
|
||||
// Remove tseslint.configs.recommended and replace with this
|
||||
tseslint.configs.recommendedTypeChecked,
|
||||
// Alternatively, use this for stricter rules
|
||||
tseslint.configs.strictTypeChecked,
|
||||
// Optionally, add this for stylistic rules
|
||||
tseslint.configs.stylisticTypeChecked,
|
||||
---
|
||||
|
||||
// Other configs...
|
||||
],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
// other options...
|
||||
},
|
||||
},
|
||||
])
|
||||
## Installation & Lancement
|
||||
|
||||
### 1. Cloner et installer le front
|
||||
```bash
|
||||
git clone <url-du-repo>
|
||||
cd aegis
|
||||
npm install
|
||||
|
||||
```
|
||||
|
||||
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
||||
### 2. Configurer le client PocketBase
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactX from 'eslint-plugin-react-x'
|
||||
import reactDom from 'eslint-plugin-react-dom'
|
||||
Crée `src/config/pocketbase.ts` :
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
extends: [
|
||||
// Other configs...
|
||||
// Enable lint rules for React
|
||||
reactX.configs['recommended-typescript'],
|
||||
// Enable lint rules for React DOM
|
||||
reactDom.configs.recommended,
|
||||
],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
// other options...
|
||||
},
|
||||
},
|
||||
])
|
||||
```typescript
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
export const pb = new PocketBase('https://pocket.gise.be');
|
||||
pb.autoCancellation(false);
|
||||
|
||||
```
|
||||
|
||||
### 3. Lancer le backend PocketBase
|
||||
|
||||
* Télécharge et lance l'exécutable PocketBase :
|
||||
```bash
|
||||
./pocketbase serve
|
||||
|
||||
```
|
||||
|
||||
|
||||
* Importe les schémas des collections depuis l'Admin UI (`https://pocket.gise.be/_/`) et applique les règles d'API multi-tenant.
|
||||
|
||||
### 4. Démarrer le frontend
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user