Skip to content
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
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "proxy-smart-backend",
"displayName": "Proxy Smart Backend",
"version": "0.0.3-beta.202603270441.5b5ab954",
"version": "0.0.3-alpha.202603270447.2f9c80a0",
"type": "module",
"scripts": {
"test": "bun test",
Expand Down
30 changes: 9 additions & 21 deletions consent-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useRef, useState } from "react"
import { Dashboard } from "@/components/Dashboard"
import { Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import { AppHeader, Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import {
smartAuth,
} from "@/lib/smart-auth"
import { onAuthError } from "@/lib/auth-error"
import { ShieldCheck, LogOut, LogIn, AlertTriangle } from "lucide-react"
import { ShieldCheck, LogIn, AlertTriangle } from "lucide-react"
import "./index.css"

type AppState = "loading" | "unauthenticated" | "callback" | "authenticated" | "error" | "session-expired"
Expand Down Expand Up @@ -78,25 +78,13 @@ export default function App() {

return (
<div className="min-h-screen bg-background">
{/* Header */}
<header className="border-b bg-card">
<div className="max-w-4xl mx-auto px-4 py-3 flex items-center justify-between">
<div className="flex items-center gap-2">
{brand?.logoUrl ? (
<img src={brand.logoUrl} alt={brand.name} className="h-6 w-auto" />
) : (
<ShieldCheck className="size-5 text-maxhealth" />
)}
<h1 className="font-semibold">Consent Manager</h1>
</div>
{state === "authenticated" && (
<Button variant="ghost" size="sm" onClick={handleLogout}>
<LogOut className="size-4" />
Sign Out
</Button>
)}
</div>
</header>
<AppHeader
title="Consent Manager"
icon={ShieldCheck}
authenticated={state === "authenticated"}
onSignOut={handleLogout}
maxWidth="max-w-4xl"
/>

{/* Content */}
<main className="max-w-4xl mx-auto px-4 py-6">
Expand Down
40 changes: 14 additions & 26 deletions dtr-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useRef, useState } from "react"
import { Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import { AppHeader, Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import { smartAuth } from "@/lib/smart-auth"
import { onAuthError } from "@/lib/auth-error"
import type { LaunchMode } from "hl7.fhir.us.davinci-pas-generated/fhir-client"
import { Dashboard } from "@/components/Dashboard"
import { FileCheck, LogOut, LogIn, AlertTriangle } from "lucide-react"
import { FileCheck, LogIn, AlertTriangle } from "lucide-react"
import "./index.css"

type AppState = "loading" | "unauthenticated" | "callback" | "authenticated" | "error" | "session-expired"
Expand Down Expand Up @@ -91,30 +91,18 @@ export default function App() {

return (
<div className="min-h-screen bg-background">
{/* Header */}
<header className="border-b bg-card">
<div className="max-w-5xl mx-auto px-4 py-3 flex items-center justify-between">
<div className="flex items-center gap-2">
{brand?.logoUrl ? (
<img src={brand.logoUrl} alt={brand.name} className="h-6 w-auto" />
) : (
<FileCheck className="size-5 text-maxhealth" />
)}
<h1 className="font-semibold">Prior Authorization</h1>
{state === "authenticated" && (
<span className="text-xs text-muted-foreground ml-2 border rounded px-1.5 py-0.5">
{launchMode === "ehr" ? "EHR Launch" : "Standalone"}
</span>
)}
</div>
{state === "authenticated" && (
<Button variant="ghost" size="sm" onClick={handleLogout}>
<LogOut className="size-4" />
Sign Out
</Button>
)}
</div>
</header>
<AppHeader
title="Prior Authorization"
icon={FileCheck}
authenticated={state === "authenticated"}
onSignOut={handleLogout}
>
{state === "authenticated" && (
<span className="text-xs text-muted-foreground ml-2 border rounded px-1.5 py-0.5">
{launchMode === "ehr" ? "EHR Launch" : "Standalone"}
</span>
)}
</AppHeader>

{/* Content */}
<main className="max-w-5xl mx-auto px-4 py-6">
Expand Down
2 changes: 1 addition & 1 deletion infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "proxy-smart-infra",
"displayName": "Proxy Smart Infrastructure",
"description": "AWS CDK infrastructure for Proxy Smart production deployment",
"version": "0.0.3-beta.202603270441.5b5ab954",
"version": "0.0.3-alpha.202603270447.2f9c80a0",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proxy-smart",
"version": "0.0.3-beta.202603270441.5b5ab954",
"version": "0.0.3-alpha.202603270447.2f9c80a0",
"repository": {
"type": "git",
"url": "git+https://github.com/quotentiroler/proxy-smart.git"
Expand Down
2 changes: 1 addition & 1 deletion patient-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Proxy Smart Patient Portal",
"description": "International Patient Portal — SMART on FHIR app for patient access using IPS (International Patient Summary) and IPA (International Patient Access) standards.",
"private": true,
"version": "0.0.3-beta.202603270441.5b5ab954",
"version": "0.0.3-alpha.202603270447.2f9c80a0",
"type": "module",
"scripts": {
"dev": "vite --port 5176",
Expand Down
37 changes: 8 additions & 29 deletions patient-portal/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useRef, useState } from "react"
import { Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import { AppHeader, Button, Spinner, useBranding } from "@proxy-smart/shared-ui"
import { smartAuth } from "@/lib/smart-auth"
import { onAuthError } from "@/lib/auth-error"
import { Heart, LogOut, LogIn, AlertTriangle, LayoutGrid } from "lucide-react"
import { Heart, LogIn, AlertTriangle } from "lucide-react"
import { Dashboard } from "@/components/Dashboard"
import "./index.css"

Expand Down Expand Up @@ -86,33 +86,12 @@ export default function App() {

return (
<div className="min-h-screen bg-background">
{/* Header */}
<header className="border-b bg-card">
<div className="max-w-5xl mx-auto px-4 py-3 flex items-center justify-between">
<div className="flex items-center gap-2">
{brand?.logoUrl ? (
<img src={brand.logoUrl} alt={brand.name} className="h-6 w-auto" />
) : (
<Heart className="size-5 text-maxhealth" />
)}
<h1 className="font-semibold">Patient Portal</h1>
</div>
{state === "authenticated" && (
<div className="flex items-center gap-1">
<Button variant="ghost" size="sm" asChild>
<a href="/apps">
<LayoutGrid className="size-4" />
App Store
</a>
</Button>
<Button variant="ghost" size="sm" onClick={handleLogout}>
<LogOut className="size-4" />
Sign Out
</Button>
</div>
)}
</div>
</header>
<AppHeader
title="Patient Portal"
icon={Heart}
authenticated={state === "authenticated"}
onSignOut={handleLogout}
/>

{/* Content */}
<main className="max-w-5xl mx-auto px-4 py-6">
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proxy-smart-scripts",
"version": "0.0.3-beta.202603270441.5b5ab954",
"version": "0.0.3-alpha.202603270447.2f9c80a0",
"description": "CI/CD and development scripts for Proxy Smart",
"private": true,
"type": "module",
Expand Down
62 changes: 62 additions & 0 deletions shared-ui/src/components/app-header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { ReactNode } from "react"
import type { LucideIcon } from "lucide-react"
import { LayoutGrid, LogOut } from "lucide-react"
import { Button } from "./button"
import { useBranding } from "../hooks/use-branding"
import { cn } from "../lib/utils"

export interface AppHeaderProps {
/** App title displayed next to the icon */
title: string
/** Lucide icon component used as fallback when no branding logo is configured */
icon: LucideIcon
/** Whether the user is currently authenticated (controls Sign Out visibility) */
authenticated: boolean
/** Called when the user clicks Sign Out */
onSignOut: () => void
/** Optional extra content rendered after the title (e.g. a launch-mode badge) */
children?: ReactNode
/** Tailwind max-width class for the inner container (default: "max-w-5xl") */
maxWidth?: string
}

export function AppHeader({
title,
icon: Icon,
authenticated,
onSignOut,
children,
maxWidth = "max-w-5xl",
}: AppHeaderProps) {
const brand = useBranding()

return (
<header className="border-b bg-card">
<div className={cn(maxWidth, "mx-auto px-4 py-3 flex items-center justify-between")}>
<div className="flex items-center gap-2">
{brand?.logoUrl ? (
<img src={brand.logoUrl} alt={brand.name} className="h-6 w-auto" />
) : (
<Icon className="size-5 text-maxhealth" />
)}
<h1 className="font-semibold">{title}</h1>
{children}
</div>
<div className="flex items-center gap-1">
<Button variant="ghost" size="sm" asChild>
<a href="/apps">
<LayoutGrid className="size-4" />
App Store
</a>
</Button>
{authenticated && (
<Button variant="ghost" size="sm" onClick={onSignOut}>
<LogOut className="size-4" />
Sign Out
</Button>
)}
</div>
</div>
</header>
)
}
1 change: 1 addition & 0 deletions shared-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScro
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants } from "./components/tabs"
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/tooltip"
export { ErrorBoundary } from "./components/error-boundary"
export { AppHeader, type AppHeaderProps } from "./components/app-header"

// Utilities
export { cn } from "./lib/utils"
Expand Down
2 changes: 1 addition & 1 deletion testing/dev/report/fhir-metadata.json

Large diffs are not rendered by default.

Loading
Loading