This repository contains the demo project for building a secure chat application using React, Firebase, and Permit.io for role-based access control (ReBAC). Users are assigned roles like Member and Moderator, with permissions to perform different CRUD operations in real-time chat rooms. Check out the full tutorial on the Permit blog.
Visit my blog, Timonwa's Notes, for more awesome technical content such as articles, code snippets, tech goodies, community projects, and more.
If you find this repository helpful, please give it a ⭐ to show your support!
- Relationship-based access control (ReBAC) using Permit.io
- Real-time messaging with Firebase
- User authentication with Firebase Auth (Google login)
- Chat rooms with permissions: moderators and members
- CRUD actions with different permissions per role
- React – Frontend library for building UI
- Firebase – For real-time database and authentication
- Permit.io – Handles permissions and relationship-based access control
- Cloud Functions – Backend API for permission checks
To run this project locally:
-
Clone the repository:
git clone https://github.com/timonwa/react-chat-permitio-firebase.git
-
Install dependencies:
cd react-chat-permitio-firebase npm install
-
Start the development server:
npm start
This project is licensed under the MIT License – see the LICENSE file for details.