nextjs-fastify-saas-rbac

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

    Language: json

    Author: Elijah Perry (@eperry)

    8 stars · 257 views

    Files

    • get-billing.ts (ts)
    • assets (txt)
    • brand-logo.svg (image)
    • hooks (txt)
    • resend-email-validation-code.tsx (tsx)
    • page.tsx (tsx)
    • actions.ts (ts)
    • dropdown.tsx (tsx)
    • dns-settings.tsx (tsx)
    • route.ts (ts)
    • callback (txt)
    • google (txt)
    • route.ts (ts)
    • github (txt)
    • route.ts (ts)
    • messages (txt)
    • error.ts (ts)
    • cancel-email-change.ts (ts)
    • seed.ts (ts)
    • fastify.d.ts (ts)
    • src (txt)
    • utils (txt)
    • generate-filename.ts (ts)
    • get-uploaded-avatar-names.ts (ts)
    • get-user-permissions.ts (ts)
    • organizations.tsx (tsx)
    • page.tsx (tsx)
    • project (txt)
    • actions.ts (ts)
    • apps (txt)
    • web (txt)
    • copy-to-clipboard.tsx (tsx)
    • get-initials.ts (ts)
    • get-first-name.ts (ts)
    • time-formated.ts (ts)
    • generate-slug.ts (ts)
    • lib (txt)
    • api-client.ts (ts)
    • utils.ts (ts)
    • react-query.ts (ts)
    • auth (txt)
    • validate-strong-password-schema.ts (ts)
    • resend-email-verification-schema.ts (ts)
    • sign-up-schema.ts (ts)
    • http (txt)
    • account (txt)
    • get-profile.ts (ts)
    • update-account-password.ts (ts)
    • delete-account.ts (ts)
    • get-membership.ts (ts)
    • remove-account-provider.ts (ts)
    • cancel-email-change.ts (ts)
    • check-email-change.ts (ts)
    • update-account.ts (ts)
    • providers (txt)
    • connect-github.ts (ts)
    • connect-google.ts (ts)
    • confirm-email-change.ts (ts)
    • auth (txt)
    • resend-email-validation-code.ts (ts)
    • recover-password.ts (ts)
    • sign-up.ts (ts)
    • sign-in-with-password.ts (ts)
    • verify-email-and-sign-in.ts (ts)
    • sign-in-with-google.ts (ts)
    • sign-in-with-github.ts (ts)
    • request-new-password.ts (ts)
    • members (txt)
    • update-member.ts (ts)
    • remove-member.ts (ts)
    • get-members.ts (ts)
    • invites (txt)
    • get-pending-invites.ts (ts)
    • create-invite.ts (ts)
    • reject-invite.ts (ts)
    • accept-invite.ts (ts)
    • get-invite.ts (ts)
    • get-invites.ts (ts)
    • revoke-invite.ts (ts)
    • projects (txt)
    • create-project.ts (ts)
    • delete-project.ts (ts)
    • update-project.ts (ts)
    • get-project.ts (ts)
    • get-projects.ts (ts)
    • update-avatar.ts (ts)
    • organizations (txt)
    • transfer-organization-ownership.ts (ts)
    • get-organizations.ts (ts)
    • shutdown-organization.ts (ts)
    • authorize-organization-domain.ts (ts)
    • get-organization.ts (ts)
    • leave-organization.ts (ts)
    • update-organization.ts (ts)
    • remove-organization-domain.ts (ts)
    • create-organization.ts (ts)
    • helpers (txt)
    • 20241010133143_apply_cascade_deletes (txt)
    • tailwind.config.ts (ts)
    • README.md (md)
    • tsconfig.json (json)
    • components.json (json)
    • package.json (json)
    • next.config.ts (ts)
    • src (txt)
    • utils (txt)
    • get-avatar-url.ts (ts)
    • get-role-name.ts (ts)
    • tsup.config.ts (ts)
    • @types (txt)
    • index.ts (ts)
    • schema (txt)
    • authorize-organization-domain-schema.ts (ts)
    • verify-email-schema.ts (ts)
    • create-project-schema.ts (ts)
    • confirm-email-change-schema.ts (ts)
    • sign-in-schema.ts (ts)
    • form-organization-schema.ts (ts)
    • recover-password-schema.ts (ts)
    • update-account-password-schema.ts (ts)
    • update-account-schema.ts (ts)
    • create-invite-schema.ts (ts)
    • update-project-schema.ts (ts)
    • forgot-password-schema.ts (ts)
    • use-form-state.ts (ts)
    • app (txt)
    • auth (txt)
    • forgot-password (txt)
    • actions.ts (ts)
    • page.tsx (tsx)
    • form.tsx (tsx)
    • providers-buttons.tsx (tsx)
    • verify-email (txt)
    • actions.ts (ts)
    • page.tsx (tsx)
    • form.tsx (tsx)
    • recover-password (txt)
    • actions.ts (ts)
    • page.tsx (tsx)
    • form.tsx (tsx)
    • actions.ts (ts)
    • sign-in (txt)
    • actions.ts (ts)
    • form.tsx (tsx)
    • sign-up (txt)
    • actions.ts (ts)
    • page.tsx (tsx)
    • form.tsx (tsx)
    • layout.tsx (tsx)
    • invite (txt)
    • [id] (txt)
    • decline (txt)
    • page.tsx (tsx)
    • page.tsx (tsx)
    • page.tsx (tsx)
    • providers.tsx (tsx)
    • robots.ts (ts)
    • sitemap.ts (ts)
    • layout.tsx (tsx)
    • globals.css (css)
    • (app) (txt)
    • account (txt)
    • settings (txt)
    • password (txt)
    • cancel-email-change-button.tsx (tsx)
    • actions.ts (ts)
    • form.tsx (tsx)
    • password.tsx (tsx)
    • avatar (txt)
    • actions.ts (ts)
    • form.tsx (tsx)
    • avatar.tsx (tsx)
    • organizations (txt)
    • api (txt)
    • page.tsx (tsx)
    • information (txt)
    • confirm-email-change-button.tsx (tsx)
    • actions.ts (ts)
    • information.tsx (tsx)
    • email-confirmation-alert.tsx (tsx)
    • form.tsx (tsx)
    • auth (txt)
    • leave-dialog.tsx (tsx)
    • providers (txt)
    • actions.ts (ts)
    • providers.tsx (tsx)
    • disconnect-button.tsx (tsx)
    • delete-account (txt)
    • delete-account.tsx (tsx)
    • actions.ts (ts)
    • sign-out (txt)
    • dialog.tsx (tsx)
    • page.tsx (tsx)
    • create-organization (txt)
    • page.tsx (tsx)
    • organization (txt)
    • actions.ts (ts)
    • [slug] (txt)
    • (projects) (txt)
    • page.tsx (tsx)
    • default.tsx (tsx)
    • (.)organization (organization)
    • [slug] (txt)
    • create-project (txt)
    • api (txt)
    • projects-list.tsx (tsx)
    • members (txt)
    • list (txt)
    • transfer-organization-dialog.tsx (tsx)
    • update-member-role-dialog.tsx (tsx)
    • remove-member-dialog.tsx (tsx)
    • actions.ts (ts)
    • dropdown.tsx (tsx)
    • members.tsx (tsx)
    • invites (txt)
    • revoke-invite-button.tsx (tsx)
    • invites.tsx (tsx)
    • actions.ts (ts)
    • form.tsx (tsx)
    • form.tsx (tsx)
    • [project] (txt)
    • delete-project-dialog.tsx (tsx)
    • update-avatar.tsx (tsx)
    • actions.ts (ts)
    • dropdown.tsx (tsx)
    • page.tsx (tsx)
    • update-project-dialog.tsx (tsx)
    • settings (txt)
    • shutdown-organization (txt)
    • shutdown-card.tsx (tsx)
    • shutdown-button.tsx (tsx)
    • actions.ts (ts)
    • avatar (txt)
    • actions.ts (ts)
    • form.tsx (tsx)
    • avatar.tsx (tsx)
    • page.tsx (tsx)
    • domain (txt)
    • actions.ts (ts)
    • domain.tsx (tsx)
    • domain-remove.tsx (tsx)
    • form.tsx (tsx)
    • billing (txt)
    • billing.tsx (tsx)
    • layout.tsx (tsx)
    • create-project (txt)
    • page.tsx (tsx)
    • form.tsx (tsx)
    • layout.tsx (tsx)
    • @dialog (txt)
    • (.)create-organization (create-organization)
    • page.tsx (tsx)
    • success.ts (ts)
    • validation.ts (ts)
    • middleware.ts (ts)
    • @types (txt)
    • avatar-receipient.ts (ts)
    • account-providers.ts (ts)
    • tokens.ts (ts)
    • components (txt)
    • trigger-toast-load.tsx (tsx)
    • form-error.tsx (tsx)
    • footer.tsx (tsx)
    • README.md (md)
    • form-avatar.tsx (tsx)
    • intercepted-dialog-content.tsx (tsx)
    • pending-invites (txt)
    • action.ts (ts)
    • index.tsx (tsx)
    • ui (txt)
    • card.tsx (tsx)
    • checkbox.tsx (tsx)
    • input.tsx (tsx)
    • tsconfig.json (json)
    • prisma (txt)
    • dialog.tsx (tsx)
    • separator.tsx (tsx)
    • radio-group.tsx (tsx)
    • table.tsx (tsx)
    • textarea.tsx (tsx)
    • skeleton.tsx (tsx)
    • label.tsx (tsx)
    • migration.sql (sql)
    • dropdown-menu.tsx (tsx)
    • button.tsx (tsx)
    • popover.tsx (tsx)
    • avatar.tsx (tsx)
    • select.tsx (tsx)
    • alert.tsx (tsx)
    • form-error-password.tsx (tsx)
    • dialog-action.tsx (tsx)
    • header (txt)
    • profile-button.tsx (tsx)
    • header-auth.tsx (tsx)
    • organization-switcher.tsx (tsx)
    • index.tsx (tsx)
    • project-switcher.tsx (tsx)
    • theme-switcher.tsx (tsx)
    • tabs (txt)
    • index.tsx (tsx)
    • nav-link.tsx (tsx)
    • form-submit-button.tsx (tsx)
    • form-grid.tsx (tsx)
    • form-group.tsx (tsx)
    • postcss.config.mjs (mjs)
    • public (txt)
    • acme-inc.png (image)
    • favicon-96x96.png (image)
    • favicon.ico (image)
    • favicon-dark.svg (image)
    • favicon-light.svg (image)
    • apple-touch-icon.png (image)
    • schema.prisma (prisma)
    • migrations (txt)
    • 20241030021638_add_date_to_accounts (txt)
    • migration.sql (sql)
    • 20241009125916_create_base_tables (txt)
    • migration.sql (sql)
    • 20241030004321_unique_account_from_provider (txt)
    • migration.sql (sql)
    • 20241029133857_add_payload_to_tokens (txt)
    • migration.sql (sql)
    • migration_lock.toml (toml)
    • 20241024155525_make_project_owner_optional (txt)
    • migration.sql (sql)
    • 20241025114829_create_avatar (txt)
    • migration.sql (sql)
    • 20241029173032_make_token_payload_optional (txt)
    • migration.sql (sql)
    • 20241025144842_add_unique_combination_of_avetars (txt)
    • migration.sql (sql)
    • 20241020185821_email_validation_and_project_slug (txt)
    • migration.sql (sql)
    • 20241030123642_add_google_account (txt)
    • migration.sql (sql)
    • 20241029135321_add_new_type_to_tokens (txt)
    • migration.sql (sql)
    • 20241019192941_organization_domain_validation (txt)
    • migration.sql (sql)
    • 20241025121840_make_avatar_receiver_type_optional (txt)
    • migration.sql (sql)
    • 20241024150704_add_cascade_delete_on_organizations (txt)
    • migration.sql (sql)
    • 20241009134413_change_user_to_owner_column (txt)
    • migration.sql (sql)
    • package.json (json)
    • generate-avatar.ts (ts)
    • generate-slug.ts (ts)
    • lib (txt)
    • prisma.ts (ts)
    • mail.ts (ts)
    • cloudflare-r2.ts (ts)
    • schemas (txt)
    • tokens-schema.ts (ts)
    • validate-strong-password-schema.ts (ts)
    • account-providers-schema.ts (ts)
    • http (txt)
    • middlewares (txt)
    • auth.ts (ts)
    • routes (txt)
    • account (txt)
    • update-password.ts (ts)
    • get-profile.ts (ts)
    • remove-provider.ts (ts)
    • delete-account.ts (ts)
    • check-email-change.ts (ts)
    • leave-organization.ts (ts)
    • update-account.ts (ts)
    • providers (txt)
    • connect-github.ts (ts)
    • connect-google.ts (ts)
    • confirm-email-change.ts (ts)
    • auth (txt)
    • resend-email-validation-code.ts (ts)
    • request-password-recover.ts (ts)
    • verify-email-and-authenticate.ts (ts)
    • create-account.ts (ts)
    • authenticate-with-google.ts (ts)
    • authenticate-with-password.ts (ts)
    • reset-password.ts (ts)
    • authenticate-with-github.ts (ts)
    • members (txt)
    • update-member.ts (ts)
    • remove-member.ts (ts)
    • get-members.ts (ts)
    • invites (txt)
    • get-pending-invites.ts (ts)
    • create-invite.ts (ts)
    • reject-invite.ts (ts)
    • accept-invite.ts (ts)
    • get-invite.ts (ts)
    • get-invites.ts (ts)
    • revoke-invite.ts (ts)
    • _errors (txt)
    • bad-request-error.ts (ts)
    • unauthorized-error.ts (ts)
    • upload-avatar.ts (ts)
    • projects (txt)
    • create-project.ts (ts)
    • delete-project.ts (ts)
    • ATTRIBUTION.md (markdown)

    Loading code snippet…