Scaffold compliance-portal frontend app
Add the root configuration files for apps/compliance-portal, the refactor of the legacy trust center SPA. The scaffold mirrors the existing trust app (Vite, Tailwind, Relay, TypeScript project references, ESLint) and targets the trust v1 GraphQL schema, which the compliancepage backend already serves under /api/trust/v1. Wire the app into the root relay.config.json with a dedicated complianceportal project so the Relay compiler emits artifacts for its sources. External dependencies are pinned to current latest versions rather than matching the older majors used by the other apps. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
1
apps/compliance-portal/.env.example
Normal file
1
apps/compliance-portal/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
VITE_API_URL=http://localhost:8080
|
||||
2
apps/compliance-portal/.gitattributes
vendored
Normal file
2
apps/compliance-portal/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
__generated__/*.graphql linguist-generated
|
||||
__generated__/*.js linguist-generated
|
||||
26
apps/compliance-portal/.gitignore
vendored
Normal file
26
apps/compliance-portal/.gitignore
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
public/pdfjs
|
||||
# Logs
|
||||
old
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
1
apps/compliance-portal/README.md
Normal file
1
apps/compliance-portal/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Compliance Portal app
|
||||
12
apps/compliance-portal/eslint.config.mjs
Normal file
12
apps/compliance-portal/eslint.config.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
import { configs } from "@probo/eslint-config";
|
||||
import { defineConfig } from "eslint/config";
|
||||
|
||||
export default defineConfig([
|
||||
configs.base,
|
||||
configs.ts,
|
||||
configs.imports,
|
||||
configs.react,
|
||||
configs.relay,
|
||||
configs.stylistic,
|
||||
configs.languageOptions.browser,
|
||||
]);
|
||||
5
apps/compliance-portal/graphql.config.yml
Normal file
5
apps/compliance-portal/graphql.config.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
schema: '../../pkg/server/api/trust/v1/schema.graphql'
|
||||
extensions:
|
||||
endpoints:
|
||||
CompliancePage:
|
||||
url: http://localhost:8080/api/trust/v1/graphql
|
||||
39
apps/compliance-portal/index.html
Normal file
39
apps/compliance-portal/index.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
(function () {
|
||||
var m = location.pathname.match(/^\/trust\/[^/]+/);
|
||||
var b = document.createElement("base");
|
||||
b.href = m ? m[0] + "/" : "/";
|
||||
document.head.appendChild(b);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<link rel="icon" id="favicon" href="{{if .FaviconURL}}{{.FaviconURL}}{{else}}/favicons/favicon.ico{{end}}">
|
||||
|
||||
<meta name="application-name" content=" " />
|
||||
<meta name="msapplication-TileColor" content="#FFFFFF" />
|
||||
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png" />
|
||||
<meta name="msapplication-square70x70logo" content="/favicons/mstile-70x70.png" />
|
||||
<meta name="msapplication-square150x150logo" content="/favicons/mstile-150x150.png" />
|
||||
<meta name="msapplication-wide310x150logo" content="/favicons/mstile-310x150.png" />
|
||||
<meta name="msapplication-square310x310logo" content="/favicons/mstile-310x310.png" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{{.Title}}</title>
|
||||
<meta name="description" content="{{.Description}}">
|
||||
<meta property="og:title" content="{{.Title}}">
|
||||
<meta property="og:description" content="{{.Description}}">
|
||||
<meta property="og:url" content="{{.OGURL}}">
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
|
||||
<body class="text-txt-primary bg-level-0">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
42
apps/compliance-portal/package.json
Normal file
42
apps/compliance-portal/package.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@probo/compliance-portal",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port 5175",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint . --concurrency 2",
|
||||
"check": "tsc --noEmit -p tsconfig.app.json",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@probo/ui": "1.0.0",
|
||||
"clsx": "^2.1.1",
|
||||
"react": "^19.2.7",
|
||||
"react-dom": "^19.2.7",
|
||||
"react-relay": "^21.0.1",
|
||||
"react-router": "^8.0.0",
|
||||
"relay-runtime": "^21.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@probo/eslint-config": "1.0.0",
|
||||
"@probo/eslint-plugin-relay-types": "^1.0.0",
|
||||
"@tailwindcss/vite": "^4.3.1",
|
||||
"@types/node": "^25.9.3",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/react-relay": "^18.2.1",
|
||||
"@types/relay-runtime": "^20.1.1",
|
||||
"@vitejs/plugin-react": "^6.0.2",
|
||||
"babel-plugin-relay": "^21.0.1",
|
||||
"eslint": "^10.5.0",
|
||||
"graphql": "^17.0.1",
|
||||
"tailwindcss": "^4.3.1",
|
||||
"typescript": "~6.0.3",
|
||||
"vite": "^8.0.16"
|
||||
},
|
||||
"volta": {
|
||||
"node": "24.4.0"
|
||||
}
|
||||
}
|
||||
31
apps/compliance-portal/tsconfig.app.json
Normal file
31
apps/compliance-portal/tsconfig.app.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": false,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#/*": ["src/*"]
|
||||
},
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
7
apps/compliance-portal/tsconfig.json
Normal file
7
apps/compliance-portal/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
27
apps/compliance-portal/tsconfig.node.json
Normal file
27
apps/compliance-portal/tsconfig.node.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"allowJs": true,
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": false,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true,
|
||||
"types": ["@probo/eslint-plugin-relay-types"]
|
||||
},
|
||||
"include": ["vite.config.ts", "eslint.config.mjs"]
|
||||
}
|
||||
42
apps/compliance-portal/vite.config.ts
Normal file
42
apps/compliance-portal/vite.config.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2025-2026 Probo Inc <hello@probo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react({ babel: { plugins: ["relay"] } }), tailwindcss()],
|
||||
build: {
|
||||
assetsDir: "assets",
|
||||
},
|
||||
base: "./",
|
||||
server: {
|
||||
port: 5175,
|
||||
proxy: {
|
||||
"^/trust/[^/]+/api": {
|
||||
target: "http://localhost:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"#": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -6,7 +6,8 @@
|
||||
"sources": {
|
||||
"apps/console/src/pages/iam": "iam",
|
||||
"apps/console/src": "core",
|
||||
"apps/trust/src": "trust"
|
||||
"apps/trust/src": "trust",
|
||||
"apps/compliance-portal/src": "complianceportal"
|
||||
},
|
||||
"projects": {
|
||||
"core": {
|
||||
@@ -49,6 +50,16 @@
|
||||
"CursorKey": "string",
|
||||
"EmailAddr": "string"
|
||||
}
|
||||
},
|
||||
"complianceportal": {
|
||||
"schema": "pkg/server/api/trust/v1/schema.graphql",
|
||||
"language": "typescript",
|
||||
"noFutureProofEnums": true,
|
||||
"customScalarTypes": {
|
||||
"Datetime": "string",
|
||||
"CursorKey": "string",
|
||||
"EmailAddr": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user