-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Feature/dental UI refactor and deploy #5959
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
Open
bitbossing
wants to merge
17
commits into
OHIF:master
Choose a base branch
from
bitbossing:feature/dental-ui-refactor-and-deploy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e61a017
π Create & clone a branch to work on Task A
bitbossing 586b5b0
π Create a new extension [dental-ui] for the Dental Mode to use and tβ¦
bitbossing a094ba9
π Add Practice Name after the Logo on the Header (Dennis Jayvee Paticio)
bitbossing 7c24d2b
π Auto Trigger Patient Info on the Header to show
bitbossing 26e17cd
π Add Tooth Selector on the Header
bitbossing e0d9da3
π Default to 2x2 Hanging Protocol
bitbossing 65ccc23
Merge pull request #1 from bitbossing/feature/dental-ui-mode
bitbossing 617034e
π Create & clone a branch to work on Task B
bitbossing e242513
π Add Sort & Filter to the Dental Measurements panel
bitbossing e311c75
π Add Download Button in the Dental Measurements panel to save measurβ¦
bitbossing 658fd2c
Merge pull request #2 from bitbossing/feature/dental-ui-measurements
bitbossing 752dc36
π Create & clone a branch to work on Task C
bitbossing 4a18e95
π Create Logout button
bitbossing d668220
π Save User Preference on Theme
bitbossing 7bd0252
Merge pull request #3 from bitbossing/feature/dental-ui-saving-and-auth
bitbossing 18865fb
π Create & clone a branch to work on Task D
bitbossing e078eaa
π Update ReadMe File
bitbossing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "projects": { | ||
| "default": "x7-dental" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/usr/bin/env bash | ||
| # ============================================================================= | ||
| # deploy.sh β Build β Push β Deploy to Cloud Run + Firebase Hosting | ||
| # | ||
| # Usage: | ||
| # ./deploy.sh # full deploy (build + push + cloud run + hosting) | ||
| # ./deploy.sh --skip-build # redeploy existing image without rebuilding | ||
| # ============================================================================= | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # ---------- Windows: point gcloud at its bundled Python ---------- | ||
| # On Windows, the system `python` is a Store alias stub; gcloud needs a real interpreter. | ||
| if [[ -n "${LOCALAPPDATA:-}" ]]; then | ||
| _BUNDLED_PY="${LOCALAPPDATA}/Google/Cloud SDK/google-cloud-sdk/platform/bundledpython/python.exe" | ||
| if [[ -f "$_BUNDLED_PY" ]]; then | ||
| export CLOUDSDK_PYTHON="$_BUNDLED_PY" | ||
| fi | ||
| fi | ||
|
|
||
| # ---------- config (edit if needed) ---------- | ||
| GCP_PROJECT="x7-dental" | ||
| GCP_REGION="us-central1" | ||
| SERVICE_NAME="ohif-dental-viewer" | ||
| IMAGE="gcr.io/${GCP_PROJECT}/${SERVICE_NAME}" | ||
|
|
||
| # Load Firebase env vars from platform/app/.env | ||
| ENV_FILE="platform/app/.env" | ||
| if [[ ! -f "$ENV_FILE" ]]; then | ||
| echo "ERROR: $ENV_FILE not found" | ||
| exit 1 | ||
| fi | ||
| source <(grep "^REACT_APP_FIREBASE" "$ENV_FILE" | sed 's/ *= */=/') | ||
|
|
||
| # ---------- build & push ---------- | ||
| if [[ "${1:-}" != "--skip-build" ]]; then | ||
| echo "==> Building Docker image..." | ||
| docker build \ | ||
| --build-arg REACT_APP_FIREBASE_API_KEY="$REACT_APP_FIREBASE_API_KEY" \ | ||
| --build-arg REACT_APP_FIREBASE_AUTH_DOMAIN="$REACT_APP_FIREBASE_AUTH_DOMAIN" \ | ||
| --build-arg REACT_APP_FIREBASE_PROJECT_ID="$REACT_APP_FIREBASE_PROJECT_ID" \ | ||
| --build-arg REACT_APP_FIREBASE_STORAGE_BUCKET="$REACT_APP_FIREBASE_STORAGE_BUCKET" \ | ||
| --build-arg REACT_APP_FIREBASE_MESSAGING_SENDER_ID="$REACT_APP_FIREBASE_MESSAGING_SENDER_ID" \ | ||
| --build-arg REACT_APP_FIREBASE_APP_ID="$REACT_APP_FIREBASE_APP_ID" \ | ||
| -t "$IMAGE" \ | ||
| . | ||
|
|
||
| echo "==> Pushing image to Google Container Registry..." | ||
| docker push "$IMAGE" | ||
| fi | ||
|
|
||
| # ---------- deploy to Cloud Run ---------- | ||
| echo "==> Deploying to Cloud Run ($GCP_REGION)..." | ||
| gcloud run deploy "$SERVICE_NAME" \ | ||
| --image "$IMAGE" \ | ||
| --platform managed \ | ||
| --region "$GCP_REGION" \ | ||
| --project "$GCP_PROJECT" \ | ||
| --port 8080 \ | ||
| --allow-unauthenticated \ | ||
| --min-instances 0 \ | ||
| --max-instances 3 \ | ||
| --memory 512Mi \ | ||
| --cpu 1 | ||
|
|
||
| # ---------- deploy Firebase Hosting ---------- | ||
| echo "==> Deploying Firebase Hosting rules..." | ||
| firebase deploy --only hosting --project "$GCP_PROJECT" | ||
|
|
||
| echo "" | ||
| echo "Done! Your app is live at:" | ||
| echo " https://${GCP_PROJECT}.web.app" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
|
|
||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
| *.lcov | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # Bower dependency directory (https://bower.io/) | ||
| bower_components | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # Compiled binary addons (https://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
|
|
||
| # TypeScript v1 declaration files | ||
| typings/ | ||
|
|
||
| # TypeScript cache | ||
| *.tsbuildinfo | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Microbundle cache | ||
| .rpt2_cache/ | ||
| .rts2_cache_cjs/ | ||
| .rts2_cache_es/ | ||
| .rts2_cache_umd/ | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
|
|
||
| # dotenv environment variables file | ||
| .env | ||
| .env.test | ||
|
|
||
| # parcel-bundler cache (https://parceljs.org/) | ||
| .cache | ||
|
|
||
| # Next.js build output | ||
| .next | ||
|
|
||
| # Nuxt.js build / generate output | ||
| .nuxt | ||
| dist | ||
|
|
||
| # Gatsby files | ||
| .cache/ | ||
| # Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
| # https://nextjs.org/blog/next-9-1#public-directory-support | ||
| # public | ||
|
|
||
| # vuepress build output | ||
| .vuepress/dist | ||
|
|
||
| # Serverless directories | ||
| .serverless/ | ||
|
|
||
| # FuseBox cache | ||
| .fusebox/ | ||
|
|
||
| # DynamoDB Local files | ||
| .dynamodb/ | ||
|
|
||
| # TernJS port file | ||
| .tern-port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "plugins": ["prettier-plugin-tailwindcss"], | ||
| "trailingComma": "es5", | ||
| "printWidth": 100, | ||
| "proseWrap": "always", | ||
| "tabWidth": 2, | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "arrowParens": "avoid", | ||
| "endOfLine": "auto" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| const path = require('path'); | ||
| const pkg = require('../package.json'); | ||
|
|
||
| const outputFile = 'index.umd.js'; | ||
| const rootDir = path.resolve(__dirname, '../'); | ||
| const outputFolder = path.join(__dirname, `../dist/umd/${pkg.name}/`); | ||
|
|
||
| // Todo: add ESM build for the extension in addition to umd build | ||
|
|
||
| const config = { | ||
| mode: 'production', | ||
| entry: rootDir + '/' + pkg.module, | ||
| devtool: 'source-map', | ||
| output: { | ||
| path: outputFolder, | ||
| filename: outputFile, | ||
| library: pkg.name, | ||
| libraryTarget: 'umd', | ||
| chunkFilename: '[name].chunk.js', | ||
| umdNamedDefine: true, | ||
| globalObject: "typeof self !== 'undefined' ? self : this", | ||
| }, | ||
| externals: [ | ||
| { | ||
| react: { | ||
| root: 'React', | ||
| commonjs2: 'react', | ||
| commonjs: 'react', | ||
| amd: 'react', | ||
| }, | ||
| '@ohif/core': { | ||
| commonjs2: '@ohif/core', | ||
| commonjs: '@ohif/core', | ||
| amd: '@ohif/core', | ||
| root: '@ohif/core', | ||
| }, | ||
| '@ohif/ui': { | ||
| commonjs2: '@ohif/ui', | ||
| commonjs: '@ohif/ui', | ||
| amd: '@ohif/ui', | ||
| root: '@ohif/ui', | ||
| }, | ||
| }, | ||
| ], | ||
| module: { | ||
|
|
||
| rules: [ | ||
| { | ||
| test: /\.svg?$/, | ||
| oneOf: [ | ||
| { | ||
| use: [ | ||
| { | ||
| loader: '@svgr/webpack', | ||
| options: { | ||
| svgoConfig: { | ||
| plugins: [ | ||
| { | ||
| name: 'preset-default', | ||
| params: { | ||
| overrides: { | ||
| removeViewBox: false | ||
| }, | ||
| }, | ||
| }, | ||
| ] | ||
| }, | ||
| prettier: false, | ||
| svgo: true, | ||
| titleProp: true, | ||
| }, | ||
| }, | ||
| ], | ||
| issuer: { | ||
| and: [/\.(ts|tsx|js|jsx|md|mdx)$/], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| test: /(\.jsx|\.js|\.tsx|\.ts)$/, | ||
| loader: 'babel-loader', | ||
| exclude: /(node_modules|bower_components)/, | ||
| resolve: { | ||
| extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| resolve: { | ||
| modules: [path.resolve('./node_modules'), path.resolve('./src')], | ||
| extensions: ['.json', '.js', '.jsx', '.tsx', '.ts'], | ||
| }, | ||
| }; | ||
|
|
||
| module.exports = config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 24x7-dental-ui (dennis.jayvee.patricio.03@gmail.com) | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
| associated documentation files (the "Software"), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the | ||
| following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all copies or substantial | ||
| portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
| LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO | ||
| EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
| USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # 24x7-dental-ui | ||
| ## Description | ||
| 24x7 Extension for Dental SaaS UI customization for OHIF Viewer | ||
| ## Author | ||
| Dennis Jayvee Patricio | ||
| ## License | ||
| MIT |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Values passed via
--build-argare permanently stored in each build layer and visible to anyone with access to the image viadocker history <image>. While Firebase web API keys are not highly sensitive secrets (they're embedded in client JS), this pattern sets a precedent that could leak more sensitive values if the approach is reused. Consider writing a.env-style file at build time instead of using build args for credentials, or accept the trade-off explicitly in team policy.Prompt To Fix With AI