A Next.js application that consumes the JSONPlaceholder API (https://jsonplaceholder.typicode.com) to display users, posts, and comments in a user-friendly interface.
- View a list of users with infinite scrolling
- View detailed user information including contact details and company information
- View comments on posts
- Responsive and user-friendly design
This is a Next.js project bootstrapped with
create-next-app.
Before you begin, ensure you have the following installed:
- Node.js: Download and install Node.js
git clone git@github.com:MohammadShehadeh/jsonplaceholder.git
cd jsonplaceholdernvm usepnpm installpnpm devOpen http://localhost:3000 with your browser to see the result.
In the project directory, you can run:
pnpm buildBuilds the app for production to the .next folder.
It correctly bundles Next in production mode and optimizes the build for the best performance.
pnpm startExecute this script to run the Next.js app in production mode. Once the app is running,
you can access it in the browser at http://localhost:3000
This command is typically used after running the pnpm build script.
pnpm format
pnpm format:fixPrettier is used for code formatting. To ensure consistent formatting throughout the project.
This command will automatically format the code based on the rules defined in the .prettierrc.js
configuration file.
pnpm lint
pnpm lint:fixRun the linter to analyze the code for potential errors.
pnpm test
pnpm test:watch
pnpm test:coverageRun the tests to analyze the code for potential bugs.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!