β οΈ PROJECT STATUS: COMPLETE
This project is now complete and no further updates will be made. All features are fully implemented and the CI/CD pipeline is working perfectly.
A modern, production-grade expense tracking application built with Django, featuring a beautiful UI, comprehensive testing, and zero-cost deployment capabilities.
- Beautiful Bootstrap 5 Design: Modern, responsive UI with black and blue theme
- Animated Backgrounds: Dynamic backgrounds on login and signup pages
- Floating Labels: Professional form inputs with smooth animations
- Interactive Dashboard: Real-time charts and financial insights using Chart.js
- Mobile Responsive: Works perfectly on all device sizes
- Expense & Income Tracking: Comprehensive transaction management with categorization
- Budget Management: Set and track spending limits with visual progress indicators
- Multi-Currency Support: Handle transactions in various currencies (USD, EUR, GBP, etc.)
- Account Management: Multiple account types (checking, savings, credit cards, cash)
- Category System: Flexible categorization with custom and system categories
- Data Export: CSV export functionality for financial data analysis
- Transaction History: Complete audit trail of all financial activities
- User Authentication: Secure login/signup with Django Allauth
- Email Verification: Optional email verification for new accounts
- Rate Limiting: Protection against brute force attacks
- CSRF Protection: Cross-site request forgery protection
- Security Headers: Comprehensive security headers implementation
- User Data Isolation: Each user's data is completely isolated
- RESTful API: Complete API with Django REST Framework
- OpenAPI Documentation: Auto-generated API documentation with Swagger UI
- Token Authentication: Secure API access with token-based authentication
- Background Tasks: Celery integration for async processing
- Caching: Redis-based caching for improved performance
- Docker Support: Containerized deployment with Docker Compose
- CI/CD Pipeline: Automated testing, linting, and security scanning
- Comprehensive Testing: Unit tests, integration tests, and container tests
- Code Quality: Black/isort formatting, flake8 linting, and bandit security scanning
- Monitoring: Sentry integration for error tracking
- Logging: Comprehensive logging with structured output
- Health Checks: Application health monitoring endpoints
Visual showcase of the application's modern interface and functionality.
The main dashboard displays a personalized welcome message, key financial statistics in modern cards, and a budget progress bar showing spending against monthly limits. Features a clean, professional design with the signature black and blue color scheme.
The lower dashboard section showcases interactive Chart.js visualizations including pie charts for expense categories, monthly spending trends, and income vs. expense comparisons. Provides comprehensive financial insights at a glance.
Modern login interface featuring floating label forms, animated background with expense tracking themes, and the signature black and blue color scheme. Includes smooth transitions and professional styling.
Registration page with animated background video/GIF, floating label forms, and modern UI elements. The design maintains consistency with the overall application theme while providing an engaging user experience.
Expense entry form with Bootstrap 5 floating labels, comprehensive field validation, and intuitive layout. Includes fields for amount, currency, description, category, account, date, merchant, and optional notes.
Income tracking form mirroring the expense form design for consistency. Features the same modern UI elements and validation patterns to ensure a unified user experience.
Budget configuration interface allowing users to set spending limits, define periods, select categories, and assign multiple accounts. Features a responsive grid layout and multi-select functionality for comprehensive budget planning.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Django API β β Background β
β (Django βββββΊβ (DRF + βββββΊβ Tasks β
β Templates) β β Allauth) β β (Celery) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β PostgreSQL β
β Database β
βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Redis Cache β
β + Queue β
βββββββββββββββββββ
- Backend: Django 5.1 + Django REST Framework
- Database: PostgreSQL (production), SQLite (development)
- Cache/Queue: Redis
- Background Tasks: Celery + Celery Beat
- Authentication: Django Allauth with email verification
- Security: Django Axes, CSP, HSTS
- API Documentation: DRF Spectacular (OpenAPI/Swagger)
- Monitoring: Sentry SDK
- File Storage: S3-compatible storage (DigitalOcean Spaces, Backblaze)
- Email: Brevo (free tier - 300 emails/day)
- Containerization: Docker + Docker Compose
- Python 3.11+
- Git
- Python 3.11+
- PostgreSQL 15+
- Redis 7+
- Docker & Docker Compose (optional)
-
Clone the repository
git clone <your-repo-url> cd Expense_Tracker_Project
-
Set up virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies
pip install -r requirements-dev.txt
-
Create logs directory
mkdir -p logs
-
Run migrations
python manage.py migrate
-
Create a superuser (optional)
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
-
Access the application
- Web App: http://127.0.0.1:8000
- Login: http://127.0.0.1:8000/login/
- Signup: http://127.0.0.1:8000/signup/
Note: The application automatically uses simplified settings (settings-simple) for local development, which includes SQLite database and disabled production features for easier setup.
-
Clone the repository
git clone <your-repo-url> cd Expense_Tracker_Project
-
Set up environment variables
cp env.example .env # Edit .env with your configuration -
Start services
docker compose up -d
-
Run migrations
docker compose exec web python manage.py migrate -
Create superuser
docker compose exec web python manage.py createsuperuser -
Access the application
- Web App: http://localhost:8000
- API Docs: http://localhost:8000/api/docs/
- Admin: http://localhost:8000/admin/
-
Set up virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install all dependencies
pip install -r requirements.txt
-
Set up PostgreSQL database
# Create database and user createdb expense_tracker createuser expense_user -
Configure environment
cp env.example .env # Update DATABASE_URL and other settings -
Run migrations
python manage.py migrate
-
Start Redis
redis-server
-
Start Celery worker
celery -A Expense_Tracker_Project worker --loglevel=info
-
Start Celery beat
celery -A Expense_Tracker_Project beat --loglevel=info
-
Run development server
python manage.py runserver
Key configuration options in .env:
# Django Core
SECRET_KEY=your-super-secret-key
DEBUG=False
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
# Database
DATABASE_URL=postgres://user:password@localhost:5432/expense_tracker
# Email (Brevo - Free tier)
EMAIL_HOST=smtp-relay.brevo.com
EMAIL_HOST_USER=your-brevo-username
EMAIL_HOST_PASSWORD=your-brevo-api-key
# Redis
REDIS_URL=redis://localhost:6379/0
# File Storage (DigitalOcean Spaces)
AWS_ACCESS_KEY_ID=your-spaces-access-key
AWS_SECRET_ACCESS_KEY=your-spaces-secret-key
AWS_STORAGE_BUCKET_NAME=your-bucket-name
AWS_S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com
# Sentry (Free tier)
SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-idThe application includes comprehensive security features:
- HTTPS Enforcement: Automatic redirect to HTTPS in production
- HSTS: HTTP Strict Transport Security headers
- CSP: Content Security Policy for XSS protection
- Rate Limiting: Login throttling and API rate limits
- Password Policy: Strong password requirements (12+ characters)
- CSRF Protection: Cross-site request forgery protection
- Secure Cookies: HttpOnly and Secure flags
- Authentication:
/api/auth/ - Categories:
/api/categories/ - Accounts:
/api/accounts/ - Transactions:
/api/transactions/ - Budgets:
/api/budgets/ - Rules:
/api/rules/ - Attachments:
/api/attachments/ - Imports:
/api/imports/ - Dashboard:
/api/dashboard/overview/
- Swagger UI:
/api/docs/ - ReDoc:
/api/redoc/ - OpenAPI Schema:
/api/schema/
# Get user's transactions
curl -H "Authorization: Token your-token" \
http://localhost:8000/api/transactions/
# Create new expense
curl -X POST \
-H "Authorization: Token your-token" \
-H "Content-Type: application/json" \
-d '{"amount": "25.50", "description": "Lunch", "date": "2024-01-15"}' \
http://localhost:8000/api/transactions/The application uses Celery for background processing:
- Import Processing: CSV/OFX file imports
- Budget Alerts: Automated budget notifications
- Weekly Reports: Scheduled financial reports
- Data Cleanup: Automated maintenance tasks
- Recurring Transactions: Automated transaction creation
# Check worker status
celery -A Expense_Tracker_Project status
# Monitor tasks
celery -A Expense_Tracker_Project monitor
# Check scheduled tasks
celery -A Expense_Tracker_Project beat --loglevel=info# Run all tests
python -m pytest
# Run with coverage
python -m pytest --cov=. --cov-report=html
# Run specific test file
python -m pytest tracker/tests.py
# Run tests in Docker
docker-compose exec web python -m pytestThe application maintains >85% test coverage on core functionality:
- Model validation and business logic
- API endpoints and serializers
- Background tasks and services
- Security middleware and permissions
-
Vercel (Frontend) + Supabase (Backend)
- Free tier available
- Automatic deployments from GitHub
- Built-in CDN and edge functions
-
DigitalOcean App Platform
- Managed containers and databases
- Automatic scaling and SSL
- Integrated monitoring
-
Railway
- Simple container deployment
- PostgreSQL and Redis included
- Automatic deployments
-
Self-hosted
- Docker containers on VPS
- Nginx reverse proxy
- Let's Encrypt SSL certificates
- Set
DEBUG=Falsein production - Configure production database
- Set up SSL certificates
- Configure email backend
- Set up monitoring (Sentry)
- Configure file storage
- Set up backups
- Configure logging
- Set up health checks
- Application Health:
/api/health/ - Database Connectivity: Automatic database checks
- Redis Connectivity: Cache and queue monitoring
- Background Tasks: Celery worker status
Structured JSON logging for production:
import logging
logger = logging.getLogger(__name__)
logger.info("User action", extra={
"user_id": user.id,
"action": "transaction_created",
"amount": transaction.amount
})Sentry integration for production error monitoring:
- Automatic error capture
- Performance monitoring
- Release tracking
- User feedback collection
- Email-based authentication with verification
- Two-factor authentication support (TOTP)
- Session management with secure cookies
- API token authentication for mobile apps
- Role-based access control for admin features
- PII minimization - only essential data stored
- Encrypted storage for sensitive information
- Audit logging for all user actions
- Data export/import with user control
- Automatic data cleanup for old records
- Standard HTTP methods (GET, POST, PUT, DELETE)
- JSON responses with consistent formatting
- Pagination for large datasets
- Filtering and sorting on all endpoints
- Bulk operations for efficient data management
- Responsive design for mobile browsers
- API rate limiting to prevent abuse
- Offline support with local storage
- Push notifications for budget alerts
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
- Python: PEP 8 compliance with Black formatting
- Django: Follow Django best practices
- Testing: Maintain >85% coverage
- Documentation: Update docs for new features
- Security: Follow OWASP guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check this README and API docs
- Issues: Report bugs on GitHub Issues
- Discussions: Use GitHub Discussions for questions
- Email: Contact support@yourdomain.com
- Database connection errors: Check PostgreSQL service and credentials
- Redis connection issues: Verify Redis is running and accessible
- Email not sending: Check Brevo credentials and SMTP settings
- File upload failures: Verify S3 storage configuration
- Modern UI/UX: Bootstrap 5 design with animated backgrounds and floating labels
- Core Functionality: Expense/income tracking, budget management, account management
- Enhanced Data Models: Comprehensive transaction, category, and budget models
- RESTful API: Complete Django REST Framework API with OpenAPI documentation
- Security: Authentication, rate limiting, CSRF protection, security headers
- Background Tasks: Celery integration for async processing
- Monitoring: Sentry integration, structured logging, health checks
- CI/CD Pipeline: Automated testing, linting, security scanning, and deployment
- Docker Support: Containerized deployment with Docker Compose
- Testing: Comprehensive test suite with unit, integration, and container tests
- Code Quality: Black/isort formatting, flake8 linting, bandit security scanning
- Zero-Cost Deployment: All features work without paid services
- Production-Ready: Complete CI/CD pipeline and security features
- Modern UI: Beautiful, responsive interface with professional design
- Comprehensive Testing: Full test coverage and automated quality checks
- Developer-Friendly: Easy setup and clear documentation
Note: This project is complete and no further updates will be made. The following are potential enhancements that could be added by future contributors:
- Bank sync integration (Plaid/Teller)
- Machine learning categorization
- Advanced reporting and analytics
- Mobile app (React Native)
- Subscription plans and billing
- Team/shared budgets
- Advanced integrations
Built with Django and modern web technologies