Overview
ElectroFix AI uses a subscription-based model where each company subscribes to a plan that determines their feature access, user limits, and AI diagnostic capabilities. Subscriptions are company-level, not user-level.Available Plans
The system supports four subscription plans:1. Starter
Target Audience: Small repair shops getting started Features:- Basic order management
- Customer and equipment tracking
- No AI diagnostic features
- Limited user accounts
2. Pro
Target Audience: Growing businesses Features:- All Starter features
- Advanced reporting
- More user accounts
- No AI diagnostic features
3. Enterprise
Target Audience: Large repair operations Features:- All Pro features
- AI-powered diagnostics
- Priority support
- Custom integrations
- 200 queries per month
- 120,000 tokens per month
4. Developer Test
Target Audience: Internal testing and development Features:- All Enterprise features
- Extended AI limits for testing
- Development tools access
- 500 queries per month
- 500,000 tokens per month
Database Schema
Subscriptions Table
Subscription Model
Subscription Status
A subscription can have one of five statuses:| Status | Description |
|---|---|
trial | Company is in trial period |
active | Subscription is active and paid |
past_due | Payment failed, grace period |
canceled | Subscription canceled by company |
suspended | Administratively suspended |
AI Plan Policy Service
TheAiPlanPolicyService defines and enforces AI usage limits:
Accessing Subscription Data
From Company Model
From User
In Controllers
Plan Comparison Table
| Feature | Starter | Pro | Enterprise | Developer Test |
|---|---|---|---|---|
| Order Management | ✅ | ✅ | ✅ | ✅ |
| Customer Tracking | ✅ | ✅ | ✅ | ✅ |
| Equipment Database | ✅ | ✅ | ✅ | ✅ |
| Inventory Module | ✅ | ✅ | ✅ | ✅ |
| Billing Module | ✅ | ✅ | ✅ | ✅ |
| AI Diagnostics | ❌ | ❌ | ✅ | ✅ |
| AI Queries/Month | 0 | 0 | 200 | 500 |
| AI Tokens/Month | 0 | 0 | 120,000 | 500,000 |
| User Limit | Limited | More | Custom | Unlimited |
| Support | Priority | Dedicated | Internal |
Billing Cycle
Subscriptions can be billed monthly or yearly:User Limits
Some plans enforce a maximum number of user accounts:Upgrading/Downgrading Plans
Admins can manage their subscription through the admin panel:Plan Detection
The system defaults to ‘starter’ if no subscription exists:AI Feature Gating
UI elements and features are conditionally shown based on plan:Subscription Lifecycle
1. Trial Period
New companies start with a trial subscription:2. Active Subscription
After payment, status changes to ‘active’:3. Renewal
Billing cycle determines renewal date:4. Expiration Handling
Checking if subscription is expired:Best Practices
1. Always Check AI Support
2. Default to Starter Plan
3. Cache Subscription Data
For frequently accessed data, eager load subscriptions:4. Validate Plan Changes
When changing plans, ensure user limit compatibility:Related Topics
- AI Diagnostics - AI usage tracking and quotas
- Multi-Tenancy - Company-level subscriptions
- Roles & Permissions - User access control