GithubHelp home page GithubHelp logo

eulazzo / instagramclone Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 34.18 MB

[ Nextjs Project ] Instagram Clone With React/nextjs, Tailwindcss,Firebase and Recoil.

JavaScript 98.69% CSS 1.31%
tailwindcss reactjs nextjs recoil next nextauth firebasev9

instagramclone's Introduction

instagram

Instagram - For educational purposes only

About    |     Gifs    |    Getting Started    |    Technologies    |    License

Github Stars Commits License

SIGMA CHAT GIF

About the project

Instagram clone

Application clone for educational purposes only

Developed with Nextjs, NodeJs,Tailwindcss,
Firebase v9, Recoil NextAuth

What's Recoil ?

Recoil is an state management librarie, like Redux or Context APIs. But Recoil unlike Redux is more easy to set up. Created by Dave McCabe, recoil provides a global state so all components in a react application can share states easily and it is minimal compared to Redux with no boilerplate code setup needed.

According to the official documentation the two core concepts of recoil is Atoms and Selector.
Atoms are units of the global stated provided by recoil, components can access and subscribe to changes made to them. Selectors in other hands with them, we can transform states either synchronously or asynchronously, and components can also access and subscribe to.

Why use Recoil ?

In cases where Redux is not that necessary recoil has advantages as, for example, is a minimal and there are no boilerplate code to get started. Diferent from Redux that require write a ammount of code to set it up. Recoil just like Redux, provides a global state, with recoil we wont have to pass state as props down to childreen components in order to share them between components (a concept know as prop drilling)

Recoil in this instagram clone

So..in the header component when the user clicks on the plus button for upload an image. I need to be able to tell a global store that inside the app an action occurred in the header component. I mean, i cant just have the plus button and then some state at the header level because doesn't work. If i do that, on the header level i will have some state which means that if i click on the plus button to upload an image that state it is set to true so the modal is opened. So far so good, but firstly how do i go a level up? Because the header component is rendered on the Home component i can't lift state from the component. State is one way thing, it only go compoment and could pass down but we dont want to do that. For that reason, a global Store it's necessary. So...tipically the way it's works is if we had a "modal state" by default is gonna be false we dont want the modal to be opened all the time, when somebody clicks the litle plus button on the header we are gonna trigger these global store variable which has the modal state inside of it trigger to true, now wherever i'm on the app i should be able to access and change the value.

Features

  • Login (Firebase Authentication)
  • Post (Firebase Store)
  • Like a post
  • Comment

App features so far

Login and Making a Comment

SIGMA CHAT GIF

Making a post

SIGMA CHAT GIF

Leaving a Comment on a Post

SIGMA CHAT GIF

Getting started

  1. Clone this repo using [email protected]:eulazzo/instagram-clone.git
  2. Move yourself to the appropriate directory: cd instagram-clone
  3. Run npm install to install dependencies
  4. Create a .env.local file and add the GOOGLE_CLIENT_ID,
    GOOGLE_CLIENT_SECRET from firebase and for NEXTAUTH_URL= http://localhost:3000

Getting started with the frontend

  1. Run npm start or yarn start to start the web application

Technologies

Back-end Front-end
Firebase ReactJS
next
tailwindcss
Recoil
Prettier

License

This project is licensed under the MIT License - see the LICENSE page for details.

instagramclone's People

Contributors

eulazzo avatar

Watchers

 avatar

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.