Secure Asset Legacy Management System
LegacyVault is a modern, secure platform for managing digital wills and encrypted assets with conditional release mechanisms. Built with Django and featuring a beautiful, animated frontend with a profound color palette.
- π Digital Wills Management: Create and manage multiple digital wills
- π End-to-End Encryption: Assets are encrypted; even the platform can't read them
- β³ Smart Release Conditions:
- Time-based releases
- Inactivity-based releases
- Approval-based releases (executor approval)
- π₯ Participant Management: Add executors and beneficiaries to wills
- π Full Audit Trail: All actions are logged for transparency and compliance
- βοΈ Inactivity Handling: Automatic handling of wills based on user inactivity
-
π REST API Framework (Django REST Framework 3.15.1)
- 50+ fully documented API endpoints
- JWT token authentication with refresh tokens
- Swagger UI & ReDoc interactive documentation
- Pagination, filtering, and search capabilities
- Rate limiting (100 req/hour anonymous, 1000 req/hour authenticated)
-
β‘ Async Task Processing (Celery 5.3.4 + Redis 5.0.1)
- Background job queue for non-blocking operations
- Scheduled tasks (inactivity checks, email sending, session cleanup)
- Celery Beat scheduler for recurring tasks
- Redis message broker and caching
-
π Two-Factor Authentication (TOTP-based)
- TOTP 2FA with QR code generation
- Backup codes (10 per user)
- API endpoints for setup and management
- QR code support with qrcode library
-
π Error Tracking & Monitoring (Sentry SDK 1.40.0)
- Production error tracking with Sentry
- Django + Celery integrations
- Automatic error reporting and alerting
- π€ Auto-Calculation: File size and SHA256 hash auto-generated on asset upload
- π§ Email Notifications: Automatic emails for inactivity warnings and release requests
- π Session Management: Automatic cleanup of expired sessions
- π¨ Profound Color Palette: Deep navy blues, rich purples, and teal accents
- β¨ Smooth Animations: Fade-in, slide, and hover effects throughout
- π± Responsive Design: Mobile-first approach with full tablet and desktop support
- π Tabbed Interface: Organized dashboard with separate tabs for different sections
- π« Interactive Elements: Cards with hover effects, ripple animations, and smooth transitions
- π― Modern UI Components: Beautiful forms, buttons, badges, and cards
- Python 3.8 or higher
- MySQL 5.7+ or higher (required)
- pip (Python package manager)
-
Clone the repository
git clone <repository-url> cd Legacy_System
-
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the project root:DJANGO_SECRET_KEY=your-secret-key-here DJANGO_DEBUG=1 DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1 # MySQL Database Configuration (Required) MYSQL_DATABASE=legacyvault MYSQL_USER=legacyvault MYSQL_PASSWORD=your-password MYSQL_HOST=127.0.0.1 MYSQL_PORT=3306
-
Run migrations
python manage.py migrate
-
Create a superuser (optional)
python manage.py createsuperuser
-
Collect static files
python manage.py collectstatic --noinput
-
Start the development server
python manage.py runserver
-
Start background services (in separate terminals)
Option A: Development (without async tasks)
# Server is ready at http://127.0.0.1:8000/Option B: Full production-like setup (with async tasks) Terminal 2 - Start Redis (required for Celery):
redis-server
Terminal 3 - Start Celery Worker:
celery -A legacyvault worker -l info
Terminal 4 - Start Celery Beat (scheduler):
celery -A legacyvault beat -l info
-
Access the application
- Homepage: http://127.0.0.1:8000/
- Admin Panel: http://127.0.0.1:8000/admin/
- API Documentation (Swagger): http://127.0.0.1:8000/api/docs/swagger/
- API Documentation (ReDoc): http://127.0.0.1:8000/api/docs/redoc/
Legacy_System/
βββ apps/
β βββ accounts/ # User authentication and inactivity settings
β βββ audit/ # Audit logging system
β βββ wills/ # Core wills and assets management
βββ legacyvault/ # Django project settings
βββ static/ # Static files (CSS, JS, images)
β βββ frontend/
β β βββ assets/
β β βββ index.css # Frontend styles (imports main CSS)
β β βββ index.js # Frontend JavaScript
β βββ style.css # Main stylesheet with modern design
βββ templates/ # Django templates
β βββ base.html # Base template
β βββ accounts/ # Authentication templates
β βββ wills/ # Wills management templates
βββ requirements.txt # Python dependencies
βββ README.md # This file
The frontend uses a profound color scheme:
- Primary Colors: Deep navy blues (#0a1628 to #bad5ff)
- Accent Colors: Rich purple (#6c5ce7), Teal (#00b894), Gold (#fdcb6e)
- Semantic Colors: Success (teal), Warning (gold), Danger (coral), Info (blue)
- CSS Variables: All colors and spacing defined as CSS variables for easy customization
- Animations: Smooth transitions, fade-ins, and hover effects
- Responsive Grid: Flexible grid system for cards and layouts
- Tab System: JavaScript-powered tabs for organized content
- Form Enhancements: Real-time validation feedback and loading states
- Tab switching with smooth transitions
- Scroll-triggered animations using Intersection Observer
- Form validation and enhancement
- Card interactions with ripple effects
- Smooth scrolling for anchor links
MySQL (Required)
MYSQL_DATABASE=legacyvault
MYSQL_USER=legacyvault
MYSQL_PASSWORD=your-password
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306Note: LegacyVault requires MySQL 5.7+ or higher. SQLite is not supported.
For production, set these environment variables:
DJANGO_SECRET_KEY=your-strong-secret-key
DJANGO_DEBUG=0
DJANGO_SECURE_SSL_REDIRECT=1
DJANGO_SESSION_COOKIE_SECURE=1
DJANGO_CSRF_COOKIE_SECURE=1The project includes comprehensive REST API documentation:
- Swagger UI: http://127.0.0.1:8000/api/docs/swagger/
- ReDoc: http://127.0.0.1:8000/api/docs/redoc/
- Full API Reference: See
API_DOCUMENTATION.md
API endpoints use JWT token authentication:
-
Get Token
curl -X POST http://127.0.0.1:8000/api/v1/auth/token/ \ -H "Content-Type: application/json" \ -d '{"username":"user","password":"pass"}'
-
Use Token in Requests
curl -H "Authorization: Bearer YOUR_TOKEN" \ http://127.0.0.1:8000/api/v1/wills/
API_DOCUMENTATION.md- Complete REST API reference with 50+ endpointsUPGRADE_GUIDE.md- Comprehensive guide to new features (REST, Celery, 2FA, Sentry)QUICK_REFERENCE.md- Quick start guide for common tasksCOMPLETION_SUMMARY.md- Deployment and production readiness checklistUPGRADE_SUMMARY.md- Overview of all upgrades and enhancementsSHA256_AUTO_GENERATION.md- Details on automatic SHA256 hash generation
python manage.py testpython manage.py makemigrations
python manage.py migratepython manage.py collectstaticThe project follows PEP 8 Python style guidelines and uses Django's recommended practices.
- CSRF Protection: All forms are protected with CSRF tokens
- Authentication Required: Most views require user authentication
- Permission Checks: Users can only access their own wills and assets
- Audit Logging: All actions are logged with IP addresses and user agents
- Encrypted Storage: Assets are stored as ciphertext only
/- Homepage/accounts/login/- User login/accounts/signup/- User registration/accounts/logout/- User logout/accounts/inactivity_settings/- Inactivity preferences/wills/dashboard/- Main dashboard/wills/create/- Create a new will/admin/- Django admin panel
-
Build the Docker image:
docker build -t legacyvault . -
Run with docker-compose:
docker-compose up -d
-
Set production environment variables in
.env:DJANGO_SECRET_KEY=your-strong-secret-key DJANGO_DEBUG=0 DJANGO_ALLOWED_HOSTS=yourdomain.com # Database MYSQL_DATABASE=legacyvault MYSQL_USER=legacyvault MYSQL_PASSWORD=strong-password MYSQL_HOST=db-server MYSQL_PORT=3306 # Security DJANGO_SECURE_SSL_REDIRECT=1 DJANGO_SESSION_COOKIE_SECURE=1 DJANGO_CSRF_COOKIE_SECURE=1 # Celery & Redis CELERY_BROKER_URL=redis://localhost:6379/0 CELERY_RESULT_BACKEND=redis://localhost:6379/1 # Sentry (Error Tracking) SENTRY_DSN=your-sentry-dsn-here
-
Run migrations:
python manage.py migrate
-
Collect static files:
python manage.py collectstatic --noinput
-
Start services:
Web Server (use Gunicorn):
gunicorn legacyvault.wsgi:application --bind 0.0.0.0:8000
Celery Worker:
celery -A legacyvault worker -l info
Celery Beat (Scheduler):
celery -A legacyvault beat -l info
Redis (Message Broker & Cache):
redis-server
-
Configure reverse proxy (Nginx example):
server { listen 80; server_name yourdomain.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
See COMPLETION_SUMMARY.md for detailed deployment instructions.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Django Framework
- Firebase Admin SDK
- All contributors and users
For issues, questions, or contributions, please open an issue on the GitHub repository.
- β REST API with 50+ endpoints (Django REST Framework)
- β JWT authentication with token refresh
- β Async task processing (Celery + Redis)
- β Two-factor authentication (TOTP-based)
- β Error tracking (Sentry integration)
- β Automatic SHA256 hash generation
- β Automatic file size calculation
- β Rate limiting and security headers
- β Request logging for audit trail
- β Interactive API documentation (Swagger & ReDoc)
- β Testing framework (pytest + pytest-django)
- β Modern responsive frontend
- Mobile app (using REST API)
- Multi-language support
- Advanced encryption options
- Email notification templates customization
- Role-based access control (RBAC)
- Backup and recovery features
- API rate limiting per user tier
- Enhanced search and filtering
- β REST API Framework: 50+ endpoints with JWT auth, pagination, filtering
- β Async Task Processing: Celery + Redis for background jobs and scheduling
- β Two-Factor Authentication: TOTP-based 2FA with backup codes and QR generation
- β Error Tracking: Sentry integration for production monitoring
- β Auto-Calculation: SHA256 hashing and file size auto-generated on upload
- β Enhanced Security: CORS, rate limiting, security headers, request logging
- β API Documentation: Interactive Swagger UI and ReDoc documentation
- β Testing Suite: pytest + pytest-django with coverage reporting
- β Comprehensive Documentation: 6 detailed guides covering all features
- β Frontend modernization with profound color palette
- β Smooth animations and transitions
- β Tabbed dashboard interface
- β Responsive mobile-first design
- β Modern form enhancements
- β Interactive card components
Made with β€οΈ for secure digital legacy management