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.
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.
Built in four moves.
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.
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.
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.
Prisma + PostgreSQL
Prisma provides typed database access for users, blogs and comments, with PostgreSQL hosted through Supabase for persistent application data.
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.
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.
How it fits together.
- 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.
