Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 18 or higher recommended
Package Manager
Bun, npm, or Yarn (Bun 1.1.38+ recommended)
This project uses Bun 1.1.38 as the default package manager. You can also use npm or Yarn if preferred.
Installation
Clone the repository
Clone the Bennett Eghan portfolio from GitHub:This downloads the source code and navigates into the project directory.
Install dependencies
Install all required packages using your preferred package manager:This installs all dependencies including React, Vite, TypeScript, Tailwind CSS, and MDX tooling.
Start the development server
Run the development server with hot module replacement:The development server will start on http://localhost:5173 by default.
Verify the installation
Open your browser and navigate to http://localhost:5173. You should see:
- The homepage with Bennett Eghan’s profile
- Navigation menu (Projects, Blog)
- Monospace Courier New typography
- Tailwind CSS styling with the custom color palette
Building for Production
When you’re ready to build the optimized production bundle:Run the build command
Execute the build script which generates reading times and compiles the application:This command:
- Runs
scripts/reading-times.mjsto calculate reading times for blog posts - Compiles TypeScript using
tsc -b - Builds the optimized production bundle with Vite
dist/ directory.Preview the production build
Test the production build locally before deploying:This serves the production build locally for testing. Access it at http://localhost:4173.
Available Scripts
| Script | Command | Description |
|---|---|---|
dev | vite | Start development server with HMR |
build | node scripts/reading-times.mjs && bunx tsc -b && bunx vite build | Build optimized production bundle |
lint | eslint . | Run ESLint to check code quality |
preview | vite preview | Preview production build locally |
What’s Running?
When you start the development server, Vite configures:- React 18 with Fast Refresh for instant updates
- TypeScript type checking
- Tailwind CSS 4 with the @tailwindcss/vite plugin
- MDX processing for blog posts with:
rehype-prism-plusfor syntax highlightingremark-gfmfor GitHub-flavored markdownremark-emojifor emoji support
- Path aliases (
@/maps tosrc/) - Sitemap generation for https://www.bennett-eghan.com
vite.config.ts:15-40 for the complete Vite configuration.
Next Steps
Customize Content
Remove personal information and add your own blog posts and projects
Manage Projects
Add and manage your project showcase
Explore Components
Learn about the React component architecture
Styling System
Understand the Tailwind CSS configuration
Troubleshooting
Port 5173 is already in use
Port 5173 is already in use
If another process is using port 5173, Vite will automatically try the next available port (5174, 5175, etc.). Check the terminal output for the actual URL.
TypeScript errors during build
TypeScript errors during build
Run
bunx tsc --noEmit to check for type errors without building. Fix any errors in your source code before running the build again.MDX compilation errors
MDX compilation errors
Ensure your MDX files have valid frontmatter and proper JSX syntax. Check
vite.config.ts:18 for MDX plugin configuration.Module resolution errors
Module resolution errors
The project uses path aliases with
@/ mapping to src/. If you see import errors, verify the path alias configuration in vite.config.ts:42-46.Need Help?
- GitHub Issues: Report bugs or request features
- Source Code: View the repository
- Website: Visit the live site