{"id":15061624,"url":"https://github.com/alyssonbarrera/next-saas-rbac","last_synced_at":"2026-02-18T16:31:40.345Z","repository":{"id":257124761,"uuid":"857343145","full_name":"alyssonbarrera/next-saas-rbac","owner":"alyssonbarrera","description":"Projeto SaaS Next.js RBAC","archived":false,"fork":false,"pushed_at":"2024-10-22T11:47:04.000Z","size":2556,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T17:09:34.696Z","etag":null,"topics":["casl","fastify","monorepo","multitenancy","nextjs","nodejs","postgresql","prisma","rbac","react-query","shadcn-ui","tailwindcss","turborepo"],"latest_commit_sha":null,"homepage":"","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/alyssonbarrera.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":"2024-09-14T12:02:37.000Z","updated_at":"2024-10-22T17:47:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b64c18f4-1cb3-40d5-96fe-94cbc2ad46af","html_url":"https://github.com/alyssonbarrera/next-saas-rbac","commit_stats":{"total_commits":92,"total_committers":2,"mean_commits":46.0,"dds":0.04347826086956519,"last_synced_commit":"cb97ab7d680eb1c6e4de78caf6ceb69640e76507"},"previous_names":["alyssonbarrera/next-saas-rbac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alyssonbarrera/next-saas-rbac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssonbarrera%2Fnext-saas-rbac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssonbarrera%2Fnext-saas-rbac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssonbarrera%2Fnext-saas-rbac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssonbarrera%2Fnext-saas-rbac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alyssonbarrera","download_url":"https://codeload.github.com/alyssonbarrera/next-saas-rbac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssonbarrera%2Fnext-saas-rbac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29585548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["casl","fastify","monorepo","multitenancy","nextjs","nodejs","postgresql","prisma","rbac","react-query","shadcn-ui","tailwindcss","turborepo"],"created_at":"2024-09-24T23:22:54.321Z","updated_at":"2026-02-18T16:31:40.328Z","avatar_url":"https://github.com/alyssonbarrera.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 get project details;\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\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\u003cdiv align=\"center\"\u003e\n    \u003cdiv\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-1.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-2.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-3.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-4.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-5.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-6.png\" /\u003e\n        \u003cimg width=\"100%\" src=\"./assets/print-7.png\" /\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\n## Video\n\nhttps://github.com/user-attachments/assets/db1b600d-e86c-46fc-8d21-243f069691f0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyssonbarrera%2Fnext-saas-rbac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falyssonbarrera%2Fnext-saas-rbac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyssonbarrera%2Fnext-saas-rbac/lists"}