This document describes the internal architecture, relationships, and usage of major UI components in the Alexander Sullivan’s Portfolio project. Components are modular, reusable, and styled with Material-UI and Emotion.
flowchart TD
RootLayout[Root Layout] --> Navbar
RootLayout --> Main[Main Content]
RootLayout --> Footer
RootLayout --> ServiceWorkerRegister
Main --> Banner
Main --> ProjectsGrid
Main --> Publications
Main --> StarsBackground
Main --> CookieSnackbar
Banner --> Avatar
ProjectsGrid --> ProjectCards[Project Cards]
Publications --> PublicationCards[Publication Cards]
Footer --> SocialLinks[Social Links]
Location: src/components/navbar/Navbar.tsx
Top navigation bar with smooth scrolling to page sections.
Features:
See: Navbar Documentation
Location: src/components/banner/Banner.tsx, Avatar.tsx
Header section with animated profile picture featuring a sneeze animation and Easter egg.
Features:
See: Banner & Avatar Documentation
Location: src/components/projects/ProjectsGrid.tsx
Displays project cards in a responsive grid layout.
Features:
Location: src/components/publications/Publications.tsx
Lists publications with authors, abstracts, and metadata.
Features:
See: Publications Documentation
Location: src/components/footer/Footer.tsx
Social media links and copyright information.
Features:
Location: src/components/Stars/StarsBackground.tsx
Animated starfield background with twinkling stars.
Features:
See: Stars Documentation
Location: src/components/cookie-snackbar/CookieSnackbar.tsx
Cookie consent notification with localStorage persistence.
Features:
See: Cookie Snackbar Documentation
Location: src/components/ServiceWorkerRegister.tsx
Client component that registers the service worker for PWA functionality.
Features:
See: Service Worker Documentation
Components are composed in the GeneralLayout:
export default function GeneralLayout({ children }) {
return (
<div id='content'>
<Navbar />
<main>
{children}
<StarsBackground />
<CookieSnackbar />
</main>
<footer>
<Footer />
</footer>
</div>
);
}
Data flow:
sequenceDiagram
participant Page
participant Data
participant Component
participant Firebase
Page->>Data: Import projects, publications, socials
Data-->>Page: Static data arrays
Page->>Component: Pass data as props
Component->>Component: Render UI
Component->>Firebase: Log analytics events
Firebase-->>Component: Event logged
Component Organization:
src/components/banner/, projects/)@components/)Data Integration:
src/data/Styling:
Testing:
flowchart LR
Data[src/data/] -->|Import| Page[page.tsx]
Page -->|Props| ProjectsGrid
Page -->|Props| Publications
Page -->|Static| Footer
Page -->|Static| Navbar
Page -->|Static| Avatar
Navbar -->|Events| Firebase[Firebase]
Avatar -->|Events| Firebase
ProjectsGrid -->|Events| Firebase
Publications -->|Events| Firebase
Footer -->|Events| Firebase