Skip to content

Image Pipeline Playground

feat(frontend/header): add project info modal with GitHub link

Mohammad Rajaei8f49ede6c307
diff --git a/frontend/src/app/AppHeader.tsx b/frontend/src/app/AppHeader.tsx
index ecd6a66..0327327 100644
--- a/frontend/src/app/AppHeader.tsx
+++ b/frontend/src/app/AppHeader.tsx
@@ -1,11 +1,14 @@
import {
Box,
Button,
+ IconButton,
Stack,
TextField,
Typography,
} from '@mui/material'
+import { useState } from 'react'
import { useGraphStore } from '../store/graphStore'
+import { ProjectInfoModal } from './ProjectInfoModal'
const fieldSx = {
width: 92,
@@ -159,6 +162,7 @@ export function AppHeader({
const isExecuting = useGraphStore((s) => s.isExecuting)
const nodeCount = useGraphStore((s) => s.nodes.length)
const edgeCount = useGraphStore((s) => s.edges.length)
+ const [infoOpen, setInfoOpen] = useState(false)
return (
<Box
@@ -177,34 +181,82 @@ export function AppHeader({
}}
>
<Stack direction="row" spacing={1.25} sx={{ alignItems: 'center', minWidth: 0 }}>
- <BrandMark />
- <Box sx={{ minWidth: 0 }}>
- <Typography
- component="h1"
- sx={{
- fontFamily: '"Fraunces", Georgia, serif',
- fontWeight: 700,
- fontSize: 20,
- lineHeight: 1.1,
- color: '#f4f1ea',
- letterSpacing: '-0.02em',
- }}
- >
- Image Pipes
- </Typography>
- <Typography
- sx={{
- fontSize: 11,
- color: 'rgba(244,241,234,0.45)',
- lineHeight: 1.2,
- whiteSpace: 'nowrap',
- }}
- >
- OpenCV pipeline playground
- </Typography>
+ <Box
+ component="button"
+ type="button"
+ onClick={() => setInfoOpen(true)}
+ aria-label="About Image Pipes"
+ sx={{
+ display: 'inline-flex',
+ alignItems: 'center',
+ gap: 1.25,
+ m: 0,
+ p: 0.5,
+ pr: 1,
+ border: '1px solid transparent',
+ borderRadius: 1.5,
+ bgcolor: 'transparent',
+ cursor: 'pointer',
+ color: 'inherit',
+ minWidth: 0,
+ '&:hover': {
+ bgcolor: 'rgba(255,255,255,0.04)',
+ borderColor: 'rgba(255,255,255,0.08)',
+ },
+ }}
+ >
+ <BrandMark />
+ <Box sx={{ minWidth: 0, textAlign: 'left' }}>
+ <Typography
+ component="h1"
+ sx={{
+ fontFamily: '"Fraunces", Georgia, serif',
+ fontWeight: 700,
+ fontSize: 20,
+ lineHeight: 1.1,
+ color: '#f4f1ea',
+ letterSpacing: '-0.02em',
+ }}
+ >
+ Image Pipes
+ </Typography>
+ <Typography
+ sx={{
+ fontSize: 11,
+ color: 'rgba(244,241,234,0.45)',
+ lineHeight: 1.2,
+ whiteSpace: 'nowrap',
+ }}
+ >
+ OpenCV pipeline playground
+ </Typography>
+ </Box>
</Box>
+ <IconButton
+ size="small"
+ aria-label="Project info"
+ onClick={() => setInfoOpen(true)}
+ sx={{
+ width: 30,
+ height: 30,
+ color: 'rgba(244,241,234,0.55)',
+ border: '1px solid rgba(255,255,255,0.1)',
+ borderRadius: 1.25,
+ fontSize: 13,
+ fontWeight: 700,
+ '&:hover': {
+ color: '#7dcea0',
+ borderColor: 'rgba(125,206,160,0.35)',
+ bgcolor: 'rgba(125,206,160,0.08)',
+ },
+ }}
+ >
+ i
+ </IconButton>
</Stack>
+ <ProjectInfoModal open={infoOpen} onClose={() => setInfoOpen(false)} />
+
<Stack
direction="row"
spacing={0.75}
diff --git a/frontend/src/app/ProjectInfoModal.tsx b/frontend/src/app/ProjectInfoModal.tsx
new file mode 100644
index 0000000..a054020
--- /dev/null
+++ b/frontend/src/app/ProjectInfoModal.tsx
@@ -0,0 +1,143 @@
+import {
+ Box,
+ Button,
+ Dialog,
+ DialogActions,
+ DialogContent,
+ DialogTitle,
+ Link,
+ Stack,
+ Typography,
+} from '@mui/material'
+import { PROJECT_INFO } from '../projectInfo'
+
+interface ProjectInfoModalProps {
+ open: boolean
+ onClose: () => void
+}
+
+export function ProjectInfoModal({ open, onClose }: ProjectInfoModalProps) {
+ return (
+ <Dialog
+ open={open}
+ onClose={onClose}
+ maxWidth="sm"
+ fullWidth
+ slotProps={{
+ paper: {
+ sx: {
+ bgcolor: '#161616',
+ color: '#f4f1ea',
+ borderRadius: 2,
+ border: '1px solid rgba(255,255,255,0.1)',
+ backgroundImage:
+ 'radial-gradient(ellipse 80% 60% at 0% 0%, rgba(125,206,160,0.1), transparent 55%)',
+ },
+ },
+ }}
+ >
+ <DialogTitle
+ sx={{
+ fontFamily: '"Fraunces", Georgia, serif',
+ fontWeight: 700,
+ letterSpacing: '-0.02em',
+ pb: 0.5,
+ }}
+ >
+ {PROJECT_INFO.name}
+ </DialogTitle>
+ <DialogContent>
+ <Typography
+ sx={{ color: 'rgba(244,241,234,0.55)', fontSize: 13, mb: 2 }}
+ >
+ {PROJECT_INFO.tagline}
+ </Typography>
+ <Typography sx={{ fontSize: 14, lineHeight: 1.6, mb: 2.5 }}>
+ {PROJECT_INFO.description}
+ </Typography>
+
+ <Stack spacing={1.5}>
+ <Box>
+ <Typography
+ sx={{
+ fontSize: 10,
+ fontWeight: 700,
+ letterSpacing: '0.08em',
+ textTransform: 'uppercase',
+ color: 'rgba(244,241,234,0.4)',
+ mb: 0.4,
+ }}
+ >
+ License
+ </Typography>
+ <Typography sx={{ fontSize: 14, fontWeight: 600 }}>
+ {PROJECT_INFO.licenseLabel}
+ </Typography>
+ </Box>
+
+ <Box>
+ <Typography
+ sx={{
+ fontSize: 10,
+ fontWeight: 700,
+ letterSpacing: '0.08em',
+ textTransform: 'uppercase',
+ color: 'rgba(244,241,234,0.4)',
+ mb: 0.4,
+ }}
+ >
+ GitHub
+ </Typography>
+ <Link
+ href={PROJECT_INFO.githubUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ sx={{
+ color: '#7dcea0',
+ fontSize: 14,
+ fontWeight: 600,
+ textDecoration: 'none',
+ '&:hover': { textDecoration: 'underline' },
+ }}
+ >
+ {PROJECT_INFO.githubLabel}
+ </Link>
+ </Box>
+ </Stack>
+ </DialogContent>
+ <DialogActions sx={{ px: 3, pb: 2 }}>
+ <Button
+ href={PROJECT_INFO.githubUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ variant="outlined"
+ sx={{
+ textTransform: 'none',
+ fontWeight: 650,
+ color: '#f0ebe3',
+ borderColor: 'rgba(255,255,255,0.16)',
+ '&:hover': {
+ borderColor: 'rgba(125,206,160,0.45)',
+ bgcolor: 'rgba(125,206,160,0.08)',
+ },
+ }}
+ >
+ Open GitHub
+ </Button>
+ <Button
+ onClick={onClose}
+ variant="contained"
+ sx={{
+ textTransform: 'none',
+ fontWeight: 700,
+ bgcolor: '#e67e22',
+ color: '#0f0f0f',
+ '&:hover': { bgcolor: '#f39c12' },
+ }}
+ >
+ Close
+ </Button>
+ </DialogActions>
+ </Dialog>
+ )
+}
diff --git a/frontend/src/projectInfo.ts b/frontend/src/projectInfo.ts
new file mode 100644
index 0000000..6cd1721
--- /dev/null
+++ b/frontend/src/projectInfo.ts
@@ -0,0 +1,10 @@
+export const PROJECT_INFO = {
+ name: 'Image Pipes',
+ tagline: 'OpenCV pipeline playground',
+ description:
+ 'Visual node editor for OpenCV image-preprocessing pipelines. Build a DAG in the browser, execute it with caching and live previews, save and load workflows as JSON, and export a runnable Python script.',
+ license: 'MIT',
+ licenseLabel: 'MIT License',
+ githubUrl: 'https://github.com/mrajaeim/image-pipes',
+ githubLabel: 'github.com/mrajaeim/image-pipes',
+} as const