Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌟 Community Feature Challenge: SDKs and Integrations 🌟 #11

Open
gemanor opened this issue Oct 28, 2024 · 10 comments
Open

🌟 Community Feature Challenge: SDKs and Integrations 🌟 #11

gemanor opened this issue Oct 28, 2024 · 10 comments
Labels
⚔️ Quest Tracks quest-bot quests

Comments

@gemanor
Copy link
Collaborator

gemanor commented Oct 28, 2024

Ever struggle with finding the right way of implementing Permit in your framework? Thinking of a cool way to support Permit with Next.js? This is one of our 10 community feature challenges, and we want your input on how we can enhance the Permit CLI in the area of using Permit with SDK and integrations. This is a space for you to share your ideas on what would make this part of the CLI even better!

How to Participate

  • Submit Your Proposal: Comment below with your detailed feature idea. Be sure to explain how it would work and why it would be valuable for users.
  • Vote for Your Favorites: Show support for your favorite ideas by upvoting them. Your votes will help us identify the most impactful proposals.
  • Win a Bounty: The idea with the most upvotes will be selected, and we’ll put a bounty on it! This means that you (or another contributor) could bring this feature to life and earn a reward.

Why Join In?

  • Shape the Future: Your input will directly influence Permit CLI’s growth.
  • Community Recognition: Contributing ideas or supporting others’ ideas lets you stand out as a valuable community member.
  • Collaborative Ownership: Together, we’ll build a CLI that truly reflects the community’s needs and creativity.

What’s Next?

We’ll keep this challenge open for proposals and upvotes until November 10th, 2024. Once the top idea is chosen, we’ll update this issue with details on the bounty and the next steps for development.

Thank you for helping us make the Permit CLI even better. We can’t wait to see what you come up with! 🌟

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 28, 2024
Copy link

quest-bot bot commented Oct 28, 2024

New Quest! image New Quest!

A new Quest has been launched in @permitio’s repo.
Merge a PR that solves this issue to loot the Quest and earn your reward.


Loot of 250 USD has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #11 to link your PR to this Quest.

Questions? Check out the docs.

@StephCurry07
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Nov 4, 2024

@StephCurry07 has embarked on their Quest. 🗡

  • @StephCurry07 has been on GitHub since 2020.
  • They have merged 8 public PRs in that time.
  • Their swords are blessed with JavaScript and CSS magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@StephCurry07
Copy link

StephCurry07 commented Nov 4, 2024

A cool way to support Permit with Next.js would be to create a set of custom hooks and HOCs (higher-order components) that make permissions and access control seamless within the Next.js environment.

Permit Authentication Wrapper: A CLI feature could scaffold a Permit authentication wrapper component for Next.js, handling initialization with user roles, permissions, and tokens, perhaps using the Permit SDK. This would streamline the setup by auto-generating a basic component that can be used around Next.js page components for authorization checks.

Custom Hooks for Permissions: Have the CLI generate usePermit and useRole hooks for checking user roles or permissions directly in components. The hooks would simplify calling Permit’s SDK within the Next.js environment.

Server-Side and Client-Side Integration Support: The CLI could generate example code snippets that showcase Permit usage with Next.js API routes as well as server-side rendering (SSR). Having CLI flags to toggle between examples of client-side and server-side checks would provide flexibility for various use cases.

Automatic SDK Integration: The CLI could offer an option to install and set up the Permit SDK automatically, fetching environment variables and initializing the SDK in a boilerplate file, so developers can immediately start using Permit without additional configuration.

@gemanor
Copy link
Collaborator Author

gemanor commented Nov 24, 2024

Hey, @StephCurry07, your proposal sounds like a good start but it's too broad for the context. Please take the 48 hours to provide an implementation plan, design review and timeline, so I can assign you the issue.

@Myestery
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Nov 26, 2024

@Myestery has embarked on their Quest. 🗡

  • @Myestery has been on GitHub since 2019.
  • They have merged 19 public PRs in that time.
  • Their swords are blessed with TypeScript and Shell magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@Myestery
Copy link

Some good ways to enhance Permit CLI usage for Nextjs could be

  • Using it to generate typescript based hooks and server middleware based on saved roles and permissions just like prisma does with db tables. eg: permit-cli generate roles

  • Streaming logs: Logs from the environment could be streamed and updated in a tail format using the CLI: eg permit-cli logs {environment}

  • Playground to test authorisation for different scenarios

@gemanor
Copy link
Collaborator Author

gemanor commented Nov 29, 2024

@Myestery - Can you elaborate more on the flow of the first option?

@Myestery
Copy link

@Myestery - Can you elaborate more on the flow of the first option?

Okay, so just like prisma reads the db schema and can generate typescript plugins for each table, we could apply the same idea to roles, workspaces and other models we have in permit today.

This will make us able to use some custom react hooks made using data from the roles or some server middleware made out of data from permit all typed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

No branches or pull requests

3 participants