Back to articles
From Python to Laravel: Why I Built My Own IAM System Instead of Using Existing Packages

From Python to Laravel: Why I Built My Own IAM System Instead of Using Existing Packages

via Dev.toApurba Singh

As a backend developer, I’ve spent most of my career working with Python — FastAPI, Django, Flask. I’ve always cared about one thing deeply: 👉 building systems that scale without becoming messy But there was one problem I kept running into… no matter the stack. 🧠 The Problem: The “Global Role” Trap At first, everything looks simple: • Users • Roles • Permissions But as systems grow, things start breaking. Most RBAC (Role-Based Access Control) packages assume: 👉 a user is either an Admin… or they aren’t. But real-world systems are never that simple. A real scenario: • A user is a Manager in Branch A • The same user is a Viewer in Branch B Now ask yourself: 👉 How do you model this cleanly? Most of the time, we don’t. We write conditions like: if ($user->role === 'manager' && $branch_id === 1) { ... } And slowly… • logic spreads everywhere • dependencies grow • and one small change breaks multiple parts of the system 😵 When It Became a Problem Across multiple projects, I saw the same patt

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles