PagePulse is a simple web-based website auditing tool that analyzes a given URL and generates a quick report containing important technical and SEO-related information.
The purpose of this project was to build a reliable REST API that can fetch a webpage, extract useful information, handle different failure scenarios, and provide a clean interface for users to view the results.
- Analyze any website URL
- Fetch HTTP response status
- Measure website response time
- Extract webpage title
- Count H1 headings
- Check meta description availability
- Detect images missing alt attributes
- Calculate a basic SEO score
- Display audit results through a simple frontend interface
- Handle invalid URLs, unreachable websites, timeout cases, and non-HTML responses gracefully
- Java
- Spring Boot
- REST API
- Maven
- Jsoup for HTML parsing
- HTML
- CSS
- JavaScript
- Clone the repository.
- Open the backend project in IntelliJ IDEA.
- Build the project using Maven.
- Run the Spring Boot application.
The backend will start on:
http://localhost:8080
Open the index.html file in a browser.
The frontend communicates with the backend API and displays the generated audit report.
POST /api/audit
Example:
{
"url": "https://example.com"
}Example:
{
"url": "https://example.com",
"title": "Example Domain",
"statusCode": 200,
"wordCount": 21,
"h1Count": 1,
"seoScore": 60,
"metaDescriptionPresent": false,
"imagesMissingAlt": 0,
"message": "Audit completed successfully"
}The application handles different failure scenarios:
Example: hello
Returns a validation error instead of crashing.
If a website cannot be accessed, the API returns a meaningful error response.
If the website does not respond within the configured time limit, the API returns a timeout response.
If the URL points to a non-HTML resource, such as an image file, the API identifies it and returns an appropriate response.
The application follows a layered structure with separate Controller, Service, DTO, and Exception handling components.
The controller handles API requests, while the service contains the website analysis logic. This keeps the code organized and easier to maintain.
Jsoup was used for extracting HTML information because it provides a simple way to parse webpages and access elements like titles, headings, metadata, and images.
This avoids manually processing raw HTML content.
Instead of allowing failures to break the application, different scenarios such as invalid URLs, unreachable websites, timeout cases, and unsupported content types are handled separately.
This makes the API more reliable and user-friendly.
The project includes automated tests covering:
- Successful website audit (Happy Path)
- Website not reachable scenario
- Non HTML response scenario
These tests verify that the application produces expected results for both successful and failure cases.
If given additional development time, I would improve the project by adding:
- More detailed SEO analysis rules
- Better URL validation
- Support for asynchronous website scanning
- Audit history and saved reports
- More detailed performance metrics
AI tools were used during development for understanding implementation approaches, debugging issues, reviewing possible improvements, and improving project documentation.
The suggestions generated by AI were reviewed and modified according to the project requirements instead of being used directly. The final implementation decisions were made based on the application's design and expected functionality.
Frontend: https://page-pulse-five-pi.vercel.app/
Backend API: https://pagepulse-production-d2a3.up.railway.app/api/audit
Built as part of the Digital Heroes Software Development Internship Task.