ai-user-activity-monitor
Author: Nitesh Kumar Singh · GitHub: @nkscoder
Repository: github.com/nkscoder/ai-user-activity-monitor
Open-source Django user activity monitor — page views, logins, search terms, time-on-page, and staff dashboards. Built by Nitesh Kumar Singh (nkscoder) as a reusable activity app for any Django project.
| Maintainer | Nitesh Kumar Singh — nkscoder.in |
| Repo | ai-user-activity-monitor |
| PyPI | pypi.org/project/ai-user-activity-monitor |
| Django app | activity |
| Version | 1.0.5 |
| License | MIT |
Screenshots
Analytics dashboard
Online users, login frequency, app-section visits, time-on-page charts, and a live activity feed.
User list & search
Searchable user table with pagination, last activity, login counts, and Excel export.
PyPI note: README images use jsDelivr CDN URLs (tag-pinned) so they render reliably on pypi.org. Update
@v1.0.5in image URLs on each release.
Features
- Automatic page view and POST action logging (middleware)
- Time on page via client-side beacon (
page-timeendpoint) - Search term capture from common query params (
search,q,query, …) - Staff dashboard: online users, login frequency charts, app-section visits, live feed
- User list with search, pagination, Excel export
- Per-user activity detail and time-by-path breakdown
- Dynamic section labels from installed Django apps and model
verbose_name - Uses
AUTH_USER_MODEL(no hardcoded user app)
Requirements
| Package | Version |
|---|---|
| Python | 3.10+ |
| Django | 4.2+ |
| openpyxl | 3.1+ (Excel export) |
Uses Django AUTH_USER_MODEL everywhere. Your user model should support is_staff / is_superuser for dashboard access.
Quick install
From PyPI (recommended)
pip install ai-user-activity-monitor
PyPI: pypi.org/project/ai-user-activity-monitor
From GitHub
pip install git+https://github.com/nkscoder/ai-user-activity-monitor.git
Editable / local development
git clone https://github.com/nkscoder/ai-user-activity-monitor.git
cd ai-user-activity-monitor
pip install -e ".[dev]"
Note: PyPI package name is
ai-user-activity-monitor; Django app label isactivity.
settings.py
INSTALLED_APPS = [
# ...
"activity.apps.ActivityConfig",
]
MIDDLEWARE = [
# ...
"activity.middleware.RequestIdMiddleware",
"activity.middleware.ActivityLogMiddleware",
]
TEMPLATES[0]["OPTIONS"]["context_processors"] += [
"activity.context_processors.activity_request_id",
"activity.context_processors.activity_open_source",
]
urls.py
urlpatterns = [
# ...
path("user/activity/", include("activity.urls")),
]
Run migrations:
python manage.py makemigrations activity
python manage.py migrate
Configuration (ACTIVITY_*)
| Setting | Default | Description |
|---|---|---|
ACTIVITY_GITHUB_URL |
https://github.com/nkscoder/ai-user-activity-monitor |
Open-source repo link |
ACTIVITY_HOMEPAGE_URL |
https://nkscoder.in |
Author site |
ACTIVITY_AUTHOR_NAME |
Nitesh Kumar Singh |
Display name |
ACTIVITY_AUTHOR_HANDLE |
nkscoder |
Handle / brand |
ACTIVITY_SEARCH_PLACEHOLDER |
generic search hint | User list search box |
ACTIVITY_PATH_LABEL_RULES |
[] |
Optional (regex, label) overrides |
ACTIVITY_EXCLUDED_APP_LABELS |
None (auto) |
App labels hidden from charts |
ACTIVITY_EXCLUDED_CHART_SECTIONS |
() |
Extra section titles to hide |
ACTIVITY_USER_SEARCH_FIELDS |
None (auto) |
Char/email fields on user model |
ACTIVITY_USER_EXPORT_COLUMNS |
None (auto) |
Excel columns |
ACTIVITY_USER_LIST_COLUMNS |
None (auto) |
User list table columns |
ACTIVITY_USER_IDENTIFIER_FIELDS |
None (auto) |
Primary identifier fields |
ACTIVITY_SESSION_CONTEXT_KEYS |
() |
Session keys passed into templates |
Section names are resolved automatically, e.g. URL /tickets/… → app verbose_name, /tickets/ticket/… → app + model verbose_name_plural.
URLs
| Path | Name | Description |
|---|---|---|
dashboard/user-activity/ |
user_activity_dashboard |
Main analytics dashboard |
dashboard/users/ |
activity_user_list |
Searchable user list |
dashboard/users/<id>/ |
activity_user_detail |
Per-user logs |
dashboard/users/export-excel/ |
export_user_list_excel |
Excel download |
page-time/ |
page_time |
Duration beacon (POST) |
license/ |
activity_license |
MIT license page |
Publish to PyPI (maintainers)
See PUBLISHING.md for build, TestPyPI, and production upload steps.
About Nitesh Kumar Singh (nkscoder)
Nitesh Kumar Singh develops reusable Django packages under nkscoder. ai-user-activity-monitor is published on GitHub for teams who need user activity analytics without vendor lock-in.
- Website: nkscoder.in
- GitHub: github.com/nkscoder
- Repo: ai-user-activity-monitor
License
Copyright © 2026 Nitesh Kumar Singh (nkscoder).
Released under the MIT License.
Metadata
Release files for ai-user-activity-monitor 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_user_activity_monitor-1.0.5.tar.gz | 26.5 kB | Without provenance | Details for ai_user_activity_monitor-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_user_activity_monitor-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for ai_user_activity_monitor-1.0.5-py3-none-any.whl |
Total release size: 61.7 kB
Release files / ai_user_activity_monitor-1.0.5.tar.gz
| Download URL | ai_user_activity_monitor-1.0.5.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c45221e58faa18d351dcbe441af936961b996ccc7c04f31feb3ca34e24866715
|
|
BLAKE2b-256 checksum How to use checksums |
eba2ae4b0f08d4ead004be560c4b19f9d084a88be52943d76a618df750180578
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / ai_user_activity_monitor-1.0.5-py3-none-any.whl
| Download URL | ai_user_activity_monitor-1.0.5-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e92dce1ae249b4f0a1ec432e65cd18653435cf7f87169868f9c802ab539c974
|
|
BLAKE2b-256 checksum How to use checksums |
9919ad183711f902807a84df40fb2e66165ce67dbf69c4c9dd688b9abb37bc53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for ai-user-activity-monitor 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.