Coder Social home page Coder Social logo

andrecampll / next-ifood Goto Github PK

View Code? Open in Web Editor NEW
81.0 3.0 13.0 17.43 MB

Ifood clone made with NextJS ⚛️

Home Page: https://next-ifood.vercel.app/lista-restaurantes

License: MIT License

TypeScript 97.53% JavaScript 0.68% CSS 1.79%
react reactjs json-server ifood redux redux-saga styled-components typescript javascript nextjs

next-ifood's Introduction

iFood 🍔

This repository refers to a Front-end Clone of the iFood application made with Next.js 🚀

Proposal 🔥

This project is a study of the iFood interface. The idea is to simulate a food delivery application, bringing data from a fake API and integrate the information available on screen, such as the restaurants available to the customer. The difference of this project is the responsive mode built for all mobile devices and the pages built using Server Side Rendering (SSR).

Tecnologies 🚀

Next.js ⚛️
React ⚛️
Redux ⚛️
Redux Saga ⚛️
Styled-Components 💅🏻
React Icons ⚛️❤️
Typescript 🦕

Result 🤓

How to get this repository? 🤔

To obtain this project, follow the steps:

  1. Clone this repository using git clone .
  2. Run the yarn command at the root of the cloned project folder to download the dependencies.
  3. Run npx json-server server.json -p 3333 at the root of the project folder to initialize the Fake API.
    (if you want, you can use the public api url managed by My JSON Server, which comes by default in the api.ts file)
  4. Run yarn dev at the root of the project folder to start the application in development mode.
  5. Open the application in your emulator. 🚀

How to contribute? 😍

Fork this repository

# Clone your fork
$ git clone your-fork-url && cd next-ifood

# Create a branch with your feature or bug fix
$ git checkout -b my-branch

# Commit your changes
$ git commit -m 'my changes'

# Push your branch
$ git push origin my-branch

Delete your branch, if you want, when your pull request merge.

Made with 💜 by andrecampll .

next-ifood's People

Contributors

andrecampll avatar caiotracera avatar dependabot[bot] avatar ricardovasconcelos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next-ifood's Issues

Add real user location to Header.

It would be nice if user could actually see his address in header using the browser's Geolocation API. It would make the clone similar to the original behavior.

Can I add a PR to implement this feature?

Greetings,
Caio.

Improvements on tests

Problems

  • You aren't testing some components at all

You are using debug as part of the test, and debug is, like the name says, a debug tool.

  • You should also look your coverage, I'm pretty sure it's too low for this application

if (!data) {
return (
<Container className="scroll-box">
<div role="list" className="scroll-box__wrapper">
<CategoryPlaceHolder repeatCount={13} />
</div>
</Container>
);
}

E.g., You aren't testing this error.

  • You also should stop mocking fetch

Solution

  • In the Categories.spec case, you should test if the location is changing to your category page when clicking the image (Which in my mind it should be a button to a better SEO and better testing practices, getByRole).

  • https://kentcdodds.com/blog/stop-mocking-fetch Stop mocking fetch

Tips

  • Who told you should test with debug() stop listening and following him/her

  • Tests should be simple and readable

  • Check your coverage and don't just create component without test since you have tested already, try to not hurry on creating your app, it's like painting every step is needed to create beautiful art. Create the component -> Create the test. Or even follow TDD's practices (But for now create the tests)

  • If you know how to create tests and why you are doing it, you let many people behind you, and believe me you cannot rush programming learning, so if you want to test something get a time and study tests.

Any doubt or even if you disagree with, don't hesitate to contact me :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.