/instagram-clone

Instagram Clone with Next.js and Firebase

Primary LanguageJavaScriptMIT LicenseMIT


Instagram Clone

This project is a simplified Instagram clone built using Next.js and Tailwind CSS. It includes core features like user authentication, posting, liking, commenting, and more. Our goal is to recreate some of the essential functionality of Instagram and build a platform for users to interact with posts and profiles.

πŸš€ Features

  • User Authentication: Login/Signup functionality.
  • CRUD Operations:
    • Create posts (with images or text)
    • Like posts
    • Comment on posts
    • Edit/Delete posts
  • Profiles: View your profile, follow users, see followers/following.
  • Explore Page: Discover new posts and users.
  • Responsive Design: Fully responsive UI built with Tailwind CSS.

πŸ› οΈ Technologies

  • Next.js: A React framework for server-side rendering and static web applications.
  • Tailwind CSS: A utility-first CSS framework for rapid UI development.
  • React Icons: Iconography for the sidebar and various UI elements.

πŸ“ Project Structure

Here’s an overview of the folder structure:

src/
β”‚
β”œβ”€β”€ assets/               # Static assets like fonts and images
β”‚   β”œβ”€β”€ fonts/
β”‚   └── images/
β”‚
β”œβ”€β”€ common/               # Common components like buttons and inputs
β”‚   β”œβ”€β”€ btn.jsx
β”‚   └── input.jsx
β”‚
β”œβ”€β”€ components/           # UI components used throughout the app
β”‚   β”œβ”€β”€ Create.jsx        # Component for creating new posts
β”‚   β”œβ”€β”€ More.jsx          # Load more button
β”‚   β”œβ”€β”€ PostCard.jsx      # Component to display posts
β”‚   β”œβ”€β”€ Search.jsx        # Search bar component
β”‚   β”œβ”€β”€ Stories.jsx       # Component to display stories
β”‚   └── Suggestions.jsx   # Component for user suggestions
β”‚
β”œβ”€β”€ layout/               # Layout components
β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”œβ”€β”€ MainFeed.jsx      # Main feed where user sees posts
β”‚   β”œβ”€β”€ Navbar.jsx        # Navigation bar
β”‚   └── Sidebars.jsx      # Sidebar navigation
β”‚
β”œβ”€β”€ lib/
β”‚   └── firebase.js       # Firebase configuration
β”‚
β”œβ”€β”€ pages/                # Next.js pages (routes)
β”‚   β”œβ”€β”€ api/              # API routes (server-side logic)
β”‚   β”œβ”€β”€ _app.js           # Custom App component (used to initialize pages)
β”‚   β”œβ”€β”€ _document.js      # Custom Document component
β”‚   β”œβ”€β”€ explore.jsx       # Explore page
β”‚   β”œβ”€β”€ forgotpassword.jsx
β”‚   β”œβ”€β”€ index.jsx         # Home page (main feed)
β”‚   β”œβ”€β”€ login.jsx         # Login page
β”‚   β”œβ”€β”€ messages.jsx      # Messages page
β”‚   β”œβ”€β”€ profile.jsx       # User profile page
β”‚   β”œβ”€β”€ reels.jsx         # Reels page
β”‚   └── signup.jsx        # Signup page
β”‚
β”œβ”€β”€ styles/
β”‚   β”œβ”€β”€ globals.css       # Global CSS
└── README.md             # Project documentation

πŸ”§ Setup Instructions

1. Clone the Repo

git clone https://github.com/talhashah-dev/instagram-clone.git
cd instagram-clone

2. Install Dependencies

Make sure you have Node.js and npm installed. Then run:

npm install

3. Run the Project Locally

Start the development server:

npm run dev

Now, visit http://localhost:3000 to view your app in the browser.

πŸ–ΌοΈ Screenshots

  • Home Page (Coming Soon)
  • Profile Page (Logged-in user's profile)
  • Explore Page (Explore new posts and users)

πŸ—οΈ Contributing

We are making this project open-source to allow contributors worldwide to help build and improve it.

Steps to Contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/new-feature).
  5. Open a pull request.

πŸ“„ License

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