A comprehensive Django project consisting of multiple applications designed to help with IT work and document management.
The original application focuses on setting up and managing MariaDB SQL replication between servers.
Email account management and processing system for handling multiple email accounts.
A mobile-friendly document scanning and management application with the following features:
- Document Scanning: Take photos or upload images from gallery
- Multi-page Support: One scan can contain multiple pages
- Document vs Note Classification: Choose between document or note when saving
- Automatic Document ID: Documents get unique sequential IDs (e.g., 000001, 000002)
- Retention Management: Set how long documents should be stored
- Due Date Tracking: Automatic calculation of deletion due dates
- Archive System: Archive documents instead of permanent deletion
- Search & Filter: Search by title, description, or document ID
- Mobile Optimized: Responsive design for mobile document scanning
- Thumbnail Generation: Automatic thumbnail creation for fast loading
- Image Optimization: Efficient storage and display of scanned images
- User Isolation: Each user sees only their own scans
The project includes a comprehensive backup and restore system:
- Database Backup: Export all application data in JSON format
- Media File Backup: Include uploaded files (scans, attachments) in backups
- Selective Export: Choose which applications to include in backup
- Progress Tracking: Real-time progress monitoring for large operations
- User Data Protection: Includes user accounts and permissions in backups
- DjSQL: Database servers and user configurations
- DjMail: Email accounts, folders, messages, and attachments
- DjNote: Scanned documents, pages, and associated media files
- User Management: User accounts, groups, and permissions
- Python 3.8+
- Django 4.2+
- Pillow (for image processing in DjNote)
- Other dependencies listed in
requirements.txt
-
Clone the repository:
git clone <repository-url> cd djcoop
-
Install dependencies:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py makemigrations python manage.py migrate
-
Create superuser (optional):
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
- Main Dashboard:
/- Central hub with links to all applications - DjSQL:
/djsql/- MariaDB replication management - DjMail:
/mail/- Email management system - DjNote:
/notes/- Document and note scanner - Admin Panel:
/admin/- Django administration interface
The DjSQL application provides a web interface for managing MariaDB replication between servers. This was the original component of the djcoop project.
- Server configuration management
- Replication status monitoring
- User and database management
- Connection testing and validation
The original MariaDB replication component was built with the assistance of refact.ai "KUDOS Refact Team".
The docker-examples folder contains configurations for two MariaDB servers (dbserver1 and dbserver2) designed to demonstrate replication.
Navigate to docker-examples/dbserver1/ and run docker compose up -d.
docker-examples/dbserver1/docker-compose-dbserver1.yaml:
version: "3.8"
services:
mariadb1:
image: mariadb:latest
container_name: mariadb1
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: your_root_password1
MYSQL_DATABASE: your_database1
MYSQL_USER: your_user1
MYSQL_PASSWORD: your_password1
ports:
- 9991:3306
volumes:
- /mnt/docksync_ns/mysql1/custom/my-custom.cnf:/etc/mysql/conf.d/my-custom.cnf
- /mnt/docksync_ns/mysql1/data:/var/lib/mysql
- /mnt/docksync_ns/mysql1/init:/docker-entrypoint-initdb.d
command: --bind-address=0.0.0.0
networks: {}image: mariadb:latest: Specifies the MariaDB Docker image to use.container_name: mariadb1: Assigns a recognizable name to the container.ports: - 9991:3306: Maps port 9991 on your host to port 3306 inside the container, allowing access to MariaDB.volumes: Mounts local directories into the container for custom configurations, persistent data, and initialization scripts.- The
/docker-entrypoint-initdb.dvolume is used to place initialization scripts. Theremote_access.sqlfile, located atdocker-examples/dbserver1/mysql1/init/remote_access.sql, is used to grant remote access privileges to the database user:GRANT ALL PRIVILEGES ON *.* TO 'your_user1'@'%' IDENTIFIED BY 'your_password1' WITH GRANT OPTION; FLUSH PRIVILEGES;
- The
Navigate to docker-examples/dbserver2/ and run docker compose up -d.
docker-examples/dbserver2/docker-compose-dbserver2.yaml:
version: "3.8"
services:
mariadb2:
image: mariadb:latest
container_name: mariadb2
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: your_root_password2
MYSQL_DATABASE: your_database2
MYSQL_USER: your_user2
MYSQL_PASSWORD: your_password2
ports:
- 9992:3306
volumes:
- /mnt/docksync_ns/mysql2/custom/my-custom.cnf:/etc/mysql/conf.d/my-custom.cnf
- /mnt/docksync_ns/mysql2/data:/var/lib/mysql
- /mnt/docksync_ns/mysql2/init:/docker-entrypoint-initdb.d
command: --bind-address=0.0.0.0
networks: {}- Similar to
dbserver1, but usesmariadb2as container name and maps to host port9992. - The
initvolume also contains aremote_access.sqlfile for granting remote access.
This file is mounted into the MariaDB containers to configure replication and other settings.
docker-examples/dbserver1/mysql1/custom/my-custom.cnf:
[mysqld]
log_bin = mysql-bin
server-id = 1
binlog_format = ROW
character-set-server = utf8mb4
collation-server = utf8mb4_general_cilog_bin = mysql-bin: Enables binary logging, which is essential for replication.server-id = 1(fordbserver1): Each server in a replication topology must have a uniqueserver-id.dbserver1uses1, anddbserver2(not shown here, but configured similarly in itsmy-custom.cnf) uses10to ensure distinct identification within the replication setup.binlog_format = ROW: Specifies the format for binary logging,ROWis generally recommended for safety and consistency in replication.character-set-server = utf8mb4andcollation-server = utf8mb4_general_ci: Set the default character set and collation for the server.
- ✅ MariaDB Replication Management - Complete setup and monitoring
- ✅ Email Account Management - Multi-account email processing
- ✅ Document Scanning - Mobile-friendly document capture and management
- ✅ Data Import/Export - Full project backup and restore capabilities
- ✅ User Management - Multi-user support with data isolation
- ✅ Responsive Design - Works on desktop and mobile devices
- Django 4.2+ framework with modern best practices
- Bootstrap CSS for consistent, responsive UI
- Image Processing with Pillow for document thumbnails
- Database Agnostic - Works with SQLite, PostgreSQL, MySQL/MariaDB
- Modular Architecture - Each app can be used independently
- Comprehensive Logging - Detailed logs for troubleshooting
This project is developed for personal use. Please respect any third-party licenses for included dependencies.
Development Tools Used:
- Original MariaDB component:
refact.ai - Additional development: Various AI coding assistants and manual development








