This project is an RBAC (Role-Based Access Control) Policy Engine designed to manage hierarchical access for multiple applications. It allows for:
- Main Apps and Sub Apps to manage access control.
- Creating Roles and assigning Permissions to these roles.
- Assigning Roles to Users.
- Main App admins, developers, and marketers having access to all apps.
- Sub App admins, developers, and other roles having access only to their own Sub App's data.
- Users are registered and assigned a role.
- Roles determine what actions they can perform.
- Users belong to either a Main App or a Sub App.
- Roles are created and stored in the
rolestable. - Permissions are created and assigned to roles in the
role_permissionstable. - Each role can have multiple permissions.
- Main App Users (Admins, Developers, Marketers) have full access to all data.
- Sub App Users can only access data of their own Sub App.
git clone https://github.com/your-repository-name.git
cd your-repository-namecomposer install
npm install # If frontend assets are neededphp bin/console doctrine:database:create
php bin/console doctrine:migrations:migrateCopy .env file:
cp .env.example .envUpdate the database URL inside .env:
DATABASE_URL=mysql://user:password@127.0.0.1:3306/database_name
symfony server:startYour application will be available at http://127.0.0.1:8000
- After logging in, the user is redirected to the dashboard.
- The dashboard dynamically shows the role and permissions of the logged-in user.
- If the user belongs to a Sub App, they will only see their own app’s data.
- Admins can create new roles.
- Admins can assign permissions to each role.
- Users can be assigned roles from the dashboard.
| User Role | Access Level |
|---|---|
| Main App Admin | Full access to all data |
| Main App Dev | Full access to all data |
| Sub App Admin | Access to only their app |
| Sub App Dev | Access to only their app |
| Feature | URL |
|---|---|
| Register | http://127.0.0.1:8000/register |
| Login | http://127.0.0.1:8000/login |
| Dashboard | http://127.0.0.1:8000/dashboard |
| Users List | http://127.0.0.1:8000/admin/users |
| Assign Roles to Users | http://127.0.0.1:8000/admin/users/{id}/assign-role |
| Roles Management | http://127.0.0.1:8000/admin/roles |
| Permissions Management | http://127.0.0.1:8000/admin/permissions |
- Implement 2FA authentication for better security.
- Add logging & monitoring for access control actions.
- Create API endpoints for external integrations.
- Symfony (PHP Framework)
- Doctrine ORM (Database Management)
- Twig (Templating Engine)
- MySQL (Database)
- Bootstrap (Frontend Styling)
If you want to contribute, fork the repository, create a new branch, and submit a pull request!
This project is licensed under the MIT License.
🎉 Done! Now your project is documented properly! 🚀