Software Requirements Specification (SRS)
1. Introduction
Purpose
This document provides the Software Requirements Specification (SRS) for the eBlogs
platform, which allows users to create, view, and interact with blog posts. The platform also
includes functionality for users to upload images for blog posts, with automatic image resizing
and conversion.
Scope
The eBlogs platform includes the following key features:
• Blog management (creating and editing blog posts)
• User authentication (sign-up and login)
• Image upload for blog posts with file validation and resizing
• Commenting system for blogs
• Admin access to manage blogs and users
Definitions, Acronyms, and Abbreviations
• SRS: Software Requirements Specification
• UID: User ID
• Blog: A post on the platform that can include text and images
• Image Upload: The ability for users to upload images associated with their blog posts
• WebP: A modern image format used for better compression and smaller file sizes
2. Overall Description
Product Perspective
The eBlogs platform is a web-based application that allows users to post blogs, upload images,
and interact with other users through comments. The platform is developed using PHP for
server-side scripting, MariaDB for the database, and Bootstrap for front-end design.
Product Functions
• User Authentication: Users can register, log in, and access blog features.
• Blog Creation: Users can create and edit blog posts with a title and content.
• Image Upload: Users can upload images associated with blog posts. The uploaded
images are resized and converted to the WebP format.
• Commenting: Users can comment on blogs.
• Admin Features: Admin users can update and delete blogs and manage users.
User Classes and Characteristics
• Admin: Users with admin privileges who can manage blogs and users.
• Regular User: Users who can create and interact with blogs, but cannot manage other
users.
Operating Environment
• Web Server: Apache or Nginx
• PHP Version: PHP 8.2 or higher
• Database: MariaDB 10.4.32
• Browser Support: Google Chrome, Firefox, Edge, Safari
3. System Features
User Registration and Login:
Description
The system allows users to register, log in, and access their personal dashboard. Authentication
is performed using email and password.
Functional Requirements
• The system must check if the email is already registered during sign-up.
• The system must hash the password before storing it in the database.
• The system must provide error messages in case of invalid email or password.
• Users must be redirected to the dashboard upon successful login.
Blog Management
Description
Users can create and edit blogs with a title and content. The platform supports a rich text
description field.
Functional Requirements
• The system must allow users to enter a title and content for the blog.
• The blog content must support rich text formatting (e.g., bold, italic, links).
• The system must save the blog in the database and associate it with the user’s ID ( uid).
• Blogs must have a timestamp (dt) for when they were created.
Image Upload and Conversion
Description
The system allows users to upload images associated with their blog posts. The images are
resized and converted to WebP format.
Functional Requirements
• Users must be able to upload images in JPG, JPEG, and PNG formats.
• Uploaded images must be resized to a maximum width of 640px, while maintaining the
aspect ratio.
• The system must convert images to the WebP format after resizing.
• Invalid or unsupported file types should be rejected with an appropriate error message.
• Images must be stored in the uploads/ directory.
Commenting System
Description
The system allows users to comment on blogs. Each comment is associated with a specific blog
and user.
Functional Requirements
• Users must be able to submit a comment on any blog.
• The system must display all comments associated with a blog.
• Comments must have a timestamp (dt) for when they were posted.
• Comments should display the name of the user who posted them.
4. External Interface Requirements
User Interfaces
The platform provides a web-based user interface with the following features:
• Login and sign-up forms
• Blog post creation and editing interface
• Image upload form
• Comment input section for each blog
Hardware Interfaces
No specific hardware interfaces are required for the operation of the system.
Software Interfaces
• PHP: Server-side scripting to handle user authentication, blog management, and image
processing.
• MariaDB: Database used for storing user information, blog entries, and comments.
• Bootstrap: Front-end CSS framework used to style the pages.
5. System Architecture and Design
Database Design
The system uses a MariaDB database with the following tables:
• users: Stores user information including name, email, and hashed password.
• blogs: Stores blog posts with title, content, user ID, and timestamp.
• comments: Stores comments related to blogs, along with user ID, blog ID, and timestamp.
File Structure
The application has the following directory structure:
• uploads/: Directory for storing uploaded images.
• /: Root directory containing the PHP scripts for the application.
Image Processing Logic
When an image is uploaded:
1. The image is validated to ensure it is in one of the allowed formats (JPG, JPEG, PNG).
2. The image is resized to a width of 640px, preserving the aspect ratio.
3. The image is converted to the WebP format.
4. The original image is deleted after conversion.
6. Non-Functional Requirements
Performance Requirements
• The system must be able to handle up to 100 concurrent users without significant
performance degradation.
• Image uploads should be processed and converted within 10 seconds for average file
sizes.
Security Requirements
• Passwords must be securely hashed using a modern algorithm (e.g., bcrypt).
• User authentication must prevent unauthorized access through session management.
• Uploaded images must be validated to prevent malicious file uploads.
Availability Requirements
The system should be available 24/7 with minimal downtime for maintenance.
Backup and Recovery
The system must have a mechanism for regular database backups to prevent data loss.
7. Appendix
SQL Schema for Database
The SQL schema for the database includes the creation of tables (blogs, comments, users),
inserting sample data, and setting up indexes for efficient querying.
PHP Code Overview
• dbconn.php: Establishes the database connection.
• user-logged.php: Handles user session and authentication checks.
• Image Upload Process: Handles file validation, resizing, conversion, and storage.
• blog-update.php: Displays the form for updating blog posts.
This document captures the major functional and non-functional requirements of the eBlogs
platform. It provides a high-level overview of the system's features, architecture, and expected
behavior. Further refinements may be added based on development progress and user feedback.