Overview
The Company Insights module provides developers with a bird’s-eye view of all companies using ElectroFix AI. Monitor subscriptions, view company details, track user counts, and access individual company data for support and administrative purposes.What You Can Do
- View list of all subscribed companies
- See subscription plans and validity periods
- Review company contact information
- View user counts per company
- Access detailed company profiles
- Monitor subscription status across the platform
Accessing Company Insights
As a developer, navigate to:- Developer → Companies from the main menu
- Direct URL:
/developer/companies
Companies List View
The main view shows all companies with key information:Table Columns
Empresa (Company)- Company name from company settings
- Links to detailed company view
- Current subscription plan (STARTER, PRO, ENTERPRISE, DEVELOPER_TEST)
- Displays “N/A” if no subscription exists
- Uppercase text for easy scanning
- Subscription date range
- Format:
YYYY-MM-DD - YYYY-MM-DD - Start date to end date
- Blank if no subscription
- Owner name from company settings
- Primary contact person
- Owner email (primary line)
- Owner phone (secondary line, smaller text)
- For reaching company administrators
- Detalle button: Opens detailed company view
Sorting and Display
Companies are sorted alphabetically by name (ORDER BY name ASC) for easy lookup.
Viewing Company Details
Click Detalle on any company to open the detailed view:Company Detail Sections
Owner & Contact
Contact Information
- Owner name
- Owner email
- Owner phone
- Billing email
- Billing phone
Subscription
Plan Details
- Plan level (STARTER, PRO, etc.)
- Status (ACTIVE, TRIAL, etc.)
- Start date
- End date
- Billing cycle (monthly/yearly)
Users Section
The detail view includes a list of all users belonging to the company:- User name
- Role (admin, worker, developer)
- Email address
Name (role) - email@example.com
Example:
- Total user count
- Admin vs. worker distribution
- Active team members
- Account access points
Use Cases
Customer Support
Customer Support
When a company contacts support:
- Search for company by name
- View detailed company page
- Check subscription status and plan
- Verify user count and roles
- Confirm contact information
- Provide informed assistance
Subscription Monitoring
Subscription Monitoring
Regular monitoring tasks:
- Identify expiring subscriptions
- Find companies still on trial
- Check for past-due accounts
- Verify plan distribution
- Track growth metrics
Account Management
Account Management
Administrative tasks:
- Verify company details before manual changes
- Confirm owner contact before account actions
- Check user counts against subscription limits
- Validate billing information
Platform Analytics
Platform Analytics
Understanding the platform:
- Count companies per plan tier
- Track subscription status distribution
- Monitor average users per company
- Identify upgrade opportunities
Special Developer Company
There’s a special test company available:ElectroFix Developer Lab
Accessible via:- Navigation: Developer → Test Company
- Direct URL:
/developer/test-company
- Internal testing
- Feature demonstrations
- QA validation
- Training purposes
- Name: “ElectroFix Developer Lab”
- Typically has
developer_testsubscription plan - May have unlimited or high user limits
- Contains test data
The test company view uses the same template as regular company details but is specifically filtered to show only the “ElectroFix Developer Lab” company.
Data Visible to Developers
Full Access
Developers can see:- All companies regardless of subscription status
- All company settings and configurations
- All user accounts within companies
- All subscription details
- Complete contact information
Read-Only Nature
The Company Insights interface is view-only:- Cannot edit company settings from this interface
- Cannot modify subscriptions directly
- Cannot create or delete users
- Cannot access company’s operational data (orders, customers, etc.)
- Log in as admin of the target company
- Use standard admin interfaces
- Or use direct database access (with proper authorization)
Data Scope
Unlike admins and workers who see only their company’s data, developers see:Global Visibility
- Company list (all companies)
- Subscription views (all subscriptions)
- User lists (all users, grouped by company)
Best Practices
Use for Monitoring, Not Daily Operations
Use for Monitoring, Not Daily Operations
Company Insights is for:
- Platform-level monitoring
- Support requests
- Subscription management
- Analytics and reporting
- Day-to-day development
- Testing features (use test company)
- Customer data access (respect privacy)
Respect Data Privacy
Respect Data Privacy
Even with full access:
- View only what’s needed for task at hand
- Don’t share company data unnecessarily
- Log access for audit purposes
- Follow data protection regulations
- Document reason for accessing company data
Verify Before Manual Changes
Verify Before Manual Changes
When making database changes:
- Check Company Insights first
- Verify current subscription state
- Confirm user count and roles
- Note contact information
- Document change reason
- Test on test company first if possible
Use for Proactive Support
Use for Proactive Support
Monitor for:
- Subscriptions expiring in 7 days
- Companies stuck on trial > 60 days
- Accounts with “past_due” status
- Companies at user limits
- Unusual subscription patterns
Troubleshooting
Cannot Access Company Insights
Cause: Only developer role has access. Solution:- Verify your user record has
role = 'developer' - Admins and workers cannot access these pages
- Contact system administrator to grant developer role
- Developer role is typically not granted through UI
Company Not in List
Possible Causes:- Company was recently created (refresh page)
- Company was deleted
- Database connection issue
- Refresh the page
- Check database directly for company record
- Verify company hasn’t been soft-deleted
- Check application logs for errors
Subscription Shows “N/A”
Cause: Company has no subscription record. Solution:- Company was created but never accessed Subscription page
- Subscription record was deleted
- Have admin log in and visit Admin → Subscription
- System will auto-create default trial subscription
Users List Empty
Cause: Company has no users associated. Solution:- Check if company was created without admin user
- Verify users have correct
company_id - May indicate orphaned company record
- Check user creation process
Technical Reference
Routes
- Index:
GET /developer/companies- List all companies - Show:
GET /developer/companies/{company}- Company detail view - Test Company:
GET /developer/test-company- View ElectroFix Developer Lab - Subscriptions:
GET /developer/subscriptions- Alternative view (same data, different route)
Controller: CompanyInsightsController
Authorization
Routes are protected by middleware:role === 'developer' can access.
Data Loading
Queries use eager loading to prevent N+1 problems:- Company record
- Associated subscription (if exists)
- All users belonging to company
Views
- Index:
resources/views/developer/companies/index.blade.php - Show:
resources/views/developer/companies/show.blade.php
Related Features
- Subscription Management - Admin view for managing their company’s subscription
- Company Settings - Admin view for editing company details
- Worker Management - Managing users within a company
Future Enhancements
Potential additions to Company Insights:- Search and Filtering: Find companies by name, plan, or status
- Export Capabilities: Download company list as CSV/Excel
- Usage Analytics: See AI query consumption per company
- Activity Logs: Track last login, order creation, etc.
- Billing History: View payment records and invoices
- Quick Actions: Reset passwords, extend trials, upgrade plans
- Alerts: Automated notifications for subscription events
- Charts and Graphs: Visual analytics of platform usage