{"id":28731646,"url":"https://github.com/luismda/next-saas-rbac","last_synced_at":"2026-05-15T21:10:36.866Z","repository":{"id":298412648,"uuid":"999240865","full_name":"luismda/next-saas-rbac","owner":"luismda","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-11T00:52:47.000Z","size":347,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-11T01:38:13.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luismda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-10T00:47:46.000Z","updated_at":"2025-06-11T00:52:50.000Z","dependencies_parsed_at":"2025-06-11T01:49:02.569Z","dependency_job_id":null,"html_url":"https://github.com/luismda/next-saas-rbac","commit_stats":null,"previous_names":["luismda/next-saas-rbac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luismda/next-saas-rbac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismda%2Fnext-saas-rbac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismda%2Fnext-saas-rbac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismda%2Fnext-saas-rbac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismda%2Fnext-saas-rbac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luismda","download_url":"https://codeload.github.com/luismda/next-saas-rbac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luismda%2Fnext-saas-rbac/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260029939,"owners_count":22948253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T18:40:26.623Z","updated_at":"2026-05-15T21:10:31.815Z","avatar_url":"https://github.com/luismda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js SaaS + RBAC\n\nThis project is a monorepo with a multi-tenant SaaS with Next.js and Node.js including authentication and RBAC \u0026 ABAC.\n\n## Features\n\n### Authentication\n\n- [x] It should be able to authenticate using e-mail \u0026 password;\n- [x] It should be able to authenticate using Github account;\n- [x] It should be able to recover password using e-mail;\n- [x] It should be able to create an account (e-mail, name and password);\n\n### Organizations\n\n- [x] It should be able to create a new organization;\n- [x] It should be able to get organizations to which the user belongs;\n- [x] It should be able to update an organization;\n- [x] It should be able to shutdown an organization;\n- [x] It should be able to transfer organization ownership;\n\n### Invites\n\n- [x] It should be able to invite a new member (e-mail, role);\n- [x] It should be able to accept an invite;\n- [x] It should be able to revoke a pending invite;\n\n### Members\n\n- [x] It should be able to get organization members;\n- [x] It should be able to update a member role;\n\n### Projects\n\n- [x] It should be able to get projects within a organization;\n- [x] It should be able to create a new project (name, url, description);\n- [x] It should be able to update a project (name, url, description);\n- [x] It should be able to delete a project;\n\n### Billing\n\n- [x] It should be able to get billing details for organization ($20 per project / $10 per member excluding billing role);\n\n## RBAC\n\nRoles \u0026 permissions.\n\n### Roles\n\n- Owner (count as administrator)\n- Administrator\n- Member\n- Billing (one per organization)\n\n### Permissions table\n\n|                          | Administrator | Member | Billing |\n| ------------------------ | ------------- | ------ | ------- |\n| Update organization      | ✅            | ❌     | ❌      |\n| Delete organization      | ✅            | ❌     | ❌      |\n| Invite a member          | ✅            | ❌     | ❌      |\n| Revoke an invite         | ✅            | ❌     | ❌      |\n| List members             | ✅            | ✅     | ✅      |\n| Transfer ownership       | ⚠️            | ❌     | ❌      |\n| Update member role       | ✅            | ❌     | ❌      |\n| Delete member            | ✅            | ⚠️     | ❌      |\n| List projects            | ✅            | ✅     | ✅      |\n| Create a new project     | ✅            | ✅     | ❌      |\n| Update a project         | ✅            | ⚠️     | ❌      |\n| Delete a project         | ✅            | ⚠️     | ❌      |\n| Get billing details      | ✅            | ❌     | ✅      |\n| Export billing details   | ✅            | ❌     | ✅      |\n\n\u003e ✅ = allowed\n\u003e ❌ = not allowed\n\u003e ⚠️ = allowed w/ conditions\n\n#### Conditions\n\n- Only owners may transfer organization ownership;\n- Only administrators and project authors may update/delete the project;\n- Members can leave their own organization;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismda%2Fnext-saas-rbac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluismda%2Fnext-saas-rbac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluismda%2Fnext-saas-rbac/lists"}