Page Pulse is a fast, sleek web tool that audits URLs for critical SEO and performance metrics.
- Clone the repository.
- Install dependencies: ```bash npm install ```
- Run the development server: ```bash npm run dev ```
- Open http://localhost:3000 in your browser.
The application features a single backend endpoint to fetch and parse URL data.
Endpoint: `/api/audit` Method: `POST` (or `GET`, depending on your code) Content-Type: `application/json`
Request Body: ```json { "url": "https://example.com" } ```
Success Response (200 OK): ```json { "httpStatus": 200, "responseTime": 145, "pageTitle": "Example Domain", "metaDescription": null, "h1Count": 1, "missingAltTextCount": 0, "wordCount": 27 } ```
- Next.js (App Router) for the Full Stack:
- Reasoning: Using Next.js allowed me to build both the React frontend UI and the backend API endpoint within a single repository. This significantly reduced setup time, simplified routing, and made deployment to Vercel seamless.
- Cheerio for DOM Parsing:
- Reasoning: I chose Cheerio instead of a headless browser (like Puppeteer) because the assignment only requires static HTML parsing. Cheerio operates entirely in-memory, avoiding the massive server overhead of spinning up Chromium, which keeps the API response times incredibly fast.
- Tailwind CSS for UI/UX:
- Reasoning: Tailwind allowed me to rapidly prototype a sleek, modern interface without writing custom CSS files. It ensures the design is consistent, responsive, and easy to maintain while keeping the bundle size small.