This is a Next.js application that allows users to search for products on Allegro, with options to sort by bestsellers, popular items, and price. The application features a dark-themed UI using Tailwind CSS.
- Product search with query input
- Sorting options: Bestsellers, Popular, Price (Low to High, High to Low)
- Dark-themed UI with rounded cards for product display
- Responsive design
-
Clone the repository:
git clone https://github.com/aleksander-pankow/allegro-nextjs-starter.git cd allegro-nextjs-starter
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.local
file in the root of the project and add the following:NEXT_PUBLIC_ALLEGRO_CLIENT_ID=your_client_id NEXT_PUBLIC_ALLEGRO_CLIENT_SECRET=your_client_secret NEXT_PUBLIC_ALLEGRO_REDIRECT_URI=http:https://localhost:3000/callback NEXT_PUBLIC_ALLEGRO_API_BASE_URL=https://api.allegro.pl
-
Run the development server:
npm run dev
-
Open http:https://localhost:3000 with your browser to see the result.
- Enter a search query in the input field and click the "Search" button.
- Use the dropdown to select the sorting option.
- The results will be displayed in a responsive grid with rounded cards.
- Next.js
- Tailwind CSS
- Axios
Contributions are welcome! Please create a pull request with a detailed description of your changes.
This project is licensed under the MIT License.
If you like this project, consider buying me a coffee!