Skip to content

Software Requirement Specification (SRS) - Blog/Posts Management System

FieldDetail
Company Nameruizdev7
Document TitleBlog/Posts Management System - SRS
Document NumberSRS-002
Version1.0
Specification Date17-November-24
StatusImplemented
RoleNameDate
Project ManagerJoseph Ruiz17-November-24
Tech LeadJoseph Ruiz17-November-24
VersionDateChanges MadeAuthor
1.017-November-24Initial SRS DocumentationJoseph Ruiz

This document specifies the requirements for the implementation of a Blog and Posts Management System in the ruizdev7 Portfolio application.
The objective is to provide a flexible content management solution that allows users to create, read, update, and delete blog posts, manage categories, and view featured content with proper authorization controls.

The Blog/Posts Management System includes the following components:

  • Post CRUD Operations: Complete create, read, update, delete functionality for blog posts.
  • Category Management: Organize posts into categories for better content organization.
  • Slug-Based Routing: SEO-friendly URLs using automatically generated slugs.
  • Featured Posts: Highlight the most recent or important posts.
  • Random Post Selection: Display random posts for content discovery.
  • Author Attribution: Associate posts with user accounts.
  • Post Table View: Administrative interface for managing all posts.
  • Permission-Based Access: Role-based access control for content management.

The implementation ensures:

  • Data integrity through SQLAlchemy ORM
  • SEO optimization with slug-based URLs
  • Scalable content structure
  • Integration with the authentication system
  • Post: A blog article containing title, content, author, category, and metadata.
  • Slug: A URL-friendly string derived from the post title (e.g., “my-first-post”).
  • Featured Post: The most recent or manually selected post displayed prominently.
  • Category: A classification tag for organizing related posts.
  • Author: The user who created the post.
  • Published At: Timestamp indicating when the post was published.

Priority: High
Description:

FieldDetail
Use Case NameCreate Blog Post
Subject AreaContent Management
Business EventThis use case applies when an authorized user wants to create a new blog post.
ActorsAuthenticated user with posts.create permission, ruizdev7 Platform.
Use Case OverviewThis use case covers the creation of a new blog post with title, content, author, and category.
PreconditionsUser must be authenticated and have posts.create permission.
Termination OutcomeNew post is created and stored in the database with a generated slug.
Condition Affecting OutcomeMissing required fields, invalid category, or database errors.
Use Case DescriptionThe system validates input data, generates a URL slug from the title, associates the post with the author and category, and stores it in the database.
Use Case AssociationsUC-015: View Blog Posts, UC-016: Update Blog Post.
Traceability ToSRS-002.
Input SummaryTitle, content, author ID (ccn_author), category ID (ccn_category).
Output SummaryCreated post with generated slug and timestamp.
Usability IndexHigh, core functionality for content creators.
Use Case NotesSlug is automatically generated from title. Duplicate slugs are handled with numeric suffixes.
CriterionDescription / Acceptance Condition
Post CreationAuthorized users can create posts with auto-generated slugs.
Post ViewingAnyone can view published posts without authentication.
Post EditingPost owners or users with permissions can update posts.
Post DeletionAuthorized users can delete posts.
Featured PostHomepage displays the most recent post prominently.
Random PostsSystem can return 3 random posts for content discovery.
Category AssociationAll posts must be associated with a valid category.
Author AttributionAll posts display author full name.
Slug GenerationSlugs are automatically generated from titles and are URL-safe.
Permission EnforcementOnly authorized users can create, update, or delete posts.
CategoryRequirement
PerformancePost retrieval in under 200ms for single posts, under 500ms for lists.
SecurityAuthorization checks on all write operations. SQL injection prevention through ORM.
Availability99.95% uptime for blog content.
ScalabilitySupport for 10,000+ posts without performance degradation.
SEOAll posts accessible via SEO-friendly slug URLs.
Data IntegrityForeign key constraints for author and category relationships.

Table: tbl_posts

  • ccn_post (Primary Key, Auto-increment)
  • title (String, Required)
  • content (Text, Required)
  • slug (String, Unique, Auto-generated)
  • ccn_author (Foreign Key -> tbl_users)
  • ccn_category (Foreign Key -> tbl_categories)
  • published_at (Timestamp, Auto-generated)
  • updated_at (Timestamp, Auto-updated)

Table: tbl_categories

  • ccn_category (Primary Key)
  • category (String, Unique)
  • description (Text)
MethodEndpointDescriptionAuth RequiredPermission
POST/api/v1/postsCreate postYesposts.create
GET/posts/{id}Get single postNoNone
GET/api/v1/postsGet 3 random postsNoNone
GET/api/v1/posts-tableGet all posts (admin)Yesposts.read
GET/api/v1/posts/featured_postGet featured postNoNone
PUT/api/v1/posts/{id}Update postYesposts.update
DELETE/api/v1/posts/{id}Delete postYes (optional)None
  1. Post Creation:

    • Validate input (title, content, author, category)
    • Generate slug from title
    • Store in database with timestamp
    • Return created post
  2. Post Retrieval:

    • Query database
    • Join with users table (for author name)
    • Join with categories table (for category name)
    • Format and return data
  3. Slug Generation Algorithm:

    • Convert title to lowercase
    • Replace spaces with hyphens
    • Remove special characters
    • Handle duplicates with numeric suffix

SchemaPost (Marshmallow):

  • Serializes Post model
  • Excludes internal fields
  • Includes nested author and category data
FieldDetail
Stakeholdersruizdev7 Team, Content Creators
Attachments[API_DOCUMENTATION.md]
Tech StackFlask, SQLAlchemy, Marshmallow
Frontend IntegrationReact components: FeaturedPost, PostList, PostTable
Name/TitleSignatureDate
Client Representativeruizdev717-November-24
Company Representativeruizdev717-November-24