Modern Next.js website for phpMyFAQ, a popular open-source FAQ management system.
- Next.js 15.5.4 with App Router
- TypeScript for type safety
- Bootstrap 5 for responsive design
- SCSS for styling
- Font Awesome for icons
- Vitest for unit testing
- Playwright for E2E testing
- Install dependencies:
pnpm install
- Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser.
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm start
- Start production serverpnpm lint
- Run ESLint
pnpm test
- Run unit tests with Vitestpnpm test:ui
- Run unit tests with UIpnpm test:coverage
- Run unit tests with a coverage reportpnpm test:e2e
- Run Playwright E2E testspnpm test:e2e:ui
- Run E2E tests with UIpnpm test:e2e:headed
- Run E2E tests in headed mode
pnpm fetch:versions
- Fetch latest version informationpnpm fetch:downloads
- Fetch download metadatapnpm update:data
- Update all external data
src/
├── app/ # Next.js App Router pages
│ ├── download/ # Download page
│ ├── features/ # Features page
│ ├── documentation/ # Documentation page
│ ├── support/ # Support page
│ ├── news/ # News pages (by year)
│ ├── docs/ # Documentation pages
│ ├── security/ # Security advisories
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Homepage
│ └── globals.scss # Global styles
├── components/ # React components
│ ├── Header.tsx # Navigation header
│ ├── Footer.tsx # Site footer
│ ├── Hero.tsx # Homepage hero section
│ ├── RecentNews.tsx # News component with markdown parsing
│ └── PageLayout.tsx # Page layout wrapper
├── lib/ # Utility functions
│ ├── data.ts # Data fetching helpers
│ ├── news.ts # News markdown parser
│ └── markdown.ts # Markdown/Handlebars processor
└── test/ # Test configuration
e2e/ # Playwright E2E tests
public/ # Static assets
data/ # External data (versions, downloads)
scripts/ # Data fetching scripts
This project includes comprehensive unit tests using Vitest and React Testing Library:
- Component rendering and behavior
- Utility functions and data helpers
- News parsing and markdown processing
Run unit tests:
pnpm test # Run all tests
pnpm test:ui # Interactive UI
pnpm test:coverage # Coverage report
Playwright E2E tests ensure:
- All pages load correctly (no 404 errors)
- Navigation works properly
- Favicon loads without errors
- Page content displays correctly
Run E2E tests:
pnpm test:e2e # Headless mode
pnpm test:e2e:ui # Interactive UI
pnpm test:e2e:headed # Headed browser mode
The site uses:
- Bootstrap classes for responsive layout
- Custom fonts (Lato, Cabin) loaded from
/public/fonts/
- Component-based architecture for maintainability
- TypeScript for development safety
Build the static site:
pnpm build
The site is optimized for static hosting and can be deployed to any static hosting provider.