The Activity Feed Widget provides real-time visibility into team activities and creates a comprehensive audit trail for your TimeTracker instance.
The Activity Feed automatically tracks and displays all major actions performed in the system, including:
- Project management (create, update, delete, archive)
- Task operations (create, update, delete, status changes, assignments)
- Time tracking (start/stop timer, manual entries, edits)
- Invoice activities (create, send, mark paid)
- Client management
- And more...
The Activity Feed Widget appears on the main dashboard in the right sidebar, displaying:
- Recent Activities: Last 10 activities by default
- User Attribution: Shows who performed each action
- Timestamps: Displays how long ago each action occurred
- Action Icons: Visual indicators for different types of actions
- Entity Details: Clear description of what was done
Click the filter icon (π½) to filter activities by type:
- All Activities
- Projects only
- Tasks only
- Time Entries only
- Invoices only
- Clients only
The activity feed automatically refreshes every 30 seconds to show the latest team activities.
- See their own activities
- View activities related to projects they have access to
- See all activities across the entire organization
- Access to advanced filtering and export options
- View activity statistics
GET /api/activitiesQuery Parameters:
limit(int): Number of activities to return (default: 50)page(int): Page number for pagination (default: 1)user_id(int): Filter by specific user (admin only)entity_type(string): Filter by entity type (project, task, time_entry, invoice, client)action(string): Filter by action type (created, updated, deleted, started, stopped, etc.)start_date(ISO string): Filter activities after this dateend_date(ISO string): Filter activities before this date
Response:
{
"activities": [
{
"id": 123,
"user_id": 5,
"username": "john.doe",
"display_name": "John Doe",
"action": "created",
"entity_type": "project",
"entity_id": 42,
"entity_name": "New Website",
"description": "Created project \"New Website\"",
"extra_data": {},
"created_at": "2025-10-30T14:30:00Z"
}
],
"total": 150,
"pages": 3,
"current_page": 1,
"has_next": true,
"has_prev": false
}GET /api/activities/stats?days=7Query Parameters:
days(int): Number of days to analyze (default: 7)
Response:
{
"total_activities": 342,
"entity_counts": {
"project": 45,
"task": 128,
"time_entry": 156,
"invoice": 13
},
"action_counts": {
"created": 89,
"updated": 167,
"deleted": 12,
"started": 42,
"stopped": 32
},
"user_activity": [
{
"username": "john.doe",
"display_name": "John Doe",
"count": 156
}
],
"period_days": 7
}The system tracks the following action types:
| Action | Description | Used For |
|---|---|---|
created |
Entity was created | Projects, Tasks, Clients, Invoices |
updated |
Entity was modified | Projects, Tasks, Time Entries |
deleted |
Entity was removed | Projects, Tasks, Time Entries |
started |
Timer started | Time Entries |
stopped |
Timer stopped | Time Entries |
completed |
Task marked as done | Tasks |
assigned |
Task assigned to user | Tasks |
commented |
Comment added | Tasks |
status_changed |
Status modified | Tasks, Invoices |
sent |
Invoice sent to client | Invoices |
paid |
Payment recorded | Invoices |
archived |
Entity archived | Projects |
unarchived |
Entity unarchived | Projects |
Activities can be tracked for the following entity types:
project- Project managementtask- Task operationstime_entry- Time trackinginvoice- Invoicingclient- Client managementuser- User administration (admin only)comment- Comments and discussions
To add activity logging to new features, use the Activity.log() method:
from app.models import Activity
Activity.log(
user_id=current_user.id,
action='created', # Action type
entity_type='project', # Entity type
entity_id=project.id,
entity_name=project.name,
description=f'Created project "{project.name}"',
extra_data={'client_id': client.id}, # Optional metadata
ip_address=request.remote_addr, # Optional
user_agent=request.headers.get('User-Agent') # Optional
)Best Practices:
- Always log after successful operations - Log after the database commit succeeds
- Provide clear descriptions - Make descriptions human-readable
- Include relevant metadata - Use
extra_datafor additional context - Store entity names - Cache the entity name in case it's deleted later
- Handle failures gracefully - Activity logging includes built-in error handling
Activity logging is already integrated for:
- β Projects (create, update, delete, archive, unarchive)
- β Tasks (create, update, delete, status changes, assignments)
- β Time Entries (start timer, stop timer, manual create, edit, delete)
- β Invoices (create, update, status change, payment, send) β not yet in main activity feed
- β Clients (create, update, delete) β not yet in main activity feed
- β³ Comments β integrated in client portal activity feed only; main activity feed comment logging still planned
- See what your team members are working on
- Track project progress in real-time
- Understand team activity patterns
- Compliance and record-keeping
- Track who made what changes and when
- Identify suspicious or unusual activity
- Monitor task completion rates
- Track project milestones
- Review team productivity
- Investigate issues by reviewing recent changes
- Identify when problems were introduced
- Track down missing or deleted items
No special configuration is required. The Activity Feed is enabled by default for all users.
The Activity model includes optimized indexes for:
- User-based queries (
user_id,created_at) - Entity lookups (
entity_type,entity_id) - Date range queries (
created_at)
- Activities are paginated to prevent slow page loads
- Old activities are automatically retained (no automatic cleanup)
- Database queries are optimized with proper indexes
- Widget auto-refreshes are throttled to every 30 seconds
- Activities are stored indefinitely by default
- Administrators can manually delete old activities if needed
- Consider implementing a retention policy for compliance
- Users can only see their own activities (unless admin)
- Administrators see all activities system-wide
- Activity logs cannot be edited or tampered with
- IP addresses and user agents are stored for security auditing
When a user requests data deletion:
- Their activities are preserved for audit purposes
- User information can be anonymized
- Activities show "Deleted User" for anonymized accounts
- Check permissions - Regular users only see their own activities
- Verify integration - Ensure the route has Activity.log() calls
- Database issues - Check logs for database errors
- Browser cache - Clear cache or hard refresh the dashboard
- Check API endpoint - Visit
/api/activitiesdirectly - JavaScript errors - Check browser console for errors
- Authentication - Ensure user is logged in
- Network issues - Check network tab in dev tools
Some features may not have activity logging integrated yet. Check the "Already Integrated" section above.
Planned improvements for the Activity Feed:
- Export activities to CSV/JSON
- Email notifications for specific activities
- Advanced search and filtering
- Activity feed for specific projects/tasks
- Webhook integration for external systems
- Custom activity types and actions
- Activity trends and analytics dashboard
For issues or questions about the Activity Feed:
- Check the FAQ
- Review the API Documentation
- Open an issue on GitHub
- Contact support