Universal Team Management System
Universal team management system launched
We've just shipped the most significant UX improvement in Moonlight's history - a completely unified team management system that works across every project type.
The problem we solved
Previously, managing teams looked different everywhere. Adding collaborators to a comic worked differently than adding them to a book or music album. Each section had its own interface, its own bugs, and its own quirks.
Developers had to maintain 9+ different implementations of essentially the same feature:
contributionsManager()
for chapterscomicTeamManager()
for comicsmusicTeamManager()
for musicanimationTeamManager()
for animations- Plus various inline search systems and modal implementations
The solution
One universal component
Every project type now uses the exact same team management interface. Whether you're editing a comic chapter, creating a music album, or managing an animation project, the experience is identical.
<!-- Usage is now consistent everywhere -->
<x-team-management.manager
project-type="chapter"
:has-revenue="true"
:coin-price="$chapter->coin_price"
mode="edit"
/>
Smart revenue sharing
For projects that support monetization (chapters and animation frames), the system automatically handles revenue calculations with real-time validation:
- Free content gets 0% distribution automatically
- Paid content requires exactly 100% allocation
- Real-time percentage and coin calculations
- Automatic validation with clear error messages
Intelligent role management
Full integration with our TeamRole system means every team member gets proper permissions based on their assigned role. Project owners don't need roles - they have full access by default with a special "👑 Owner" designation.
Technical revolution
We've replaced 9 different team management implementations with a single universal system:
Architecture improvements
- Service Layer:
TeamManagementService
handles all business logic - Universal Controller:
UniversalTeamController
manages all project types - Reusable Components: 5 Blade components providing consistent UX
- Universal Routes:
/team/{projectType}/{projectId}
endpoints - Legacy Compatibility: All existing routes continue to work
Code consolidation
- +2,832 lines added (new universal system)
- -3,550 lines removed (old duplicate code)
- Net result: -718 lines (more efficient system)
- Zero duplication: Single source of truth for team management
User experience improvements
Enhanced search
Find team members with friendship and follower prioritization:
- Your friends appear first
- People you follow appear second
- Everyone else appears last
Visual polish
- Better input styling with proper grouping
- Improved avatar handling with fallback support
- Enhanced button placement (remove button next to username)
- Consistent visual hierarchy across all controls
- Fixed Polish character encoding throughout
Smart validation
- Real-time feedback on revenue distribution
- Automatic percentage calculations from coin inputs
- Clear error messages when validation fails
- Smart author handling (no unnecessary role assignments)
Revenue system unification
Before (inconsistent)
// Chapters used contributionsManager
coin_price + contributors array
// Animation used revenue_split JSON
{
"selected_artist": 60,
"project_owner": 25,
"platform_fee": 15
}
After (unified)
// All projects use consistent approach:
// CHAPTERS: coin_price + contribution_percentage per member
// ANIMATION: frame_price + contribution_percentage per member
// OTHER PROJECTS: role management only (no revenue)
TeamRole integration
Complete integration with yesterday's TeamRole system:
- Every team member has a
team_role_id
(foreign key to TeamRole) - Roles are filtered by
project_type
automatically - Permissions inherit from the assigned TeamRole
- Hierarchy levels control UI display order
- Authors are exempt from role requirements (they own everything)
Developer benefits
Clean architecture
The new system follows senior-level design patterns:
- Single Responsibility Principle: Each component has one job
- DRY Principle: Zero code duplication
- Service Layer Pattern: Business logic separated from controllers
- Component-Based Design: Reusable UI components
Maintainability
- One place to fix bugs (affects all project types)
- One place to add features (benefits everyone)
- Consistent validation and security across all projects
- Unified testing approach
What this means for you
For creators
You now have fine-grained control over who can do what in your projects with a consistent interface everywhere. Setting up team collaboration is now intuitive and powerful.
For team members
You'll see the same familiar interface whether you're working on comics, books, music, or animations. No more learning different systems for different project types.
For developers
Clean APIs, consistent patterns, and zero duplication make extending team features straightforward and reliable.
Migration and compatibility
The system maintains full backward compatibility. All existing:
- Team assignments continue to work
- Permission structures remain intact
- Route names are preserved
- API endpoints function as before
Existing teams were automatically migrated to use the new unified system without any disruption.
Looking ahead
This unified foundation enables exciting future features:
- Cross-project team collaboration
- Advanced team analytics and insights
- Sophisticated workflow management
- Team performance tracking
- Revenue optimization tools
The Universal Team Management System is live now across all Moonlight projects. Experience the streamlined workflow in your next project creation or team management session.
Ready to build better teams? Start collaborating with the new unified system today.