Skip to content

Migrate front end to vue #1013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
# https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest
# In Keycloak, this is realm-local; do not include the trailing
# `/.well-known/openid-configuration` path
VITE_OIDC_AUTHORITY=https://auth.example.com/realms/example
VITE_KEYCLOAK_AUTHORITY=https://auth.example.com/

# The client ID is assigned by the IdP
VITE_OIDC_CLIENT_ID=example-front-end
VITE_KEYCLOAK_CLIENT_ID=example-front-end

# The configured keycloak realm name
VITE_KEYCLOAK_REALM=example-realm

# The API URL is the location of a running PhilanthropyDataCommons/service instance
# https://github.com/PhilanthropyDataCommons/service
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,6 @@ dist
# @axa-fr/react-oidc generated files
/public/OidcServiceWorker.js
/public/OidcTrustedDomains.js

*storybook.log
storybook-static
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore artifacts. Prettier inherits ignore rules from .gitignore
# https://prettier.io/docs/en/ignore.html
build
vueSrc/index.html
oldSrc
27 changes: 11 additions & 16 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import type { StorybookConfig } from '@storybook/react-vite';
import type { StorybookConfig } from '@storybook/vue3-vite';

const config: StorybookConfig = {
stories: ['../src/stories/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-onboarding', '@storybook/addon-docs'],
framework: {
name: '@storybook/react-vite',
options: {},
name: '@storybook/vue3-vite',
options: {
docgen: {
plugin: 'vue-component-meta',
tsconfig: 'tsconfig.app.json',
},
},
},
core: {
disableTelemetry: true,
},
docs: {
autodocs: 'tag',
},
staticDirs: ['../public'],
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/vue3-vite';
import '../src/assets/main.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
30 changes: 0 additions & 30 deletions .storybook/preview.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions src/vite-env.d.ts → env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_OIDC_AUTHORITY: string;
readonly VITE_OIDC_CLIENT_ID: string;
readonly VITE_KEYCLOAK_AUTHORITY: string;
readonly VITE_KEYCLOAK_CLIENT_ID: string;
readonly VITE_KEYCLOAK_REALM: string;
readonly VITE_API_URL: string;
readonly VITE_LOG_LEVEL: string;
}
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading