This is my portfolio website.
- Node.js (v18.0.0 or higher)
- pnpm (recommended package manager)
- Git
- Clone the repository
git clone https://github.com/jhenbertgit/next-portfolio.git
cd next-portfolio- Install dependencies
pnpm installNote: This project uses pnpm as the package manager. If you don't have pnpm installed, run
npm install -g pnpm
- Set up environment variables
cp .env.example .env.localEdit .env.local with your configuration values.
- Start development server
pnpm devThe application will be available at http://localhost:3000
├── public/ # Static files
├── src/
│ ├── app/ # Next.js 13+ App Router
│ │ ├── api/ # API routes
│ │ ├── globals.css # Global styles
│ │ ├── layout.tsx # Layout component
│ │ ├── page.tsx # Page component
│ ├── components/ # Shared components
│ ├── lib/ # Utility functions
- Next.js 13+
- TypeScript
- Tailwind CSS
- Use TypeScript for type safety
- Follow ESLint configuration
- Use Prettier for code formatting
- Follow component naming convention:
PascalCase.tsx
# Development
pnpm dev # Start development server
# Testing - Unit Tests
pnpm test # Run unit tests
pnpm test:watch # Run unit tests in watch mode
pnpm test:coverage # Run unit tests with coverage
# Testing - E2E Tests
pnpm test:e2e # Run E2E tests (headless)
pnpm test:e2e:ui # Run E2E tests with UI (recommended)
pnpm test:e2e:headed # Run E2E tests in headed mode
pnpm test:e2e:debug # Debug E2E tests
pnpm test:e2e:report # View E2E test report
# Linting
pnpm lint # Run ESLint
pnpm format # Run Prettier
# Building
pnpm build # Create production build
pnpm start # Start production server- Create feature branch from
main
git checkout -b feature/your-feature-name- Make your changes and commit using conventional commits
git commit -m "feat: add new feature"
git commit -m "fix: resolve bug issue"- Push changes and create Pull Request
git push origin feature/your-feature-nameRequired environment variables:
RESEND_API_KEY=
NEXT_PUBLIC_FROM_EMAIL=
NEXT_PUBLIC_TO_EMAIL=
- API documentation available at resend
This project includes comprehensive testing coverage with both unit and end-to-end tests.
- 227+ test cases across 18 test files
- Complete coverage of components, hooks, utilities, and API routes
- Run with:
pnpm test
- 120+ test cases across 7 specification files
- Multi-browser testing (Chromium, Firefox, WebKit)
- Mobile responsiveness testing (iPhone, Pixel, Samsung)
- Accessibility compliance (WCAG 2.1 AA)
- Run with:
pnpm test:e2e:ui
# Install Playwright browsers (one-time setup)
pnpm exec playwright install# Unit tests
pnpm test # Run all unit tests
pnpm test:watch # Watch mode
pnpm test:coverage # With coverage report
# E2E tests
pnpm test:e2e:ui # UI mode (recommended for development)
pnpm test:e2e # Headless mode (CI/CD)
pnpm test:e2e:debug # Debug specific tests
pnpm test:e2e:report # View HTML report| Type | Files | Tests | Coverage |
|---|---|---|---|
| Unit Tests | 18 | 227+ | Components, Hooks, Utils, API |
| E2E Tests | 7 | 120+ | Navigation, Forms, Mobile, A11y |
For detailed testing information, see:
- Testing Quick Start Guide - Quick setup and common commands
- E2E Test Report - Comprehensive E2E test coverage
- E2E Testing Summary - Executive summary
- E2E Documentation - Detailed E2E testing guide
Common issues and solutions:
- Port 3000 already in use
# On Unix/Mac
kill -9 $(lsof -t -i:3000)
# Or run on different port
pnpm dev --port 3001- Node modules issues
rm -rf node_modules
rm pnpm-lock.yaml
pnpm install- E2E tests: Browser not installed
pnpm exec playwright install- E2E tests: Tests timing out
Increase timeout in playwright.config.ts:
use: {
timeout: 30000, // 30 seconds per test
}This project is licensed under the MIT License - see the LICENSE.md file for details.