{"id":15061684,"url":"https://github.com/mtguerson/next-saas-rbac","last_synced_at":"2026-03-12T18:47:46.327Z","repository":{"id":255926849,"uuid":"849413852","full_name":"mtguerson/next-saas-rbac","owner":"mtguerson","description":"🚀 - A Next.js SaaS boilerplate with multi-tenant support, authentication, organization and project management, billing, and role-based access control (RBAC). Ideal for building SaaS platforms with flexible user roles and permissions.","archived":false,"fork":false,"pushed_at":"2024-09-27T17:53:53.000Z","size":1145,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T13:42:36.248Z","etag":null,"topics":["bcryptjs","fastify","nextjs","nodejs","swagger","turborepo","zod"],"latest_commit_sha":null,"homepage":"https://next-saas-rbac-lilac.vercel.app","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/mtguerson.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}},"created_at":"2024-08-29T14:51:46.000Z","updated_at":"2025-05-05T07:43:50.000Z","dependencies_parsed_at":"2024-11-21T07:42:24.590Z","dependency_job_id":"4cd5c895-1541-4d26-8686-5650ad363e36","html_url":"https://github.com/mtguerson/next-saas-rbac","commit_stats":{"total_commits":96,"total_committers":2,"mean_commits":48.0,"dds":0.04166666666666663,"last_synced_commit":"eb27159b16ad3260827329057533bdb359aaa154"},"previous_names":["mtguerson/next-saas-rbac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtguerson/next-saas-rbac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtguerson%2Fnext-saas-rbac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtguerson%2Fnext-saas-rbac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtguerson%2Fnext-saas-rbac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtguerson%2Fnext-saas-rbac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtguerson","download_url":"https://codeload.github.com/mtguerson/next-saas-rbac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtguerson%2Fnext-saas-rbac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30438444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bcryptjs","fastify","nextjs","nodejs","swagger","turborepo","zod"],"created_at":"2024-09-24T23:23:41.097Z","updated_at":"2026-03-12T18:47:46.291Z","avatar_url":"https://github.com/mtguerson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js SaaS + RBAC\n\nThis project contains all the necessary boilerplate to setup a multi-tenant SaaS with Next.js including authentication and RBAC authorization.\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- Anonymous\n\n### Permissions table\n\n|                          | Administrator | Member | Billing | Anonymous |\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#### 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;\n\n### Screenshots\n\n![image](https://github.com/user-attachments/assets/70cac864-f507-43df-af41-0eb23d4aba98)\n![image](https://github.com/user-attachments/assets/3271f824-098a-4c2e-a9c8-5f98f66b02c2)\n![image](https://github.com/user-attachments/assets/a96fc8b0-1213-4616-b0f0-d7eb5482416a)\n![image](https://github.com/user-attachments/assets/d8942357-567c-4c1f-a4c1-60e41e3c5bb3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtguerson%2Fnext-saas-rbac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtguerson%2Fnext-saas-rbac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtguerson%2Fnext-saas-rbac/lists"}