KRISH MAURYA — FOLIO ©2026
0
[CS /06] Case study — ©2025SELECTED WORK (03)

AI-BLOG

A full-stack blogging platform that combines AI-assisted content generation, custom authentication, role-based access control and a responsive React experience backed by a TypeScript API and PostgreSQL.

ROLEFull-stack · solo build
TIMELINE2025 · 4 weeks
CORE STACKReact · TypeScript · Express · Prisma · PostgreSQL
STATUSDeployed
[01] OverviewTHE SHORT VERSION

What it is.

AI-BLOG is a full-stack content publishing platform designed to simplify the process of creating, managing and discovering blog articles. Users can browse published posts, read detailed articles and submit comments, while administrators manage content, users and publication status from a protected dashboard.

The application is split into a Vite-powered React frontend and a TypeScript Express backend. Prisma handles PostgreSQL persistence through Supabase, while JWT authentication and role-aware middleware protect administrative and user-specific operations.

AI-assisted writing is integrated directly into the blog creation workflow. A server-side AI controller accepts a topic prompt and returns structured HTML content suitable for rendering inside the editor, helping authors generate article drafts while retaining control over the final content.

TypeScriptReactViteNode.jsExpressPostgreSQLSupabasePrismaJWTbcryptTailwind CSSAxiosGroq AIImageKitVercel
inspier-blog.vercel.app06 / 03
ai-blog — dashboard
AI-BLOG — app preview

AI-BLOG

React frontend · Express API · Prisma + PostgreSQL · AI-assisted writing
[02] ApproachHOW IT GOT BUILT

Built in four moves.

STEP 01

React + Vite frontend

The client is built with React and TypeScript using Vite for fast local development, optimized production builds and a responsive single-page experience.

STEP 02

Express REST API

The backend exposes separate admin, blog and user route modules, keeping authentication, content management and account operations organized around clear API boundaries.

STEP 03

JWT authentication with RBAC

Custom JWT authentication and bcrypt password hashing protect user accounts, while middleware verifies tokens and restricts administrator routes from regular users.

STEP 04

Prisma + PostgreSQL

Prisma provides typed database access for users, blogs and comments, with PostgreSQL hosted through Supabase for persistent application data.

STEP 05

AI-assisted content generation

Authors can generate beginner-friendly blog content from a prompt. The server requests valid HTML output with headings and paragraphs that can be used directly in the blog editor.

[03] Key featuresSHIPPED & WORKING

What it does.

AI blog generation

Generate structured article drafts from a topic prompt using the server-side AI integration.

Custom authentication

Email and password authentication with bcrypt hashing and signed JWT access tokens.

Role-based access

Separate user and administrator permissions protect content management and moderation workflows.

Blog publishing workflow

Administrators can create, delete and toggle publication status for blog articles.

Comments and moderation

Readers can submit comments while administrators control which comments become publicly visible.

Image uploads

Blog cover images are uploaded through ImageKit and optimized into responsive WebP assets.

Responsive interface

A Tailwind CSS-based React interface adapts across desktop, tablet and mobile layouts.

Pagination and content discovery

The frontend includes reusable blog cards, detail pages and pagination for browsing published content.

[04] Under the hood$ tree ./ai-blog

How it fits together.

krish@dev — zsh — 80×24
krish@dev ~ % tree ./ai-blog --depth 1
●./AI-BLOG
●├── client/ React + Vite frontend
●│ ├── src/components/ Shared UI, blog pages and admin views
●│ ├── src/context/ Application-level state and API interaction
●│ └── src/App.tsx React routing and application shell
●├── server/ TypeScript + Express backend
●│ ├── src/routes/ Admin, blog and user API routes
●│ ├── src/controllers/ Authentication, blogs, comments and AI generation
●│ ├── src/middleware/ JWT authentication and role protection
●│ ├── src/config/ AI and image storage integrations
●│ └── src/lib/ Prisma database client
●├── server/prisma/ PostgreSQL schema and Prisma configuration
●└── vercel.json Deployment configuration for Vercel
KEY DECISIONSDECISIONS.md
  • React + Vite over a heavier meta-framework — fast development and a focused client-side application architecture.
  • Express with TypeScript — simple REST API boundaries while preserving type safety across backend modules.
  • Prisma over handwritten SQL — typed database queries and a clear schema for users, blogs and comments.
  • JWT authentication over third-party auth — complete control over login, authorization and role-based access.
  • PostgreSQL through Supabase — relational persistence suitable for users, articles, comments and moderation states.
  • ImageKit for media handling — optimized blog images without storing large binary files directly in PostgreSQL.
  • AI-generated HTML output — content is returned in a format that can be rendered directly inside the blog editor and article pages.