Add audit system, invite links, and usage analytics (#4749)

# Description of Changes

New Features
Audit System: Complete audit logging with dashboard, event tracking, and
export capabilities

Invite Links: Secure invite system with email notifications and
expiration

Usage Analytics: Endpoint usage statistics and visualization

License Management: User counting with grandfathering and license
enforcement
## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: James Brunton <[email protected]>
This commit is contained in:
Anthony Stirling
2025-11-06 17:29:34 +00:00
committed by GitHub
co-authored by James Brunton
parent f5c67a3239
commit ac3e10eb99
64 changed files with 5269 additions and 461 deletions
+279 -7
View File
@@ -298,6 +298,20 @@
"general": {
"title": "General",
"description": "Configure general application preferences.",
"account": "Account",
"accountDescription": "Manage your account settings",
"user": "User",
"signedInAs": "Signed in as",
"logout": "Log out",
"enableFeatures": {
"title": "For System Administrators",
"intro": "Enable user authentication, team management, and workspace features for your organization.",
"action": "Configure",
"and": "and",
"benefit": "Enables user roles, team collaboration, admin controls, and enterprise features.",
"learnMore": "Learn more in documentation",
"dismiss": "Dismiss"
},
"autoUnzip": "Auto-unzip API responses",
"autoUnzipDescription": "Automatically extract files from ZIP responses",
"autoUnzipTooltip": "Automatically extract ZIP files returned from API operations. Disable to keep ZIP files intact. This does not affect automation workflows.",
@@ -399,8 +413,10 @@
"top20": "Top 20",
"all": "All",
"refresh": "Refresh",
"includeHomepage": "Include Homepage ('/')",
"includeLoginPage": "Include Login Page ('/login')",
"dataTypeLabel": "Data Type:",
"dataTypeAll": "All",
"dataTypeApi": "API",
"dataTypeUi": "UI",
"totalEndpoints": "Total Endpoints",
"totalVisits": "Total Visits",
"showing": "Showing",
@@ -3087,7 +3103,10 @@
"magicLinkSent": "Magic link sent to {{email}}! Check your email and click the link to sign in.",
"passwordResetSent": "Password reset link sent to {{email}}! Check your email and follow the instructions.",
"failedToSignIn": "Failed to sign in with {{provider}}: {{message}}",
"unexpectedError": "Unexpected error: {{message}}"
"unexpectedError": "Unexpected error: {{message}}",
"accountCreatedSuccess": "Account created successfully! You can now sign in.",
"passwordChangedSuccess": "Password changed successfully! Please sign in with your new password.",
"credentialsUpdated": "Your credentials have been updated. Please sign in again."
},
"signup": {
"title": "Create an account",
@@ -3547,8 +3566,8 @@
"restartingMessage": "The server is restarting. Please wait a moment...",
"restartError": "Failed to restart server. Please restart manually.",
"general": {
"title": "General",
"description": "Configure general application settings including branding and default behaviour.",
"title": "System Settings",
"description": "Configure system-wide application settings including branding and default behaviour.",
"ui": "User Interface",
"system": "System",
"appName": "Application Name",
@@ -3733,7 +3752,7 @@
"enableAnalytics": "Enable Analytics",
"enableAnalytics.description": "Collect anonymous usage analytics to help improve the application",
"metricsEnabled": "Enable Metrics",
"metricsEnabled.description": "Enable collection of performance and usage metrics",
"metricsEnabled.description": "Enable collection of performance and usage metrics. Provides API endpoint for admins to access metrics data",
"searchEngine": "Search Engine Visibility",
"googleVisibility": "Google Visibility",
"googleVisibility.description": "Allow search engines to index this application"
@@ -3808,7 +3827,9 @@
"from": "From Address",
"from.description": "The email address to use as the sender",
"enableInvites": "Enable Email Invites",
"enableInvites.description": "Allow admins to invite users via email with auto-generated passwords"
"enableInvites.description": "Allow admins to invite users via email with auto-generated passwords",
"frontendUrl": "Frontend URL",
"frontendUrl.description": "Base URL for frontend (e.g. https://pdf.example.com). Used for generating invite links in emails. Leave empty to use backend URL."
},
"legal": {
"title": "Legal Documents",
@@ -4512,10 +4533,47 @@
"directInvite": {
"tab": "Direct Create"
},
"inviteLinkTab": {
"tab": "Invite Link"
},
"inviteLink": {
"description": "Generate a secure link that allows the user to set their own password",
"email": "Email Address",
"emailPlaceholder": "[email protected] (optional)",
"emailDescription": "Optional - leave blank for a general invite link that can be used by anyone",
"emailRequired": "Email address is required",
"emailOptional": "Optional - leave blank for a general invite link",
"emailRequiredForSend": "Email address is required to send email notification",
"expiryHours": "Expiry Hours",
"expiryDescription": "How many hours until the link expires",
"sendEmail": "Send invite link via email",
"sendEmailDescription": "If enabled, the invite link will be sent to the specified email address",
"smtpRequired": "SMTP not configured",
"generate": "Generate Link",
"generated": "Invite Link Generated",
"copied": "Link copied to clipboard",
"success": "Invite link generated successfully",
"successWithEmail": "Invite link generated and sent via email",
"emailFailed": "Invite link generated, but email failed",
"emailFailedDetails": "Error: {0}. Please share the invite link manually.",
"error": "Failed to generate invite link",
"submit": "Generate Invite Link"
},
"inviteMode": {
"username": "Username",
"email": "Email",
"link": "Link",
"emailDisabled": "Email invites require SMTP configuration and mail.enableInvites=true in settings"
},
"license": {
"users": "users",
"availableSlots": "Available Slots",
"grandfathered": "Grandfathered",
"grandfatheredShort": "{{count}} grandfathered",
"fromLicense": "from license",
"slotsAvailable": "{{count}} user slot(s) available",
"noSlotsAvailable": "No slots available",
"currentUsage": "Currently using {{current}} of {{max}} user licences"
}
},
"teams": {
@@ -4599,6 +4657,89 @@
}
}
},
"plan": {
"currency": "Currency",
"popular": "Popular",
"current": "Current Plan",
"upgrade": "Upgrade",
"contact": "Contact Us",
"customPricing": "Custom",
"showComparison": "Compare All Features",
"hideComparison": "Hide Feature Comparison",
"featureComparison": "Feature Comparison",
"activePlan": {
"title": "Active Plan",
"subtitle": "Your current subscription details"
},
"availablePlans": {
"title": "Available Plans",
"subtitle": "Choose the plan that fits your needs"
},
"static": {
"title": "Billing Information",
"message": "Online billing is not currently configured. To upgrade your plan or manage subscriptions, please contact us directly.",
"contactSales": "Contact Sales",
"contactToUpgrade": "Contact us to upgrade or customize your plan",
"maxUsers": "Max Users",
"upTo": "Up to"
},
"period": {
"month": "month"
},
"free": {
"name": "Free",
"highlight1": "Limited Tool Usage Per week",
"highlight2": "Access to all tools",
"highlight3": "Community support"
},
"pro": {
"name": "Pro",
"highlight1": "Unlimited Tool Usage",
"highlight2": "Advanced PDF tools",
"highlight3": "No watermarks"
},
"enterprise": {
"name": "Enterprise",
"highlight1": "Custom pricing",
"highlight2": "Dedicated support",
"highlight3": "Latest features"
},
"feature": {
"title": "Feature",
"pdfTools": "Basic PDF Tools",
"fileSize": "File Size Limit",
"automation": "Automate tool workflows",
"api": "API Access",
"priority": "Priority Support",
"customPricing": "Custom Pricing"
}
},
"subscription": {
"status": {
"active": "Active",
"pastDue": "Past Due",
"canceled": "Canceled",
"incomplete": "Incomplete",
"trialing": "Trial",
"none": "No Subscription"
},
"renewsOn": "Renews on {{date}}",
"cancelsOn": "Cancels on {{date}}"
},
"billing": {
"manageBilling": "Manage Billing",
"portal": {
"error": "Failed to open billing portal"
}
},
"payment": {
"preparing": "Preparing your checkout...",
"upgradeTitle": "Upgrade to {{planName}}",
"success": "Payment Successful!",
"successMessage": "Your subscription has been activated successfully. You will receive a confirmation email shortly.",
"autoClose": "This window will close automatically...",
"error": "Payment Error"
},
"firstLogin": {
"title": "First Time Login",
"welcomeTitle": "Welcome!",
@@ -4619,6 +4760,137 @@
"passwordChangedSuccess": "Password changed successfully! Please log in again.",
"passwordChangeFailed": "Failed to change password. Please check your current password."
},
"invite": {
"welcome": "Welcome to Stirling PDF",
"invalidToken": "Invalid invitation link",
"validationError": "Failed to validate invitation link",
"passwordRequired": "Password is required",
"passwordTooShort": "Password must be at least 6 characters",
"passwordMismatch": "Passwords do not match",
"acceptError": "Failed to create account",
"validating": "Validating invitation...",
"invalidInvitation": "Invalid Invitation",
"goToLogin": "Go to Login",
"welcomeTitle": "You've been invited!",
"welcomeSubtitle": "Complete your account setup to get started",
"accountFor": "Creating account for",
"linkExpires": "Link expires",
"email": "Email address",
"emailPlaceholder": "Enter your email address",
"emailRequired": "Email address is required",
"invalidEmail": "Invalid email address",
"choosePassword": "Choose a password",
"passwordPlaceholder": "Enter your password",
"confirmPassword": "Confirm password",
"confirmPasswordPlaceholder": "Re-enter your password",
"createAccount": "Create Account",
"creating": "Creating Account...",
"alreadyHaveAccount": "Already have an account?",
"signIn": "Sign in"
},
"audit": {
"error": {
"title": "Error loading audit system"
},
"notAvailable": "Audit system not available",
"notAvailableMessage": "The audit system is not configured or not available.",
"disabled": "Audit logging is disabled",
"disabledMessage": "Enable audit logging in your application configuration to track system events.",
"systemStatus": {
"title": "System Status",
"status": "Audit Logging",
"enabled": "Enabled",
"disabled": "Disabled",
"level": "Audit Level",
"retention": "Retention Period",
"days": "days",
"totalEvents": "Total Events"
},
"tabs": {
"dashboard": "Dashboard",
"events": "Audit Events",
"export": "Export"
},
"charts": {
"title": "Audit Dashboard",
"error": "Error loading charts",
"day": "Day",
"week": "Week",
"month": "Month",
"byType": "Events by Type",
"byUser": "Events by User",
"overTime": "Events Over Time"
},
"events": {
"title": "Audit Events",
"filterByType": "Filter by type",
"filterByUser": "Filter by user",
"startDate": "Start date",
"endDate": "End date",
"clearFilters": "Clear",
"error": "Error loading events",
"noEvents": "No events found",
"timestamp": "Timestamp",
"type": "Type",
"user": "User",
"ipAddress": "IP Address",
"actions": "Actions",
"viewDetails": "View Details",
"eventDetails": "Event Details",
"details": "Details"
},
"export": {
"title": "Export Audit Data",
"description": "Export audit events to CSV or JSON format. Use filters to limit the exported data.",
"format": "Export Format",
"filters": "Filters (Optional)",
"filterByType": "Filter by type",
"filterByUser": "Filter by user",
"startDate": "Start date",
"endDate": "End date",
"clearFilters": "Clear",
"exportButton": "Export Data",
"error": "Failed to export data"
}
},
"usage": {
"noData": "No data available",
"error": "Error loading usage statistics",
"noDataMessage": "No usage statistics are currently available.",
"controls": {
"top10": "Top 10",
"top20": "Top 20",
"all": "All",
"refresh": "Refresh",
"dataTypeLabel": "Data Type:",
"dataType": {
"all": "All",
"api": "API",
"ui": "UI"
}
},
"showing": {
"top10": "Top 10",
"top20": "Top 20",
"all": "All"
},
"stats": {
"totalEndpoints": "Total Endpoints",
"totalVisits": "Total Visits",
"showing": "Showing",
"selectedVisits": "Selected Visits"
},
"chart": {
"title": "Endpoint Usage Chart"
},
"table": {
"title": "Detailed Statistics",
"endpoint": "Endpoint",
"visits": "Visits",
"percentage": "Percentage",
"noData": "No data available"
}
},
"backendHealth": {
"checking": "Checking backend status...",
"online": "Backend Online",