Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ derived_from:

# Free vs Pro

Orbit has a free plan and a Pro plan. The free plan is fully usable for daily habit tracking; Pro raises the limits and unlocks the advanced features.
Orbit has a free plan and a Pro plan. The free plan is fully usable for daily habit tracking; Pro raises the AI message limit and unlocks advanced features.

## Limits on the free plan

- **Habits** are capped at **10** top-level habits. Sub-habits, completed habits, and soft-deleted habits don't count toward the cap. Pro removes the cap.
- **Habits** have an abuse guard of **1000** live top-level habits on both the free and Pro plans. Sub-habits, completed habits, and soft-deleted habits don't count toward the guard.
- **AI messages** are capped at **20** per month. Pro raises this to **500** per month.

Both plans can also earn a small bonus of extra AI messages from ad rewards, added on top of the plan limit.
Expand Down
2 changes: 1 addition & 1 deletion src/Orbit.Application/Common/AppConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class AppConstants
public const int HabitLogsLookbackDays = 365;
public const int MaxHabitLogsReturned = 1000;
public const int DefaultReminderMinutes = 15;
public const int DefaultFreeMaxHabits = 10;
public const int DefaultFreeMaxHabits = 1000;
public const int DefaultFreeAiMessages = 20;
public const int DefaultProAiMessages = 500;
public const int MaxBulkOperationSize = 100;
Expand Down
5 changes: 1 addition & 4 deletions src/Orbit.Application/Common/PayGateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ public async Task<Result> CanCreateHabits(Guid userId, int count = 1, Cancellati
if (user is null)
return Result.Failure(ErrorMessages.UserNotFound);

if (user.HasProAccess)
return Result.Success();

var maxHabits = await appConfig.GetAsync(AppConfigKeys.FreeMaxHabits, AppConstants.DefaultFreeMaxHabits, ct);
var activeHabitCount = await habitRepository.CountAsync(
h => h.UserId == userId && h.ParentHabitId == null && !h.IsCompleted, ct);

if (activeHabitCount + count > maxHabits)
return Result.PayGateFailure($"You've reached the {maxHabits} habit limit on the free plan. Upgrade to Pro for unlimited habits.");
return Result.PayGateFailure($"You've reached the {maxHabits} habit limit.");
Comment thread
pullfrog[bot] marked this conversation as resolved.
Resolved

return Result.Success();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public record ApplyOnboardingCommand(

/// <summary>
/// Applies the buffer of answers a user built during pre-auth onboarding in a single transaction:
/// creates the habits (trimmed to the free-plan allowance), an optional first log, an optional
/// creates the habits (trimmed to the shared habit allowance), an optional first log, an optional
/// Pro-gated goal, week-start/color preferences, and flips <c>HasCompletedOnboarding</c>. Idempotent
/// by construction — an already-onboarded user is a no-op (<c>Applied:false</c>) — so the client can
/// flush unconditionally after any successful auth and retry safely under the concurrency pipeline.
Expand Down Expand Up @@ -141,9 +141,6 @@ private async Task<Result<ApplyOnboardingResponse>> ApplyOnboardingTransactionAs
private async Task<IReadOnlyList<ApplyHabitInput>> TrimToAllowanceAsync(
User user, IReadOnlyList<ApplyHabitInput> habits, CancellationToken cancellationToken)
{
if (user.HasProAccess)
return habits;

var maxHabits = await appConfig.GetAsync(
AppConfigKeys.FreeMaxHabits, AppConstants.DefaultFreeMaxHabits, cancellationToken);
var existingRoots = await repos.Habits.CountAsync(
Expand Down
Loading
Loading