Skip to content

luubinhan/luubinhan.github.io

Repository files navigation

Luu Binh An - Portfolio Website

Personal portfolio website for Luu Binh An, Senior Frontend Developer & Educator. Built with Gatsby 5 and React 18.

πŸš€ Tech Stack

  • Framework: Gatsby 5.13 (React 18.2)
  • Styling: SCSS + CSS Modules + Bootstrap 4.6
  • Animation: framer-motion 11.x
  • Navigation: react-scroll for smooth section scrolling
  • Node Version: 22.14.0

πŸ“‹ Prerequisites

  • Node.js 22.14.0 or higher
  • npm or yarn

πŸ› οΈ Development

Installation

npm install

Start Development Server

npm run dev
# or
npm run develop

Runs the development server at http://localhost:8000

Build

npm run build

Creates an optimized production build.

Build & Deploy to GitHub Pages

npm run deploy
# or
npm run build:gh

Builds with path prefix and deploys to GitHub Pages.

Clean Build

npm run clean

Removes the public directory.

πŸ“ Project Structure

src/
β”œβ”€β”€ components/          # Reusable React components (CSS Modules)
β”‚   β”œβ”€β”€ *.js            # Component files
β”‚   └── *.module.scss   # CSS Module styles
β”œβ”€β”€ pages/              # Gatsby page components
β”‚   β”œβ”€β”€ index.js        # Main landing page
β”‚   └── 404.js          # 404 error page
β”œβ”€β”€ sections/           # Page section components
β”œβ”€β”€ scss/               # Global SCSS styles
β”‚   β”œβ”€β”€ style.scss      # Main stylesheet entry
β”‚   β”œβ”€β”€ bootstrap/      # Bootstrap customization
β”‚   β”œβ”€β”€ components/     # Component-specific styles
β”‚   └── pages/          # Page-specific styles
β”œβ”€β”€ helpers/            # Utility functions
└── images/             # Image assets

static/
└── images/             # Static image assets (AVIF format)

🎨 Styling Architecture

The project uses CSS Modules as the primary styling approach:

CSS Modules Pattern

// Import as default
import styles from './ComponentName.module.scss';

// Usage
<div className={styles.className}>

Key Conventions

  • CSS Module files: ComponentName.module.scss in src/components/
  • Class names: camelCase (.sectionWork, not .section-work)
  • Global classes: Use :global(.className) for child elements receiving classes from props
  • Never use namespace imports: import * as styles ❌

SSR-Safe Animations

Always use the AnimatedDiv wrapper for framer-motion animations:

import AnimatedDiv from '../components/AnimatedDiv';

<AnimatedDiv
  initial={{ opacity: 0, y: 20 }}
  whileInView={{ opacity: 1, y: 0 }}
  viewport={{ once: true }}
  transition={{ duration: 0.6 }}
>
  {/* content */}
</AnimatedDiv>

Never import motion directly from framer-motion to avoid SSR issues.

πŸ”§ Configuration

Gatsby Configuration

  • CSS Modules: Configured with cssLoaderOptions.esModule: false and namedExport: false
  • ESLint: Disabled via webpack config override
  • Sass warnings: Silenced for legacy deprecations

Environment Variables

  • NETLIFY_GOOGLE_ANALYTICS_ID: Google Analytics tracking ID

πŸ“± Features

  • Single-page application with smooth scroll navigation
  • Responsive design with Bootstrap grid system
  • 16-column custom grid layout for portfolio items
  • Animated section transitions with framer-motion
  • Course showcase sections
  • Blog integration
  • Portfolio work gallery

🌐 Deployment

The site is deployed to GitHub Pages. Use the following command to build and deploy:

npm run deploy

This will:

  1. Build the site with path prefixes
  2. Deploy to the gh-pages branch
  3. Make it available at https://luubinhan.github.io/

πŸ“ License

MIT License - Copyright (c) Luu Binh An

πŸ‘€ Author

Luu Binh An

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •