A modular, multi-tenant management platform with fine-grained RBAC and realtime collaboration.
Built to explore the architecture behind real-world organization-based management systems.
π§ Under active development
What is ManageX?
ManageX is a management platform designed around organizations, members, roles, permissions, and modular features.
Users can belong to multiple organizations, each organization can define its own roles and access rules, and individual module instances can have their own permissions.
The project is intentionally being built beyond a basic CRUD application, with a focus on:
- Multi-tenant architecture
- Fine-grained authorization
- Modular feature design
- Relational database modeling
- REST API architecture
- Realtime collaboration
- Scalable backend design
ManageX is currently under construction, with the backend architecture being developed before the platformβs larger management modules are added.
Architecture
ManageX is organized around several interconnected domains:
| Domain | Responsibility |
|---|---|
| π€ Identity | Users and authentication |
| π’ Organizations | Organizations and their members |
| π Roles | Organization-specific roles |
| π Permissions | System and instance-level authorization |
| π§© Modules | Reusable module instances |
| βοΈ Invitations | Organization membership invitations |
| β‘ Realtime | Presence, broadcasts, and live activity |
Data model
ββββββββββββββββ
β User β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββββββ
β OrganizationUser β
βββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β Organization β
ββββββββ¬ββββββββββ¬βββββ
β β
βββββββββββ βββββββββββββββ
βΌ βΌ
ββββββββββββ ββββββββββββββββββ
β Role β β ModuleInstance β
ββββββ¬ββββββ βββββββββ¬βββββββββ
β β
ββββββββββ΄βββββββββ βΌ
βΌ βΌ ββββββββββββββββββββ
ββββββββββββββββββββ ββββββββββββββββββββ βInstancePermissionβ
βSystemPermission β βRoleSystemPerm. β ββββββββββ¬ββββββββββ
ββββββββββββββββββββ ββββββββββββββββββββ β
β² βΌ
β ββββββββββββββββββββ
β βRoleInstancePerm. β
β ββββββββββββββββββββ
β
β
ββββββββ΄ββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββ βββββββββββββββββββ
β System β β Instance β
β Override β β Override β
ββββββββββββββββ βββββββββββββββββββ
Authorization
Authorization is one of the core parts of ManageX.
Rather than relying on a fixed set of hard-coded roles, organizations can define their own roles and assign permissions to them.
System permissions
System permissions control organization-wide features.
organization.view
organization.edit
role.view
role.create
role.edit
role.delete
member.view
member.invite
member.remove
Instance permissions
Some modules can exist as multiple independent instances within an organization.
For example:
Inventory #1
βββ view
βββ create
βββ edit
βββ delete
Inventory #2
βββ view
βββ edit
This allows access to be controlled at the individual module-instance level, rather than only at the module level.
Permission overrides
Roles provide the normal permission set for a user, but individual users can also receive explicit permission overrides.
Role
β
βββ System permissions
β
βββ Instance permissions
β
βΌ
User-specific
overrides
βββ allow
βββ deny
This makes it possible to handle cases such as:
A Manager can edit inventory, but a particular Manager can be denied access to one specific inventory instance.
Realtime collaboration
Realtime collaboration is planned as part of the platform.
The goal is to allow users working inside the same module instance to see each otherβs presence and activity.
For example:
βββββββββββββββββββββββββββββββββββ
β Inventory β
β β
β π€ Ashim π€ Bob β
β β viewing β editing β
β β
β 2 people currently here β
βββββββββββββββββββββββββββββββββββ
Planned realtime functionality includes:
- π₯ User presence
- π’ Join/leave events
- β¨οΈ Activity and typing indicators
- π‘ Broadcast events
- π Live updates
- π§© Module-instance-specific channels
Realtime architecture
The planned deployment architecture separates application authority from realtime communication.
βββββββββββββββββββ
β Next.js β
β Frontend β
ββββββββββ¬βββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β β
REST Realtime
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β FastAPI β β Supabase β
β β β Realtime β
β Authentication β β β
β Authorization β β Presence β
β Business Logic β β Broadcasts β
β REST API β β Activity β
ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β PostgreSQL β
β Supabase β
βββββββββββββββββββ
FastAPI remains the authority.
Supabase Realtime is only intended to provide realtime communication such as presence and broadcasts.
Authentication, authorization, permissions, and business rules remain under the control of the FastAPI backend.
Realtime clients are never treated as an authority for determining whether an operation is allowed.
Database models
ManageX currently contains 12 interconnected SQLAlchemy models covering identity, organizations, roles, permissions, modules, and authorization relationships.
User
| Column | Type | Constraints |
|---|---|---|
id | int | PK |
email | str | unique, indexed |
username | str | unique, indexed |
first_name | str | |
middle_name | str | None |
last_name | str | |
password_hash | str | |
is_active | bool | default True |
Organization
| Column | Type | Constraints |
|---|---|---|
id | int | PK |
name | str | not null |
owner_id | int | FK β users.id |
OrganizationUser
| Column | Type | Constraints |
|---|---|---|
id | int | PK |
user_id | int | FK β users.id |
organization_id | int | FK β organizations.id |
date_joined | datetime | |
role_id | int | None |
is_active | bool | default True |
Unique constraint:
(user_id, organization_id)
Invite
Handles organization membership invitations.
organization_id
user_identifier
invited_by
status
created_at
Supported states:
pending
accepted
rejected
seen
Role
Roles belong to an organization.
id
name
organization_id
Role names are unique within an organization.
SystemPermission
Defines organization-wide permissions.
id
feature
action
Examples:
role.create
role.delete
member.invite
organization.edit
RoleSystemPermission
Association table between roles and system permissions.
role_id
system_permission_id
Uses a composite primary key.
ModuleInstance
Represents an individual instance of a module inside an organization.
id
name
template
organization_id
InstancePermission
Defines permissions available for a particular module instance.
id
instance_id
action
RoleInstancePermission
Association table between roles and instance permissions.
role_id
instance_permission_id
Uses a composite primary key.
SystemPermissionOverride
Allows individual users to override system-level permissions.
id
user_id
permission_id
effect
InstancePermissionOverride
Allows individual users to override permissions for specific module instances.
id
user_id
instance_permission_id
effect
Current progress
- User authentication
- Organization creation
- Organization membership
- Organization invitations
- Custom organization roles
- System permissions
- Module instances
- Instance-level permissions
- User permission overrides
- Database migrations with Alembic
- REST API
- Complete permission enforcement
- Management modules
- Realtime user presence
- Realtime broadcasts
- Live activity indicators
- Frontend
- Automated tests
- Production deployment
Roadmap
Foundation
β
βββ Authentication ββββββββββββββββ β
βββ Organizations ββββββββββββββββ β
βββ Membership βββββββββββββββββββ β
βββ Invitations ββββββββββββββββββ β
β
βΌ
Authorization
β
βββ Roles ββββββββββββββββββββββββ β
βββ System permissions βββββββββββ β
βββ Instance permissions βββββββββ β
βββ Permission overrides βββββββββ β
βββ Permission enforcement βββββββ π§
β
βΌ
Modules
β
βββ Module architecture ββββββββββ π§
βββ Management features ββββββββββ π
βββ Module workflows βββββββββββββ π
β
βΌ
Realtime
β
βββ Supabase Realtime ββββββββββββ π
βββ User presence ββββββββββββββββ π
βββ Broadcast events βββββββββββββ π
βββ Activity indicators ββββββββββ π
β
βΌ
Platform
β
βββ Frontend βββββββββββββββββββββ π
βββ Testing ββββββββββββββββββββββ π
βββ Production deployment βββββββ π
Legend: β Complete Β· π§ In progress Β· π Planned
Project goals
ManageX is being built as a large-scale portfolio project to explore the architectural problems that appear in real-world management platforms.
The main goals are:
- Build a proper multi-tenant architecture
- Implement fine-grained RBAC
- Support instance-level authorization
- Explore user-specific permission overrides
- Build modular management features
- Design a relational database around real application requirements
- Build and maintain a REST API
- Explore realtime collaboration
- Learn production-oriented deployment architecture
The project is still under construction, and the architecture will continue to evolve as new requirements are introduced.