Skip to content

raihan-ly/blogging-cms

Repository files navigation

Multi-User Blogging & Content Management System

A full-stack blogging platform built with React and Supabase that allows users to create, manage, and publish blog posts while enforcing secure, user-level data ownership and public read-only access.

The system supports:

  • Google OAuth authentication
  • Author-specific content management
  • Public blog feed
  • Full article view
  • Search by title
  • Secure backend access using PostgreSQL Row Level Security (RLS)

🧠 System Architecture

System Architecture

🔐 Authentication Flow

  1. User signs in using Google OAuth
  2. Supabase creates an authenticated session
  3. On first login, a profile is created in the profiles table
  4. The user is redirected to /dashboard
  5. All subsequent requests include the user’s identity

🗄️ Database Design

profiles

Column Purpose
id Links to Supabase Auth user
full_name User’s name from Google profile
created_at Account creation time

posts

Column Purpose
id Unique post ID
title Post title
content Full article text
author_id Owner of the post
published Public or private
created_at Creation time
updated_at Last modified

🔒 Security Model (Row Level Security)

The database enforces:

  • Public users
    Can read only posts where published = true

  • Authenticated users
    Can create, update, and delete only their own posts

This prevents:

  • Editing someone else’s content
  • Viewing private drafts
  • Bypassing UI restrictions

🖥️ Application Pages

Route Access Purpose
/ Public Browse published blog posts
/posts/:id Public Read full article
/login Public Google OAuth login
/dashboard Authenticated Manage your posts

🔍 Search

The public feed supports search by title, implemented using database-level queries for performance and accuracy.


📸 Screenshots

Public Feed — Before Login

Public Feed Before Login

Public Feed — After Login

Public Feed After Login

Post Detail View

Post Detail

Dashboard

Dashboard

Login Page

Login Page

About

Multi-user blogging platform with Google OAuth authentication, author-owned content management, public read-only posts, and PostgreSQL Row Level Security.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors