This NextJS project is designed to test your skills and help you learn more about NextJS, API integration, and building dynamic web applications. In this README, you will find all the details you need to complete the challenge successfully.
This project involves creating a dynamic web application using NextJS. You will work with various components, API endpoints, and implement features like filters and searches. The project is divided into several components and pages, each with specific tasks and functionalities.
To get started with the project, follow these steps:
-
Clone the repository to your local machine.
-
Navigate to the project directory.
-
Run the following command to install the required dependencies, including "json-server":
npm install
-
After installing the dependencies, run the following commands to start the development server and API server:
npm run server npm run dev
You can access the following API endpoints:
-
The project's navbar.
-
Visible on each route.
-
Highlights the current page with the active class.
-
Toggles the search on click.
-
Makes the search form inside the header redirect to the search page on submit.
-
Sends the search query to filter blogs and products on that page.
- Displayed on each route.
- Fetches data for preTitle and title from http://localhost:5001/banner_content.
- Clicking on these should lead to the shop overview page and filter the results.
-
Fetches data for products from [http://localhost:5001/products/?_limit=4].
-
Leads to the product detail page on click.
-
Fetches data for blogs from [http://localhost:5001/blogs/?_limit=3].
-
Leads to the blog detail page on click.
-
Displays the page title.
-
Reusable across other pages.
- Fetches data from [http://localhost:5001/about_page].
-
Filters products or blogs by gender or search.
-
Supports filter results server-side.
-
Provides an "All Products" filter to clear filters.
-
Shows a "no results" message when necessary.
- Initially fetches data from [http://localhost:5001/products].
- Filters products using API endpoints.
- Fetches data for the product from [http://localhost:5001/products/id-of-product].
- Shows random four products.
- Fetches data from [http://localhost:5001/products?_start=${randomNo}&_limit=4].
- Initially fetches data from [http://localhost:5001/blogs].
- Filters blogs using API endpoints.
- Fetches data for the blog from [http://localhost:5001/blogs/id-of-blog].
- Shows random three blogs.
- Fetches data from [http://localhost:5001/blogs?_start=${randomNo}&_limit=3].
- Uses the search query sent from the header form.
- Searches through product and blog items.
- Supports filter results using specific endpoints.
If you encounter any issues, have questions, or need assistance with the challenge, you can reach out to our support team:
Email: nenad.shkurtevski1@gmail.com
This project was developed by Nenad Shkurtevski, a passionate frontend developer eager to contribute to the open-source community. You can find more of my work and contact me through the following channels:
-
LinkedIn: https://www.linkedin.com/in/nenad-shkurtevski-b49b20250/
-
Portfolio: https://shkurtevski.dev/
-
GitHub: https://github.com/Shkurtevski
Happy coding! 🚀🏆