A secure, web-based document management system designed for organizations to upload, verify, and track official letters. The system provides role-based access control, CEO verification workflows, and public verification capabilities through QR codes.
- Document Upload: Secure PDF letter uploads with drag-and-drop interface
- CEO Verification: Email-based verification workflow with direct approval/rejection links
- QR Code Generation: Unique QR codes for each letter for public verification
- Status Tracking: Real-time status updates (Pending, Verified, Rejected)
- Public Verification: Third-party verification without accessing document content
- Role-Based Access: Admin, CEO, and User roles with different permissions
- User Management: Admin can create, edit, and manage user accounts
- Secure Authentication: Password-hashed login system
- Interactive Dashboard: Statistics cards with visual charts
- Letter Overview: Comprehensive listing with search and filtering
- Mobile Responsive: Fully optimized for mobile devices
- Real-time Updates: Automatic status updates and notifications
- Email Notifications: SendGrid integration for automated emails
- Customizable Branding: Company logo and name customization
- Audit Logging: Complete activity tracking for compliance
- Shared Hosting Ready: Designed for easy deployment on shared hosting
- Backend: Python Flask
- Frontend: HTML5, CSS3, JavaScript, Bootstrap 5
- Database: MySQL
- Email Service: SendGrid API
- QR Codes: Python QRCode library
- PDF Processing: Secure file handling
- Charts: Chart.js for dashboard visualizations
- Python 3.7 or higher
- MySQL 5.7 or higher
- SendGrid account (for email notifications)
- Web server (Apache/Nginx for production)
git clone <repository-url>
cd geec-online-dmspython setup_dms.py# Login to MySQL
mysql -u root -p
# Import the database schema
mysql -u root -p < database_schema.sqlEdit the .env file with your settings:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=geec_dms
SECRET_KEY=your-secret-key-here
SENDGRID_API_KEY=your-sendgrid-api-keypython app.pyVisit http://localhost:5000 in your browser.
After running the database schema:
- Admin:
admin/admin123 - CEO:
ceo/ceo123 - User:
user/user123
- Navigate to User Management in the sidebar
- Click Add User to create new accounts
- Assign appropriate roles (Admin, CEO, User)
- Edit or deactivate users as needed
- Go to Settings to configure:
- Company name and branding
- Email server settings
- System preferences
- Monitor letter statistics
- View system activity
- Access quick actions
- Click Create New Letter
- Drag and drop your PDF file or click to browse
- Enter an optional title
- Check "Require CEO Verification" if needed
- Add any additional notes
- Click Upload Letter
- Go to Letter Status to view all your letters
- Use filters to find specific letters
- Click the QR code icon to view/download QR codes
- Use the eye icon to see public verification page
- Check your email for verification requests
- Click the verification link in the email
- Review the letter details and document
- Choose Approve or Reject with comments
- The status updates automatically
- View pending verifications
- Monitor approval statistics
- Quick access to verification queue
- Scan the QR code with any QR reader
- View verification status and letter details
- No access to actual document content
- Visit the verification page
- Enter the letter number manually
- View verification status and metadata
EMAIL_CONFIG = {
'smtp_server': 'smtp.sendgrid.net',
'smtp_port': 587,
'sender_email': 'your-email@company.com',
'api_key': 'your-sendgrid-api-key'
}DB_CONFIG = {
'host': 'localhost',
'database': 'geec_dms',
'user': 'root',
'password': 'your_password'
}- Maximum file size: 16MB
- Allowed formats: PDF only
- Upload directory:
uploads/
- Upload Files: Transfer all files to your hosting directory
- Database Setup: Import
database_schema.sqlvia cPanel/phpMyAdmin - Configuration: Update database credentials in
app.py - Dependencies: Install requirements (contact host if needed)
- Permissions: Set appropriate file permissions (755/644)
- Web Server Configuration (Nginx + Gunicorn):
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /static {
alias /path/to/app/static;
}
}- Run with Gunicorn:
gunicorn -w 4 -b 127.0.0.1:5000 app:app- SSL Certificate: Use Let's Encrypt or commercial SSL
- Environment Variables: Set production environment variables
- Database: Use production MySQL server
- Change default SECRET_KEY
- Update default user passwords
- Enable HTTPS/SSL
- Configure firewall rules
- Set up regular database backups
- Enable audit logging
- Restrict file upload types
- Configure proper file permissions
geec-online-dms/
βββ app.py # Main Flask application
βββ database_schema.sql # Database schema and initial data
βββ requirements.txt # Python dependencies
βββ setup_dms.py # Setup script
βββ README.md # This file
βββ PRD.md # Product Requirements Document
βββ templates/ # HTML templates
β βββ base.html # Base template
β βββ login.html # Login page
β βββ dashboard.html # Dashboard
β βββ create_letter.html # Letter upload
β βββ letter_status.html # Letter listing
β βββ verify_letter.html # Public verification
β βββ ceo_verify.html # CEO verification
βββ static/ # Static assets
β βββ css/
β β βββ style.css # Custom styles
β βββ js/
β β βββ main.js # JavaScript functionality
β βββ images/ # Image assets
βββ uploads/ # File uploads directory
Database Connection Error
- Check MySQL service is running
- Verify database credentials
- Ensure database exists
File Upload Issues
- Check file size (max 16MB)
- Verify uploads directory permissions
- Ensure PDF format only
Email Not Sending
- Verify SendGrid API key
- Check email configuration
- Test SMTP connectivity
Permission Errors
- Set correct file permissions (755/644)
- Check upload directory ownership
- Verify Python module access
Enable debug mode for development:
app.run(debug=True)Check application logs in:
- Console output (development)
- Web server logs (production)
- Application log files
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the troubleshooting section
- Review the documentation
- v1.0.0 - Initial release
- Core document management functionality
- User authentication and role management
- CEO verification workflow
- QR code generation and public verification
- Responsive web interface
- Email notifications
GEEC Online DMS - Secure β’ Reliable β’ Professional Document Management