About: software engineer 👩💻, technical writer, i posts contents relating to Linux, C programming language, software tools, JavaScript, React e.t.c. 🟢Volunteer Mod and Challenge Judge here on DEV🟢
Location:
Lagos, Nigeria
Joined:
Jul 23, 2022
HireFlow: For candidates, recruiters, and companies
HireFlow is a full-stack hiring platform that facilitates interaction between candidates, recruiters, and companies. It allows each user type to perform role-specific actions such as posting jobs, applying to roles, and managing applications — all with fine-grained access control powered by Permit.io.
For this challenge, I wanted to build something beyond the typical CRUD app — something with real-world complexity, yet still approachable. That’s how HireFlow came to life.
It was both fun and challenging figuring out how to manage user roles, permissions, and protected routes in a way that mimicked real hiring workflows. And I enjoyed every bit of that process.
I had no challenges while integrating Permitio into the application, as everything worked seamlessly out of the box🚀.
Using Permit.io for Authorization
For this challenge, I leaned fully into Permit.io’s CLI (not the dashboard!) to do everything — from creating resources, defining roles, and setting granular permissions to assigning users to roles. Here's a breakdown of how I set it up:
Installed the permit CLI:
npm install-g @permitio/cli
This enabled me to run the permit CLI commands from anywhere in my terminal.
Logged into my permit account:
permit Login
Initialized permit:
permit init
Selected the Create a simple policy option:
I was then prompted to configure my resources
Data setup:
I was then prompted to select my data setup, on which I opted for the 'Interactively create users' option
Select user number:
I was prompted to select the number of users I wished to create, on which I specified 3, for the candidate, recruiter, and company.
Assign each user to their roles:
I assigned all 3 users to their different roles:
Next, I was prompted to enforce a PDP.
PDP (Policy Decision Point) setup:
I skipped the part where I’d have to enforce a self-hosted PDP because I chose to use Permit’s cloud-hosted PDP instead — simpler and faster for my current needs.
https://cloudpdp.api.permit.io
This lets the app connect with Permit’s decision engine over the cloud.
And the permit initialization has been successfully completed.
Install the permit SDK:
Once initialization was complete, I installed the Permit SDK to integrate it into my codebase:
npm install permitio
From there, I could wrap permission checks around specific views and features to ensure users only had access to what their role allowed.
⭐⭐⭐ To see exactly how I used Permitio's checks in my code, simply head over to the README.md file on the HireFlow-server repository that outlines the full process.
⭐⭐⭐
This was a rewarding challenge, and I genuinely enjoyed working with Permit.io's CLI — it gave me complete control over everything right from my terminal. I now feel more confident about handling role-based access in real-world applications and plan to take this even further post-challenge🥂.
Thanks to DEV and Permit.io for making this happen 🙌