-
Notifications
You must be signed in to change notification settings - Fork 27
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
Comments
New Quest!A new Quest has been launched in @permitio’s repo. Loot of 250 USD has been stashed in this issue to reward the solver! 🗡 Comment ⚔️ When you submit a PR, comment Questions? Check out the docs. |
@quest-bot embark |
@StephCurry07 has embarked on their Quest. 🗡
This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR. Questions? Check out the docs. |
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. |
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. |
@quest-bot embark |
@Myestery has embarked on their Quest. 🗡
This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR. Questions? Check out the docs. |
Some good ways to enhance Permit CLI usage for Nextjs could be
|
@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 |
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
Why Join In?
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! 🌟
The text was updated successfully, but these errors were encountered: