All Work

Blog Platform (Blogify)

Next-generation blogging — admin approval workflows, three-tier roles, and a premium glassmorphism dark UI.

RoleFull-Stack Developer
Year2024
Duration2 months
TeamSolo Project
Status✓ Completed
Blogify — Blog home page

The Problem

Most simple blogging demos ship basic CRUD with no real access control. Blogify was built to demonstrate that a full CMS for multiple authors needs a real approval gate — without vetting, spam and low-quality accounts pollute the platform immediately. The challenge was building a three-tier permission model where Admins control who can publish, Authors control their own content, and Readers interact only through comments.

The Solution

A role-based multi-user CMS with a mandatory account approval workflow. New registrations land in a pending queue visible only to Admins, who can approve or reject with one click. Once approved, Authors get access to a rich text editor, category management, and image uploads. Readers can comment on any post. The entire UI runs on a custom premium dark glassmorphism theme built with pure CSS variables — theme switching is instant with no layout shift.

Architecture

Key Features

Screenshots

Code Highlight

Post Service — Create Post with Auto Slug Generation
public class PostService : IPostService
{
    private readonly IPostRepository _postRepository;
    private readonly IMapper _mapper;

    public PostService(IPostRepository postRepository, IMapper mapper)
    {
        _postRepository = postRepository;
        _mapper = mapper;
    }

    public async Task<PostDto> CreatePostAsync(CreatePostDto dto, string authorId)
    {
        var post = new Post
        {
            Title      = dto.Title,
            Content    = dto.Content,
            Slug       = GenerateSlug(dto.Title),
            AuthorId   = authorId,
            CategoryId = dto.CategoryId,
            CreatedAt  = DateTime.UtcNow,
            IsPublished = dto.IsPublished
        };

        await _postRepository.AddAsync(post);
        return _mapper.Map<PostDto>(post);
    }

    private string GenerateSlug(string title)
    {
        return title.ToLower()
            .Replace(" ", "-")
            .Replace("--", "-");
    }
}

Challenges & Solutions

🎯 Implementing SEO-friendly URLs with auto-generated slugs and duplicate prevention

Created a slug generation service that converts post titles to URL-friendly lowercase strings, strips special characters, and appends a short hash suffix when a collision is detected — keeping URLs clean without breaking existing links.

🎯 Securing rich-text editor output against XSS while preserving legitimate HTML

Implemented a server-side HTML sanitizer that allows a safe allowlist of tags and attributes (headings, bold, italic, links, images) while stripping all script tags, event handlers, and unsafe attributes before persisting to the database.

Tech Stack

ASP.NET Core MVCC# / .NET 9Entity Framework CoreSQL ServerASP.NET IdentityBootstrap 5jQueryAJAXJavaScript

What I Learned

Links

Interested in a similar solution?

Let's discuss how I can build something like this for your business.