Welcome! This repository contains my solution for Rocketseat´s open source Frontend Challenge.
Content:
About • Challenges Requirements • Utils Links • Installation • Prerequisites • Running the API (Backend) • Running Frontend • Results • Collaborators • License •
The goal of this project is to enhance my frontend development skills using Next.js, tailwindCss and TypeScript, with a focus on server components and their iterations. This project provides an opportunity to explore new approaches to solving technical challenges, particularly in consuming GraphQL APIs.
The challenge is to implement an e-commerce platform for selling mugs and t-shirts, featuring the following functionalities:
- Product catalog with pagination
- Filter products by category
- Search by product name
- Add and remove products from cart
- Checkout
- Follow this prototype
- Use Next.js and Typescript
- Create components with styled-components (I made it with TailwindCss)
- consume from the provided GraphQL API
This section describes how to run the project locally.
Here you list all prerequisites necessary for running your project. For example:
- NodeJS
- npm
- TypeScript
- Git
- Clone this repo
git clone https://github.com/EriveltoSilva/frontend-challenge-ecommerce.git
- Go to the API folder
cd frontend-challenge
cd api
- Install dependencies
npm install
- Run start
npm start
- Opening GraphiQL in Web Browser with url (optional):
http://localhost:3333/
- You can see all api products typing in GraphiQL (optional):
query{
allProducts{
id
name
description
price_in_cents
image_url
sales
created_at
category
}
_allProductsMeta {
count
}
}
- Clone this repo
git clone https://github.com/EriveltoSilva/frontend-challenge-ecommerce.git
- Go to the project folder
cd frontend-challenge
- Install dependencies
npm install
- Copy .env.example to .env.local file
cp .env.example .env.local
- Run Frontend
npm run dev
Special thank you for all people that contributed for this project.
Erivelto Silva |
This project is licensed under the MIT License. See the LICENSE file for more information.