A full-stack blog application built with Next.js 15, MongoDB, and Tailwind CSS. This app allows users to sign up, log in, create, edit, and delete blog posts. Admin users have access to an admin dashboard for managing posts and users.
ā
User Authentication ā Sign up, log in, and manage sessions using email & password.
ā
Blog Post Management ā Create, update, and delete blog posts.
ā
Admin Dashboard ā Admin users can manage posts and users.
ā
Protected Routes ā Access control for user and admin sections.
ā
Session Handling ā Secure cookies for authentication.
ā
SEO Friendly ā Optimized with metadata and fast performance.
ā
Fully Responsive ā Mobile-friendly UI with Tailwind CSS.
/src āāā app/ ā āāā dashboard/ # Admin dashboard (protected) ā āāā posts/ # Blog post pages ā āāā auth/ # Login & Register pages ā āāā home/ # Main home page āāā components/ # Reusable UI components āāā lib/ # Utility functions & database connections āāā middleware.js # Middleware for route protection āāā styles/ # Global styles āāā pages/api/ # API routes (Next.js backend)
git clone https://github.com/yourusername/nextjs15-blog-app.git
cd nextjs15-blog-app
npm install
Set Up Environment Variables
Create a .env.local file in the root directory and add:
env
Copy
Edit
MONGODB_URI=your_mongodb_connection_string
NEXTAUTH_SECRET=your_secret_key
npm run dev