Skip to content

Revolutionize your coding experience with Snipshare - the all-in-one platform for creating, executing, and sharing Node.js code snippets! Join the coding revolution today at www.snipshare.co πŸš€πŸŒŸ

License

Notifications You must be signed in to change notification settings

joaopcm/snipshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0026685 Β· Jul 24, 2024
Jul 23, 2024
Jul 24, 2024
Jun 7, 2024
Jul 24, 2024
Apr 26, 2024
Jul 24, 2024
Jul 24, 2024
Jul 23, 2024
Jun 7, 2024
Jul 24, 2024
Jun 7, 2024
Apr 23, 2024

Repository files navigation

Snipshare

This project contains all the necessary boilerplate to setup a multi-tenant SaaS with Next.js including authentication and RBAC authorization.

Features

Authentication

  • It should be able to authenticate using email & password;
  • It should be able to authenticate using Github account;
  • It should be able to recover password using email;
  • It should be able to create an account (email, name and password);

Organizations

  • It should be able to create a new organization;
  • It should be able to get organizations to which the user belongs;
  • It should be able to update an organization;
  • It should be able to shutdown an organization;
  • It should be able to transfer organization ownership;

Invites

  • It should be able to invite a new member (email, role);
  • It should be able to accept an invite;
  • It should be able to revoke a pending invite;

Members

  • It should be able to get organization members;
  • It should be able to update a member role;

Projects

  • It should be able to get projects within a organization;
  • It should be able to create a new project (name, url, description);
  • It should be able to update a project (name, url, description);
  • It should be able to delete a project;

Billing

  • It should be able to get billing details for organization ($20 per project / $10 per member excluding billing role);

RBAC

Roles & permissions.

Roles

  • Owner (count as administrator)
  • Administrator
  • Member
  • Billing (one per organization)
  • Anonymous

Permissions table

Administrator Member Billing Anonymous
Update organization βœ… ❌ ❌ ❌
Delete organization βœ… ❌ ❌ ❌
Invite a member βœ… ❌ ❌ ❌
Revoke an invite βœ… ❌ ❌ ❌
List members βœ… βœ… βœ… ❌
Transfer ownership ⚠️ ❌ ❌ ❌
Update member role βœ… ❌ ❌ ❌
Delete member βœ… ⚠️ ❌ ❌
List projects βœ… βœ… βœ… ❌
Create a new project βœ… βœ… ❌ ❌
Update a project βœ… ⚠️ ❌ ❌
Delete a project βœ… ⚠️ ❌ ❌
Get billing details βœ… ❌ βœ… ❌
Export billing details βœ… ❌ βœ… ❌

βœ… = allowed ❌ = not allowed ⚠️ = allowed w/ conditions

Conditions

  • Only owners may transfer organization ownership;
  • Only administrators and project authors may update/delete the project;
  • Members can leave their own organization;

About

Revolutionize your coding experience with Snipshare - the all-in-one platform for creating, executing, and sharing Node.js code snippets! Join the coding revolution today at www.snipshare.co πŸš€πŸŒŸ

Topics

Resources

License

Stars

Watchers

Forks

Languages