Migrate to vite & new structure

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Jonathan
2025-05-19 20:13:50 +02:00
committed by Sacha Al Himdani
parent db9e5f32ac
commit a2d1310780
244 changed files with 9153 additions and 3096 deletions

47
apps/console/index.html Normal file
View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Probo - Console</title>
<link rel="icon shortcut" href="/assets/favicon.ico" sizes="32x32" />
<link rel="icon" href="/assets/favicon.svg" type="image/svg+xml" />
<link
rel="icon"
href="/assets/favicon-dark.svg"
type="image/svg+xml"
media="(prefers-color-scheme: dark)"
/>
<link
rel="icon"
href="/assets/favicon-16x16.png"
type="image/png"
sizes="16x16"
/>
<link
rel="icon"
href="/assets/favicon-32x32.png"
type="image/png"
sizes="32x32"
/>
<link
rel="apple-touch-icon"
href="/assets/apple-touch-icon.png"
sizes="180x180"
/>
<meta name="description" content="The open-source compliance platform" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
rel="stylesheet"
/>
</head>
<body class="font-sans">
<div id="root"></div>
<script type="module" src="/src/App.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
{
"src": "./src",
"schema": "./schema.graphql",
"language": "typescript",
"eagerEsModules": true
}

11
apps/console/src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly POSTHOG_KEY: string;
readonly POSTHOG_HOST: string;
readonly API_SERVER_HOST: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}

View File

@@ -0,0 +1,30 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src"]
}

View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}

View File

@@ -0,0 +1,23 @@
import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
import {resolve} from 'node:path';
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react({babel: {plugins: ["relay"]}}),
tailwindcss(),
],
server: {
cors: {
// the origin you will be accessing via browser
origin: 'http://localhost:8080',
},
},
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
})