Skip to content

Commit acf0b4a

Browse files
authored
Merge pull request #1 from JeffEmery/info
Add Info Page
2 parents feecf0a + d291959 commit acf0b4a

File tree

8 files changed

+452
-92
lines changed

8 files changed

+452
-92
lines changed

apps/web/index.html

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,12 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/png" href="/enra.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Envision Technologist Chat</title>
8-
<!-- <script>
9-
(function () {
10-
if (!window.chatbase || window.chatbase("getState") !== "initialized") {
11-
window.chatbase = (...args) => {
12-
if (!window.chatbase.q) {
13-
window.chatbase.q = [];
14-
}
15-
window.chatbase.q.push(args);
16-
};
17-
window.chatbase = new Proxy(window.chatbase, {
18-
get(target, prop) {
19-
if (prop === "q") {
20-
return target.q;
21-
}
22-
return (...args) => target(prop, ...args);
23-
},
24-
});
25-
}
26-
const onLoad = function () {
27-
const script = document.createElement("script");
28-
script.src = "https://www.chatbase.co/embed.min.js";
29-
script.id = "phvfi1BLeWhC3uVaxG8nE";
30-
script.domain = "www.chatbase.co";
31-
document.body.appendChild(script);
32-
};
33-
if (document.readyState === "complete") {
34-
onLoad();
35-
} else {
36-
window.addEventListener("load", onLoad);
37-
}
38-
})();
39-
</script> -->
7+
<title>Envision AI Tech Assistant</title>
408
</head>
41-
<body>
9+
<body
10+
data-theme="dark"
11+
class="bg-zinc-50 text-gray-800 dark:bg-zinc-950 dark:text-gray-300"
12+
>
4213
<div id="app"></div>
4314
<script type="module" src="/src/main.tsx"></script>
4415
</body>

apps/web/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@
1111
},
1212
"dependencies": {
1313
"@repo/ui": "workspace:*",
14+
"lucide-react": "^0.562.0",
1415
"react": "^19.2.3",
1516
"react-dom": "^19.2.3",
1617
"react-router": "^7.11.0"
1718
},
1819
"devDependencies": {
1920
"@repo/eslint-config": "workspace:*",
2021
"@repo/typescript-config": "workspace:*",
22+
"@tailwindcss/vite": "^4.1.18",
2123
"@types/react": "^19.2.7",
2224
"@types/react-dom": "^19.2.3",
2325
"@vitejs/plugin-react": "^5.1.2",
2426
"eslint": "^9.39.2",
27+
"tailwindcss": "^4.1.18",
2528
"typescript": "5.9.3",
2629
"vite": "^7.3.0"
2730
}

apps/web/src/main.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import React from "react";
2-
import { createRoot } from "react-dom/client";
32
import "./style.css";
3+
import { createRoot } from "react-dom/client";
44
import { Header } from "@repo/ui";
55
import { BrowserRouter, Route, Routes } from "react-router";
6+
import InfoPage from "./pages/info-page";
67

78
const ChatPage = () => (
89
<div>
9-
<Header title="Envision Technologist Assistant" />
10+
<Header title="Envision AI Tech Assistant" />
1011
</div>
1112
);
1213

1314
const LandingPage = () => (
1415
<div>
15-
{/* <Header title="Chat with the Envision Technologist" /> */}
1616
<iframe id="fullscreen-iframe"
1717
src="https://www.chatbase.co/phvfi1BLeWhC3uVaxG8nE/help"
1818
title="Example Website"
@@ -30,6 +30,7 @@ const App = () => (
3030
<Routes>
3131
<Route path="/" element={<LandingPage />} />
3232
<Route path="/chat" element={<ChatPage />} />
33+
<Route path="/info" element={<InfoPage />} />
3334
</Routes>
3435
</BrowserRouter>
3536
</React.StrictMode>

apps/web/src/pages/info-page.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { Header } from "@repo/ui";
2+
import { Sun, Moon } from "lucide-react";
3+
import { useEffect, useState } from "react";
4+
5+
export default function InfoPage() {
6+
const savedTheme = localStorage.getItem("theme");
7+
const [theme, setTheme] = useState<string>(savedTheme ?? 'dark');
8+
9+
const toggleTheme = () => {
10+
setTheme(theme === "dark" ? "light" : "dark");
11+
};
12+
13+
useEffect(() => {
14+
document.body.dataset.theme = theme;
15+
localStorage.setItem("theme", theme);
16+
}, [theme]);
17+
18+
return (
19+
<div>
20+
<Header title="About the Envision AI Tech Assistant" className="text-4xl font-bold mb-4" />
21+
<p>
22+
<b>What it is?</b>
23+
<br />
24+
The Envision Technologist AI Assistant is a trained AI solution that answers technical questions about imaging exams.
25+
It provides guidance on best practices, exam technique, and other practical topics.
26+
It gives technologists fast, reliable guidance at the point of care, helping to produce high quality studies with fewer errors and less rework.
27+
Immediate answers reduce the need to interrupt radiologists for routine questions while keeping exams moving efficiently and consistently.
28+
<br /><br />
29+
<b>Is it accurate?</b>
30+
<br />
31+
The assistant was trained using thousands of instructional files and relevant medical websites.
32+
All training sources were curated and reviewed by Dr. Sana to ensure clinical relevance and accuracy.
33+
Ongoing feedback helps improve performance.
34+
Use thumbs down 👎 to flag responses that are unclear or incorrect, and thumbs up 👍 to confirm helpful answers.
35+
</p>
36+
<div className="fixed bottom-0 left-0 right-0 p-4 text-center">
37+
{theme === "dark" ? <Sun onClick={toggleTheme} /> : <Moon onClick={toggleTheme} />}
38+
</div>
39+
</div>
40+
);
41+
}

apps/web/src/style.css

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@import "tailwindcss";
2+
3+
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
4+
15
:root {
26
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
37
font-size: 16px;
@@ -33,11 +37,6 @@ body {
3337
min-height: 100vh;
3438
}
3539

36-
h1 {
37-
font-size: 3.2em;
38-
line-height: 1.1;
39-
}
40-
4140
#app {
4241
max-width: 1280px;
4342
margin: 0 auto;
@@ -120,4 +119,4 @@ button:focus-visible {
120119
button {
121120
background-color: #f9f9f9;
122121
}
123-
}
122+
}

apps/web/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
3+
import tailwindcss from "@tailwindcss/vite";
34

45
export default defineConfig({
5-
plugins: [react()],
6+
plugins: [react(), tailwindcss()],
67
});

packages/ui/src/header.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
interface HeaderProps {
22
title: string;
3+
className?: string;
34
}
45

5-
export const Header = ({ title }: HeaderProps) => {
6+
export const Header = ({ title, className }: HeaderProps) => {
67
return (
78
<header id="header">
8-
<h1>{title}</h1>
9+
<h1 className={className}>{title}</h1>
910
</header>
1011
);
1112
};

0 commit comments

Comments
 (0)