This is a single-page application built with Next.js and Tailwind CSS for displaying a blog with posts and users. It utilizes the public API from GoRest to fetch data for blog posts and users.
- Display all posts on the home page (/).
- View detailed information about a post, including comments and author, on the post detail page (/post/:id).
- List all users with CRUD operations (Create, Read, Update, Delete) on the users page (/users).
- Pagination to navigate through large datasets.
- Responsive design for optimal viewing on various devices.
- Next.js
- Tailwind CSS
- DaisyUI
Follow these steps to run the application locally:
-
Clone the repository:
git clone https://github.com/ziyad1412/blog_nextjs.git
-
Navigate to the project directory:
cd blog_nextjs
-
Install dependencies:
npm install # or yarn install
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser to view the application.
- Home Page: / - Displays all blog posts.
- Post Detail Page: /post/:id - Displays detailed information about a specific post, including comments and author.
- Users Page: /users - Lists all users with CRUD operations.
The application is deployed using Vercel. You can access the deployed version here.
- This project utilizes Tailwind CSS with DaisyUI for styling. You can find more information about DaisyUI here.
- Ensure that the environment variables are properly set up for the API endpoint and authentication (if required) before running the application.
- Blog data is fetched from GoRest API.
- Built with ❤️ by Abdurrahman Ziyad.