Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 1.82 KB

README.md

File metadata and controls

80 lines (59 loc) · 1.82 KB

💻 MetaHub

image

🚀 Overview

MetaHub is a social media application built using React and Firebase. The platform allows users to create personalized profiles, publish content, follow other users, and interact with posts through likes. The application is designed to provide a smooth and interactive user experience, leveraging modern front-end and back-end technologies.

📋 Requirements

  • Node.js
  • Firestore
  • React Router
  • React Icons

🔧 Installation

  1. Clone the repository:
git clone https://github.com/VictorBravim/MetaHub.git
  1. Navigate to the project directory:
cd MetaHub
  1. Install the dependencies:
npm install

🛠️ Project Rules

  • FireStore
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId} {
      allow read: if request.auth != null;
      allow write: if request.auth != null;
    }

    match /users/{userId}/followers/{followerId} {
      allow write: if request.auth != null && request.auth.uid != null && request.auth.uid == followerId;
    }

    match /posts/{postId} {
      allow read: if request.auth != null;
      allow write: if request.auth != null;
      allow delete: if request.auth != null && request.auth.uid == resource.data.userId;
    }
  }
}
  • Storage
rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /postImages/{userId}/{allPaths=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
    match /profileImages/{userId}/{allPaths=**} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
    }
  }
}

📄 License