A comprehensive Django-based platform for tracking and analyzing AI tool usage in educational settings. This platform helps students monitor their AI usage, maintain compliance with ethical AI policies, and receive personalized insights about their learning behavior.
- Personalized AI Usage Dashboard: View individual AI usage statistics and trends
- Visual Analytics: Interactive charts using Chart.js for usage patterns and trends
- Compliance Tracking: Monitor compliance with AI ethics policies
- Personalized Insights: Receive automated recommendations based on usage patterns
- Feedback System: Submit feedback, bug reports, and feature requests
- GDPR Compliant: Full data export and privacy controls
- Real-time usage statistics (today, week, month, total)
- Compliance status indicators
- Usage trends over time (line chart)
- AI tool distribution (pie chart)
- Usage type analysis (bar chart)
- Recent activity log
- Personalized insights
- Backend: Django 4.2+
- Database: SQLite (development)
- Frontend: Django Templates + Bootstrap 5
- Charts: Chart.js 4.3
- Icons: Bootstrap Icons
- Authentication: Django Auth System
Vibes/
├── manage.py
├── requirements.txt
├── README.md
├── config/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ ├── asgi.py
│ └── wsgi.py
└── dashboard/
├── __init__.py
├── admin.py
├── apps.py
├── models.py
├── views.py
├── urls.py
├── forms.py
├── signals.py
├── tests.py
├── migrations/
│ └── __init__.py
└── templates/
└── dashboard/
├── base.html
├── login.html
├── register.html
├── dashboard.html
├── log_usage.html
├── usage_history.html
├── insights.html
├── feedback.html
└── profile.html
- Python 3.8 or higher
- pip (Python package manager)
- Git (optional)
cd "C:\Users\krist\OneDrive\Documents\GitHub\Vibes"# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython manage.py makemigrations
python manage.py migratepython manage.py createsuperuserFollow the prompts to create an admin account.
python manage.py shellThen in the Python shell:
from django.contrib.auth.models import User
from dashboard.models import AIEthicsPolicy, AIUsageLog
from django.utils import timezone
from datetime import timedelta
# Create a sample AI ethics policy
policy = AIEthicsPolicy.objects.create(
title="Institutional AI Usage Policy",
description="Guidelines for responsible AI tool usage in academic work.",
version="1.0",
status="active",
max_daily_usage=50,
max_weekly_usage=200,
effective_from=timezone.now().date(),
rules={
"citation_required": True,
"plagiarism_check": True,
"transparency": True
}
)
# Create sample usage logs for your user (replace 'yourusername')
user = User.objects.get(username='yourusername')
for i in range(10):
AIUsageLog.objects.create(
user=user,
ai_tool='chatgpt',
usage_type='code_generation',
description=f'Sample usage log {i+1}',
duration_minutes=15,
policy=policy
)
print("Sample data created successfully!")
exit()python manage.py runserverThe application will be available at: http://127.0.0.1:8000/
- Main Dashboard: http://127.0.0.1:8000/
- Admin Panel: http://127.0.0.1:8000/admin/
- Login: http://127.0.0.1:8000/login/
- Register: http://127.0.0.1:8000/register/
- Register an Account: Create your account using the registration page
- Log AI Usage: Click "Log AI Usage" to record your interactions with AI tools
- View Dashboard: Monitor your usage statistics and compliance status
- Check Insights: Review personalized insights and recommendations
- Submit Feedback: Report issues or suggest improvements
- Manage Profile: Update your preferences and privacy settings
- Access Admin Panel: Navigate to /admin/ and log in with superuser credentials
- Manage Policies: Create and update AI ethics policies
- Monitor Compliance: Review user compliance status
- Review Feedback: Respond to user feedback and bug reports
- Generate Reports: Analyze usage patterns across all users
- Extended user information
- Privacy and consent settings
- Notification preferences
- Policy definitions and rules
- Usage thresholds (daily/weekly limits)
- Effective date ranges
- Individual AI tool usage records
- Compliance status
- Context (course, assignment)
- Metadata (duration, tokens)
- Periodic compliance evaluation
- Compliance scores and levels
- Violation tracking
- Automated personalized insights
- Usage pattern analysis
- Recommendations and warnings
- User-submitted feedback
- Bug reports and feature requests
- Status tracking
| Endpoint | View | Description |
|---|---|---|
/ |
dashboard_view | Main dashboard |
/login/ |
login_view | User login |
/register/ |
register_view | User registration |
/logout/ |
logout_view | User logout |
/log-usage/ |
log_usage_view | Log new AI usage |
/usage-history/ |
usage_history_view | View usage history |
/insights/ |
insights_view | View insights |
/insights/<id>/dismiss/ |
dismiss_insight_view | Dismiss insight |
/feedback/ |
feedback_view | Submit feedback |
/profile/ |
profile_view | Manage profile |
/export-data/ |
export_data_view | Export user data (GDPR) |
This platform implements GDPR requirements:
- ✅ User Consent: Data collection requires explicit consent
- ✅ Data Access: Users can view all their stored data
- ✅ Data Export: Users can export their data in JSON format
- ✅ Data Deletion: Administrators can delete user data upon request
- ✅ Privacy Controls: Users can control analytics and notifications
- ✅ Transparent Processing: Clear information about data usage
- ✅ Secure Storage: Password hashing, session security
- CSRF protection enabled
- Session security (HTTPOnly cookies, SameSite)
- Password validation requirements
- SQL injection protection (Django ORM)
- XSS protection (template auto-escaping)
- Secure headers configuration
Run tests using:
python manage.py test dashboardEdit policies in the admin panel or modify default values in models.py:
max_daily_usage = models.IntegerField(default=100) # Change default
max_weekly_usage = models.IntegerField(default=500) # Change defaultAdd to AIUsageLog.AI_TOOL_CHOICES in models.py:
AI_TOOL_CHOICES = [
('chatgpt', 'ChatGPT'),
('copilot', 'GitHub Copilot'),
('your_tool', 'Your AI Tool'), # Add here
# ...
]Modify CSS variables in base.html:
:root {
--primary-color: #4f46e5; /* Change primary color */
--secondary-color: #7c3aed; /* Change secondary color */
/* ... */
}python manage.py makemigrations --empty dashboard
python manage.py migrate --fake dashboard# Delete database
del db.sqlite3 # Windows
rm db.sqlite3 # macOS/Linux
# Recreate
python manage.py migrate
python manage.py createsuperuserpython manage.py collectstatic --noinputBefore deploying to production:
- Set DEBUG to False in
settings.py - Change SECRET_KEY to a secure random value
- Configure ALLOWED_HOSTS with your domain
- Use PostgreSQL or MySQL instead of SQLite
- Set up HTTPS (SECURE_SSL_REDIRECT = True)
- Configure email backend for notifications
- Set up proper logging
- Use environment variables for sensitive settings
- Robust ORM for database management
- Built-in authentication system
- Excellent security features
- Admin panel for easy management
- Scalable and maintainable
- Zero configuration for development
- Perfect for small to medium deployments
- Easy to backup (single file)
- Can migrate to PostgreSQL/MySQL if needed
- Bootstrap: Professional UI with minimal effort
- Chart.js: Lightweight, responsive charts
- CDN delivery: No build process required
- Wide browser compatibility
- MVT (Model-View-Template): Django's standard pattern
- Signals: Automatic profile creation and insight generation
- Form Handling: Django forms for validation and security
- Middleware: Security and session management
- ORM: Database abstraction and query optimization
| Requirement | Implementation |
|---|---|
| Personalized dashboard | ✅ Dashboard view with user-specific stats |
| Usage visualizations | ✅ Chart.js charts (line, pie, bar) |
| Feedback submission | ✅ Feedback form with file upload |
| Policy management | ✅ Admin panel for policy CRUD |
| User login | ✅ Django authentication |
| Usage insights | ✅ Automated insight generation |
| Easy to use | ✅ Intuitive Bootstrap UI |
| GDPR compliance | ✅ Consent tracking, data export |
This project is created for educational purposes.
For issues, questions, or contributions:
- Create an issue in the repository
- Contact via the feedback form in the application
- Initial development: Your Name
- Framework: Django
- UI: Bootstrap 5
- Charts: Chart.js
- v1.0.0 (2024): Initial release
- User dashboard with visualizations
- AI usage tracking
- Compliance monitoring
- Insights generation
- Feedback system
- GDPR compliance features