Accessing admin tools
Admin authentication
Admin access is restricted and requires special privileges: Access requirements:- User account with
adminrole - Valid authentication token
- Admin flag enabled in user record
/internal-tools or click Admin in the user menu (if you have permissions)
If you don’t see the Admin option, you don’t have administrative privileges. Contact your system administrator.
Admin route protection
The admin section is protected by:- Server-side role verification
- JWT token validation with admin claim
- Middleware authentication checks
- Separate routing (
ProtectedAdminRoutecomponent)
Admin dashboard
The main dashboard provides an at-a-glance view of platform status.Key metrics
User statistics:- Total registered users
- Active users (last 30 days)
- New signups today/week/month
- User growth rate
- Churn rate
- Active subscriptions by tier
- Monthly recurring revenue (MRR)
- Conversion rate (Free to paid)
- Subscription changes (upgrades/downgrades)
- Failed payments
- Total papers in system
- Total chats created
- AI messages sent today
- API calls (if applicable)
- Active sessions
- Database status
- Vector store status
- AI model availability
- Error rate (last 24h)
- Response times
Recent activity feed
Real-time stream of platform events:- New user registrations
- Subscription changes
- Payment events
- Error alerts
- System warnings
- Timestamp
- Event type
- User (if applicable)
- Details
- Status/severity
Views panel
Located at/internal-tools/views, provides detailed data views.
User management view
Comprehensive user administration: User list features:- Searchable user database
- Filter by subscription tier
- Filter by registration date
- Filter by activity status
- Sort by various criteria
- View full user profile
- Check subscription status
- View usage statistics
- Reset password (send email)
- Suspend account
- Delete account
- Override subscription limits
- Grant/revoke admin privileges
- Export user list (CSV, JSON)
- Send announcements
- Apply tier changes
- Extend trials
Subscription analytics view
Deep dive into subscription data: Metrics displayed:- Revenue by tier
- Subscription distribution (pie chart)
- Churn analysis
- Lifetime value (LTV) by tier
- Conversion funnel
- Payment success rate
- Date range
- Subscription tier
- Subscription status (active, cancelled, expired)
- Payment status
- Revenue reports
- Subscription lists
- Churn analysis
- Custom date ranges
Usage analytics view
Understand how users engage with Freiya: AI usage:- Messages per model type
- Most used models
- Usage by tier
- Peak usage times
- Boost consumption
- Papers added per day/week/month
- Average papers per user by tier
- Most saved papers
- DOI vs manual vs upload ratios
- PDF view statistics
- Chat feature engagement
- PDF viewer sessions
- Collection usage
- Institution search queries
- Export frequencies
Content view
Platform-wide content statistics: Papers in system:- Total unique papers
- Papers by field/topic
- Most cited papers
- Most saved by users
- Citation distribution
- Open access percentage
- Total institutions indexed
- Most researched institutions
- Geographic distribution
- Collaboration networks
- Trending research areas
- Most active topics
- Growing fields
Performance view
Technical performance metrics: API performance:- Response times by endpoint
- Slowest endpoints
- Error rates
- Timeout occurrences
- Rate limit hits
- Query performance
- Slow queries
- Connection pool status
- Storage usage
- Index efficiency
- Query latency
- Index size
- Memory usage
- Failed operations
- Indexing queue
- Semantic Scholar API status
- OpenAI API response times
- Stripe API health
- Email delivery rates
System health monitoring
Real-time status
Monitor critical systems: Services monitored:-
PostgreSQL database
- Connection status
- Query performance
- Storage capacity
- Backup status
-
Qdrant vector store
- Cluster health
- Index count
- Query latency
- Memory usage
-
AI models
- OpenAI API status
- Google AI status
- Response times
- Error rates
- Rate limits
-
Stripe payments
- API connectivity
- Webhook delivery
- Payment success rate
-
Email service
- SMTP status
- Delivery rate
- Bounce rate
Alerts and notifications
Alert types:- Critical: Service down, data loss risk
- Warning: Performance degradation, approaching limits
- Info: Routine events, scheduled maintenance
- In-dashboard notifications
- Email to admin team
- Slack/Discord webhooks (configurable)
- SMS for critical alerts (optional)
Health check endpoints
Technical monitoring via API:User management
Individual user actions
View user profile:- Complete account information
- Subscription history
- Usage statistics
- Activity log
- Papers and chats count
- Override subscription status
- Extend trial periods
- Grant temporary upgrades
- Apply discounts manually
- Cancel subscriptions
- Reset password (send email)
- Verify email manually
- Suspend account
- Delete account
- Merge duplicate accounts
- View message usage per model
- Check boost balance
- Grant bonus boosts
- Reset limits manually
- Override tier restrictions
Bulk operations
Mass actions:- Export user lists with filters
- Send platform announcements
- Apply promotional credits
- Force password resets (security)
- Migrate subscription tiers
- Holiday promotions
- Security incidents
- Feature migrations
- Billing corrections
Audit logs
Track all administrative actions and system events.Log types
User actions:- Account creation/deletion
- Login attempts (success/failure)
- Password changes
- Email verification
- User modifications
- Subscription changes
- System configuration updates
- Data exports
- Errors and exceptions
- Performance issues
- Security events
- Scheduled tasks
- Successful payments
- Failed payments
- Refunds
- Disputes
Log details
Each log entry includes:- Timestamp (precise to millisecond)
- Event type and category
- User ID (if applicable)
- Admin ID (for admin actions)
- IP address
- User agent
- Before/after state (for changes)
- Success/failure status
- Error messages (if any)
Log search and filtering
Filter options:- Date range
- Event type
- User ID
- Admin ID
- Success/failure
- Severity level
- Full-text search across logs
- Field-specific queries
- Regular expression support
- Download filtered logs as CSV/JSON
- Compliance reports
- Security audits
Configuration management
Platform settings
Feature flags:- Enable/disable features globally
- A/B testing configurations
- Gradual rollout controls
- Emergency shutoffs
- Adjust tier limits
- Set global rate limits
- Configure API quotas
- Throttling thresholds
- Enable/disable AI models
- Set model priorities
- Configure fallbacks
- Adjust token limits
Email templates
Manage email content:- Welcome emails
- Verification emails
- Password reset emails
- Billing notifications
- Feature announcements
- HTML and plain text versions
- Variable substitution
- Preview before sending
- Version history
Pricing configuration
Subscription tiers:- Adjust prices
- Modify features per tier
- Create promotional tiers
- Grandfather old plans
Database administration
Direct database access
Database operations are powerful and dangerous. Always backup before making changes.
- View table schemas
- Run SELECT queries
- Execute migrations
- Database backups
- Restore from backup
- Read-only mode option
- Transaction support
- Automatic backups before changes
- Confirmation prompts
- Audit logging of all queries
Data cleanup
Maintenance tasks:- Remove orphaned records
- Clean up expired sessions
- Archive old data
- Optimize indexes
- Vacuum database
- Automated cleanup jobs
- Backup schedules
- Index rebuilds
- Statistics updates
Analytics and reporting
Custom reports
Report builder:- Select metrics
- Choose date ranges
- Apply filters
- Set grouping
- Configure visualization
- User growth
- Revenue analysis
- Feature adoption
- Performance trends
- Error reports
- Email delivery
- Schedule automated reports
- Export as PDF/Excel
- Dashboard widgets
Data export
Export capabilities:- Full database exports
- Filtered data exports
- User data (GDPR compliance)
- Analytics data
- Audit logs
- CSV (for spreadsheets)
- JSON (for processing)
- SQL dumps (for backups)
- PDF (for reports)
Security features
Security monitoring
Track security events:- Failed login attempts
- Unusual access patterns
- API abuse
- Potential attacks
- Data breach attempts
- Rate limiting
- IP blocking
- Account suspension
- Alert generation
Access control
Admin roles:- Super admin (full access)
- User admin (user management only)
- Analytics viewer (read-only)
- Support admin (limited actions)
- Grant/revoke permissions
- Role-based access control
- Audit permission changes
- Temporary elevated access
Troubleshooting
Can't access admin panel
Can't access admin panel
Verify:
- You have admin role in database
- JWT token includes admin claim
- Not using cached/old token
- Correct URL: /internal-tools
- Check with super admin if issue persists
Metrics not updating
Metrics not updating
Possible causes:
- Cache not refreshed (wait or force refresh)
- Background jobs not running
- Database connection issues
- Check system health dashboard
Can't modify user
Can't modify user
Check:
- Your admin permissions level
- User isn’t another admin (requires super admin)
- Database write access
- No conflicting operations
Audit logs not showing
Audit logs not showing
Verify:
- Logging is enabled in config
- Database has audit_logs table
- Sufficient storage space
- No log rotation issues
Best practices
Review regularly
Check dashboard daily for anomalies
Monitor alerts
Act on critical alerts immediately
Backup first
Always backup before major changes
Audit actions
Review audit logs weekly
Admin workflow
Daily:- Check dashboard metrics
- Review critical alerts
- Monitor system health
- Check failed payments
- Review user growth
- Analyze usage trends
- Check audit logs
- Performance review
- Generate reports
- Review security logs
- Plan capacity
- Update documentation
Related resources
Keyboard shortcuts
Admin panel shortcuts for faster workflow
Subscription tiers
Understand tier features for user management
Settings
Regular user settings (non-admin)
Admin support: For technical questions about admin tools, contact the development team or refer to internal documentation.