Skip to content

Commit 3f9bb54

Browse files
committed
first commit
0 parents  commit 3f9bb54

29 files changed

+1222
-0
lines changed

.eslintrc.cjs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

.github/workflows/deploy.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Set a branch name to trigger deployment
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '18'
18+
19+
- name: Cache dependencies
20+
uses: actions/cache@v3
21+
with:
22+
path: ~/.npm
23+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
24+
restore-keys: |
25+
${{ runner.OS }}-node-
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Deploy
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./build

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# OpenEHR Integration Quest 🚀🧠
2+
3+
Welcome to the OpenEHR Integration Quest! This fun and quirky quiz game is designed to test your knowledge of OpenEHR concepts while keeping you entertained.
4+
5+
## What's This All About?
6+
7+
Ever wished learning about health informatics could be as exciting as a treasure hunt? Well, now it can be! Dive into the world of OpenEHR through a series of challenging questions and watch your expertise grow.
8+
9+
## Features
10+
11+
- 🎮 Interactive quiz format
12+
- 🧠 Covers key OpenEHR concepts
13+
- 🏆 Earn badges as you progress
14+
- 💡 Hint system for when you're stuck
15+
- 🌟 Designed for both newbies and OpenEHR veterans
16+
17+
## The Birth of a Quiz
18+
19+
This little gem was conjured up with the help of Claude 3.5 Sonnet, an AI assistant with a knack for turning dry topics into delightful adventures. Together, we've created a learning experience that's as enjoyable as it is educational.
20+
21+
## Try It Out!
22+
23+
Ready to test your OpenEHR prowess? Head over to [GitHub Pages link] and start your quest!
24+
25+
## Contribute
26+
27+
Found a bug? Have an idea for an even quirkier question? Feel free to open an issue or submit a pull request. Let's make learning about OpenEHR a blast together!
28+
29+
Remember, in the world of health informatics, every quest begins with a single click. Happy learning, adventurers! 🌟

bun.lockb

140 KB
Binary file not shown.

components.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "src/index.css",
9+
"baseColor": "slate",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils"
16+
}
17+
}

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

package.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "openehr-quest",
3+
"private": true,
4+
"version": "1.0.0",
5+
"type": "module",
6+
"author": {
7+
"name": "Gordon Mickel",
8+
"email": "[email protected]"
9+
},
10+
"scripts": {
11+
"dev": "vite",
12+
"build": "tsc -b && vite build",
13+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
14+
"preview": "vite preview"
15+
},
16+
"dependencies": {
17+
"@radix-ui/react-alert-dialog": "^1.1.1",
18+
"@radix-ui/react-progress": "^1.1.0",
19+
"@radix-ui/react-slot": "^1.1.0",
20+
"@radix-ui/react-tooltip": "^1.1.2",
21+
"class-variance-authority": "^0.7.0",
22+
"clsx": "^2.1.1",
23+
"lucide-react": "^0.400.0",
24+
"react": "^18.3.1",
25+
"react-dom": "^18.3.1",
26+
"tailwind-merge": "^2.3.0",
27+
"tailwindcss-animate": "^1.0.7"
28+
},
29+
"devDependencies": {
30+
"@types/node": "^20.14.9",
31+
"@types/react": "^18.3.3",
32+
"@types/react-dom": "^18.3.0",
33+
"@typescript-eslint/eslint-plugin": "^7.13.1",
34+
"@typescript-eslint/parser": "^7.13.1",
35+
"@vitejs/plugin-react": "^4.3.1",
36+
"autoprefixer": "^10.4.19",
37+
"eslint": "^8.57.0",
38+
"eslint-plugin-react-hooks": "^4.6.2",
39+
"eslint-plugin-react-refresh": "^0.4.7",
40+
"postcss": "^8.4.39",
41+
"tailwindcss": "^3.4.4",
42+
"typescript": "^5.2.2",
43+
"vite": "^5.3.1"
44+
},
45+
"packageManager": "[email protected]"
46+
}

postcss.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

public/vite.svg

+1
Loading

src/App.css

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#root {
2+
max-width: 1280px;
3+
margin: 0 auto;
4+
padding: 2rem;
5+
text-align: center;
6+
}
7+
8+
.logo {
9+
height: 6em;
10+
padding: 1.5em;
11+
will-change: filter;
12+
transition: filter 300ms;
13+
}
14+
.logo:hover {
15+
filter: drop-shadow(0 0 2em #646cffaa);
16+
}
17+
.logo.react:hover {
18+
filter: drop-shadow(0 0 2em #61dafbaa);
19+
}
20+
21+
@keyframes logo-spin {
22+
from {
23+
transform: rotate(0deg);
24+
}
25+
to {
26+
transform: rotate(360deg);
27+
}
28+
}
29+
30+
@media (prefers-reduced-motion: no-preference) {
31+
a:nth-of-type(2) .logo {
32+
animation: logo-spin infinite 20s linear;
33+
}
34+
}
35+
36+
.card {
37+
padding: 2em;
38+
}
39+
40+
.read-the-docs {
41+
color: #888;
42+
}

src/App.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import OpenEHRQuest from './openEHRQuest';
2+
3+
function App() {
4+
return (
5+
<div className="App">
6+
<OpenEHRQuest />
7+
</div>
8+
);
9+
}
10+
11+
export default App;

src/assets/react.svg

+1
Loading

src/components/ui/alert.tsx

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import * as React from "react"
2+
import { cva, type VariantProps } from "class-variance-authority"
3+
4+
import { cn } from "@/lib/utils"
5+
6+
const alertVariants = cva(
7+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
8+
{
9+
variants: {
10+
variant: {
11+
default: "bg-background text-foreground",
12+
destructive:
13+
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
14+
},
15+
},
16+
defaultVariants: {
17+
variant: "default",
18+
},
19+
}
20+
)
21+
22+
const Alert = React.forwardRef<
23+
HTMLDivElement,
24+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
25+
>(({ className, variant, ...props }, ref) => (
26+
<div
27+
ref={ref}
28+
role="alert"
29+
className={cn(alertVariants({ variant }), className)}
30+
{...props}
31+
/>
32+
))
33+
Alert.displayName = "Alert"
34+
35+
const AlertTitle = React.forwardRef<
36+
HTMLParagraphElement,
37+
React.HTMLAttributes<HTMLHeadingElement>
38+
>(({ className, ...props }, ref) => (
39+
<h5
40+
ref={ref}
41+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
42+
{...props}
43+
/>
44+
))
45+
AlertTitle.displayName = "AlertTitle"
46+
47+
const AlertDescription = React.forwardRef<
48+
HTMLParagraphElement,
49+
React.HTMLAttributes<HTMLParagraphElement>
50+
>(({ className, ...props }, ref) => (
51+
<div
52+
ref={ref}
53+
className={cn("text-sm [&_p]:leading-relaxed", className)}
54+
{...props}
55+
/>
56+
))
57+
AlertDescription.displayName = "AlertDescription"
58+
59+
export { Alert, AlertTitle, AlertDescription }

src/components/ui/badge.tsx

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import * as React from "react"
2+
import { cva, type VariantProps } from "class-variance-authority"
3+
4+
import { cn } from "@/lib/utils"
5+
6+
const badgeVariants = cva(
7+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8+
{
9+
variants: {
10+
variant: {
11+
default:
12+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13+
secondary:
14+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15+
destructive:
16+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17+
outline: "text-foreground",
18+
},
19+
},
20+
defaultVariants: {
21+
variant: "default",
22+
},
23+
}
24+
)
25+
26+
export interface BadgeProps
27+
extends React.HTMLAttributes<HTMLDivElement>,
28+
VariantProps<typeof badgeVariants> {}
29+
30+
function Badge({ className, variant, ...props }: BadgeProps) {
31+
return (
32+
<div className={cn(badgeVariants({ variant }), className)} {...props} />
33+
)
34+
}
35+
36+
export { Badge, badgeVariants }

0 commit comments

Comments
 (0)