Skip to content

ElenaManukyan/Page-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

81 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Page Analyzer

Actions Status PHP-Linter

Page Analyzer is a full-fledged web application built with PHP and the Slim framework that analyzes specified web pages for SEO suitability. The service checks page availability and extracts critical SEO tags.

Demo:

Demo

πŸ“‹ Project Description

This application allows you to:

  • Add new sites for monitoring via a user-friendly form on the main page.
  • View a list of all added resources, including the results of their latest checks (status code, date).
  • Run detailed SEO checks for a specific page.
  • Maintain a check history, storing:
    • HTTP response code.
    • Page Title (from the <title> tag).
    • Main heading (<h1>).
    • Meta description (description).

πŸ›  Tech Stack

  • Backend: PHP (Slim Framework).
  • Database: PostgreSQL (using PDO library for queries).
  • Frontend: Bootstrap for responsive design.
  • Infrastructure: Makefile for task automation, deployed via Render.com.

πŸ’» System Requirements

  • PHP: >= 8.1
  • Composer: For dependency management.
  • PostgreSQL: For data storage.
  • Make: To execute build and run commands.

πŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/ElenaManukyan/php-project-9.git
cd php-project-9

2. Install Dependencies

Use Composer via the provided Makefile:

make install

3. Database Setup

The application requires PostgreSQL. Follow these steps to prepare your local environment:

  1. Create the database:

    createdb page_analyzer

    or

    1.1. Enter the standard PostgreSQL console

    psql postgres

    1.2. Execute the query inside the console:

    CREATE DATABASE page_analyzer

    1.3. Exit the console

    \q
  2. Initialize the table structure using the provided SQL file:

    psql -d page_analyzer -f database.sql
  3. Set up your environment variables: Create a .env file in the root directory and add your connection string:

    DATABASE_URL=postgresql://<your_login>:<your_password>@localhost:<your_port>/<your_name_db>

4. Launch the Application

Start the built-in PHP server:

make start

By default, the application will be available at: http://localhost:8000.

πŸ›  Available Commands (Makefile)

  • make start - Starts the web server on port 8000.
  • make install - Installs all project dependencies via Composer.
  • make lint - Runs the PHP linter (PHP_CodeSniffer) following the PSR12 standard.
  • make stop - Stops the server running on the specified port.

πŸ“Έ Interface Preview

The application features an intuitive interface divided into three main sections:

  1. Home Page: A form to input a URL and add a site to the system. image
  2. Sites List: A table showing all resources and the status of their most recent check. image
  3. Analysis Page: Detailed historical data for every check performed on a specific URL. image

About

πŸ” Page Analyzer β€” A PHP (Slim) web application for rapid SEO site auditing. It checks page availability and instantly extracts key tags: Title, H1, and Description.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors