Skip to content

๐Ÿ“ A modern Blog Application built with Next.js, featuring secure authentication and role-based access control for Admins and Users. Easily manage content with a clean and scalable architecture.

Notifications You must be signed in to change notification settings

aliahmed338/Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Blog App

๐Ÿ“ Blog App

A modern Blog Application built with Next.js, Tailwind CSS, and shadcn/ui. The app supports authentication & authorization with separate Admin and User roles.

Installation

Use the package manager npm to install node_modules.

npm install

Install Prisma CLI as a development dependency.

npm install prisma --save-dev

Set up a NeonDB PostgreSQL database at Neon and obtain your connection string.

Create a .env file in the project root with the following:

DATABASE_URL=postgresql://neondb_owner:*********************************************=require
JWT_SECRET=ascu********************************SDF
NODE_ENV=production || development
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=*************
CLOUDINARY_API_KEY=**************
CLOUDINARY_API_SECRET=**********************************
CLOUDINARY_URL=cloudinary://97167********478:***********************************
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=blog-app

Set up a Cloudinary account at Cloudinary for image uploads.

Generate Prisma client and apply migrations:

npx prisma generate
npx prisma db push

Start the development server:

npm run dev

๐Ÿš€ Features

  • Authentication & Authorization

    • Secure login & register with JWT via custom API routes

    • Role-based access (Admin, User)

  • User Features

    • Browse articles

    • Read full blog posts

    • Comment & interact with posts

  • Admin Features

    • Create, delete blog posts

    • Manage users

    • Dashboard to track articles & interactions

  • UI / UX

    • Built with Tailwind CSS for responsive design

    • shadcn/ui components for modern & accessible UI

    • Dark / Light mode support

๐Ÿ‘ค Author

Built by Ali Ahmed

About

๐Ÿ“ A modern Blog Application built with Next.js, featuring secure authentication and role-based access control for Admins and Users. Easily manage content with a clean and scalable architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published