A modern, full-stack blogging platform built with Next.js 14, featuring real-time interactions, user authentication, and a sleek responsive design.
- π User Authentication - Secure signup/login system
- π¬ Comment System - Interactive commenting on blog posts
- π Search Functionality - Find blogs by title, content, or author
- π€ User Profiles - Customizable user profiles with edit capabilities
- π± Responsive Design - Optimized for desktop, tablet, and mobile
- π Dark/Light Theme - Toggle between themes for better UX
- β‘ Real-time Updates - Dynamic content loading with Redux state management
- π Pagination - Efficient content browsing
- π¨ Modern UI - Built with Tailwind CSS and shadcn/ui components
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Redux Toolkit
- Rich Text Editor: Custom implementation
- API: Next.js API Routes
- Database: Prisma ORM
- Authentication: Custom JWT implementation
- File Handling: Next.js built-in capabilities
- Language: JavaScript
- Linting: ESLint
- Package Manager: npm/yarn
- Database Management: Prisma
- Node.js 18+ installed
- npm or yarn package manager
- Database (PostgreSQL, MySQL, or SQLite)
-
Clone the repository
git clone https://github.com/0x4nud33p/Blog-App.git cd Blog-App
-
Install dependencies
npm install # or yarn install
-
Environment Setup Create a
.env.local
file in the root directory:# Database DATABASE_URL="your-database-connection-string" # JWT Secret JWT_SECRET="your-super-secret-jwt-key" # Next.js NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-nextauth-secret"
-
Database Setup
# Generate Prisma client npx prisma generate # Run database migrations npx prisma db push # (Optional) Seed the database npx prisma db seed
-
Start the development server
npm run dev # or yarn dev
-
Open your browser Navigate to http://localhost:3000
βββ 0x4nud33p-blog-app/
βββ app/ # Next.js App Router
β βββ (router)/ # Route groups
β β βββ _components/ # Shared components
β β βββ home/ # Home page & blog details
β β βββ myblog/ # User's personal blogs
β β βββ search/ # Search functionality
β β βββ signup/ # User registration
β βββ api/ # API routes
β β βββ (comment)/ # Comment operations
β β βββ (posts)/ # Blog post operations
β β βββ (update)/ # Update operations
β β βββ (user)/ # User operations
β βββ redux/ # State management
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
βββ DB/ # Database configuration
βββ lib/ # Utility functions
βββ prisma/ # Database schema
βββ utils/ # Helper utilities
- Sign up or log in to your account
- Navigate to "My Blogs" section
- Click "Create New Post"
- Use the rich text editor to write your content
- Add a compelling title and publish
- Browse to any blog post
- Scroll to the comment section
- Write your comment and submit
- Engage with other readers' comments
- Access your profile from the navigation menu
- Update your username, email, and other details
- View and manage your published blogs
POST /api/user/signup
- User registrationPOST /api/user/login
- User loginPOST /api/user/logout
- User logout
GET /api/posts/post
- Get all blog postsPOST /api/posts/post
- Create new blog postGET /api/posts/post/[id]
- Get specific blog postGET /api/posts/search
- Search blog posts
GET /api/comment/getcomment
- Get comments for a postPOST /api/comment/create
- Create new commentDELETE /api/comment/deletecomment
- Delete comment
PUT /api/update/username
- Update usernamePUT /api/update/useremail
- Update user emailPUT /api/update/updateTitle
- Update blog titlePUT /api/update/updatePara
- Update blog content
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m "Add some amazing feature"
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add tests for new features when applicable
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Create an Issue: GitHub Issues
- Discussions: GitHub Discussions
- Built with Next.js
- UI components from shadcn/ui
- Styled with Tailwind CSS
- Database management with Prisma
Made with β€οΈ by 0x4nud33p
Features β’ Quick Start β’ Usage β’ Contributing